Package org.jtalks.jcommune.service.dto

Examples of org.jtalks.jcommune.service.dto.UserInfoContainer


     *
     * @return user profile modification info for the service tier
     */
    public UserInfoContainer getUserInfoContainer() {
        UserProfileDto dto = this.getUserProfileDto();
        return new UserInfoContainer(dto.getFirstName(), dto.getLastName(), dto.getEmail(), dto.getSignature(),
                this.getAvatar(), dto.getPageSize(), dto.getLocation());
    }
View Full Code Here


        when(userDao.isExist(USER_ID)).thenReturn(Boolean.TRUE);
        when(userDao.get(USER_ID)).thenReturn(user);
        String newAvatar = new String(new byte[12]);

        JCUser editedUser = userService.saveEditedUserProfile(USER_ID,
                new UserInfoContainer(FIRST_NAME, LAST_NAME, EMAIL, SIGNATURE, newAvatar, 50, "location"));

        verify(userDao).saveOrUpdate(user);
        assertUserProfileUpdated(editedUser);
    }
View Full Code Here

    public void editUserProfileShouldNotUpdateHimAndSaveInRepositoryIfHeIsNotFound() throws NotFoundException {
        String newAvatar = new String(new byte[12]);
        when(userDao.isExist(USER_ID)).thenReturn(Boolean.FALSE);

        userService.saveEditedUserProfile(USER_ID,
                new UserInfoContainer(FIRST_NAME, LAST_NAME, EMAIL, SIGNATURE, newAvatar, 50, "location"));
    }
View Full Code Here

        when(userDao.isExist(USER_ID)).thenReturn(Boolean.TRUE);
        when(userDao.get(USER_ID)).thenReturn(user);
        String newAvatar = new String(new byte[12]);

        JCUser editedUser = userService.saveEditedUserProfile(USER_ID,
                new UserInfoContainer(FIRST_NAME, LAST_NAME, EMAIL, SIGNATURE, newAvatar, 50, "location"));

        verify(userDao).saveOrUpdate(user);

        assertUserSecurityAndNotificationsAreSame(user, editedUser);
        assertEquals(editedUser.getLanguage(), Language.ENGLISH, "language was changed");
View Full Code Here

        when(userDao.isExist(USER_ID)).thenReturn(Boolean.TRUE);
        when(userDao.get(USER_ID)).thenReturn(user);
        String newAvatar = new String(new byte[0]);

        JCUser editedUser = userService.saveEditedUserProfile(USER_ID,
                new UserInfoContainer(FIRST_NAME, LAST_NAME, EMAIL, SIGNATURE, newAvatar, 50, "location"));

        verify(userDao).saveOrUpdate(user);
        assertEquals(editedUser.getEmail(), EMAIL, "Email was changed");
    }
View Full Code Here

TOP

Related Classes of org.jtalks.jcommune.service.dto.UserInfoContainer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.