@Test public void testConvertRegisterUserInput() { RegisterUserInput input = new RegisterUserInput(); input.setEmail(USER_EMAIL); input.setFirstname(USER_FIRSTNAME); input.setLastname(USER_LASTNAME); NewExternalUserEntity newExternalUserEntity = userMapper.convert(input); assertNotNull(newExternalUserEntity); assertEquals(USER_EMAIL, newExternalUserEntity.getEmail()); assertEquals(USER_FIRSTNAME, newExternalUserEntity.getFirstname()); assertEquals(USER_LASTNAME, newExternalUserEntity.getLastname()); }
public User convert(UserEntity user) { final User userItem = new User(); userItem.setEmail(user.getEmail()); userItem.setFirstName(user.getFirstname()); userItem.setLastName(user.getLastname()); userItem.setDisplayName(user.getDisplayName()); userItem.setId(user.getId()); userItem.setCustomFields(user.getCustomFields()); return userItem; }
UserMapper { public User convert(UserEntity user) { final User userItem = new User(); userItem.setEmail(user.getEmail()); userItem.setFirstName(user.getFirstname()); userItem.setLastName(user.getLastname()); userItem.setDisplayName(user.getDisplayName()); userItem.setId(user.getId()); userItem.setCustomFields(user.getCustomFields()); return userItem; } }
UserMapper { public User convert(UserEntity user) { final User userItem = new User(); userItem.setEmail(user.getEmail()); userItem.setFirstName(user.getFirstname()); userItem.setLastName(user.getLastname()); userItem.setDisplayName(user.getDisplayName()); userItem.setId(user.getId()); userItem.setCustomFields(user.getCustomFields()); return userItem; }  }
UserMapper { public User convert(UserEntity user) { final User userItem = new User(); userItem.setEmail(user.getEmail()); userItem.setFirstName(user.getFirstname()); userItem.setLastName(user.getLastname()); userItem.setDisplayName(user.getDisplayName()); userItem.setId(user.getId()); userItem.setCustomFields(user.getCustomFields()); return userItem; }  User convert(UserEntity user); User convert(SearchableUser user); NewExternalUserEntity convert(RegisterUserInput input); RegisterUserEntity convert(FinalizeRegistrationInput input); UserLinks computeUserLinks(String basePath, Date updateDate); }
UserMapper { public User convert(UserEntity user) { final User userItem = new User(); userItem.setEmail(user.getEmail()); userItem.setFirstName(user.getFirstname()); userItem.setLastName(user.getLastname()); userItem.setDisplayName(user.getDisplayName()); userItem.setId(user.getId()); userItem.setCustomFields(user.getCustomFields()); return userItem; }  User convert(UserEntity user); User convert(SearchableUser user); NewExternalUserEntity convert(RegisterUserInput input); RegisterUserEntity convert(FinalizeRegistrationInput input); UserLinks computeUserLinks(String basePath, Date updateDate);  }