Package org.jtalks.jcommune.service.dto

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


     *
     * @return user profile modification info for the service tier
     */
    public UserSecurityContainer getUserSecurityContainer() {
        UserSecurityDto dto = this.getUserSecurityDto();
        return new UserSecurityContainer(dto.getCurrentUserPassword(), dto.getNewUserPassword());
    }
View Full Code Here


        when(encryptionService.encryptPassword(NEW_PASSWORD)).thenReturn(NEW_PASSWORD_MD5_HASH);
        when(userDao.isExist(USER_ID)).thenReturn(Boolean.TRUE);
        when(userDao.get(USER_ID)).thenReturn(user);

        JCUser editedUser = userService.saveEditedUserSecurity(USER_ID,
                new UserSecurityContainer(PASSWORD, NEW_PASSWORD));

        verify(userDao).saveOrUpdate(user);
        assertEquals(editedUser.getPassword(), NEW_PASSWORD_MD5_HASH, "new password was not accepted");
    }
View Full Code Here

        when(encryptionService.encryptPassword(null)).thenReturn(null);
        when(userDao.isExist(USER_ID)).thenReturn(Boolean.TRUE);
        when(userDao.get(USER_ID)).thenReturn(user);
        String newPassword = null;
        JCUser editedUser = userService.saveEditedUserSecurity(USER_ID,
                new UserSecurityContainer(PASSWORD, newPassword));

        assertEquals(editedUser.getPassword(), user.getPassword());
    }
View Full Code Here

        when(encryptionService.encryptPassword(NEW_PASSWORD)).thenReturn(NEW_PASSWORD_MD5_HASH);
        when(userDao.isExist(USER_ID)).thenReturn(Boolean.TRUE);
        when(userDao.get(USER_ID)).thenReturn(user);

        JCUser editedUser = userService.saveEditedUserSecurity(USER_ID,
                new UserSecurityContainer(PASSWORD, NEW_PASSWORD));

        verify(userDao).saveOrUpdate(user);

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

TOP

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

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.