@Test public void shouldReturnUserIdForPasswordResetTokens() throws Exception { String passwordResetToken = "test"; when(userMapper.getUserIdForPasswordResetToken(passwordResetToken)).thenReturn(1L); assertThat(userRepository.getUserIdForPasswordResetToken(passwordResetToken), is(1L)); }
public Long getUserIdForPasswordResetToken(String token) { return userMapper.getUserIdForPasswordResetToken(token); }
UserRepository { public Long getUserIdForPasswordResetToken(String token) { return userMapper.getUserIdForPasswordResetToken(token); } }
UserRepository { public Long getUserIdForPasswordResetToken(String token) { return userMapper.getUserIdForPasswordResetToken(token); } @Autowired  UserRepository(UserMapper userMapper); }
UserRepository { public Long getUserIdForPasswordResetToken(String token) { return userMapper.getUserIdForPasswordResetToken(token); } @Autowired  UserRepository(UserMapper userMapper); List<User> getUsersWithRightInNodeForProgram(Program program, SupervisoryNode node, String rightName); List<User> getUsersWithRightInHierarchyUsingBaseNode(Long nodeId, Long programId, String rightName); void create(User user); void update(User user); User getByEmail(String email); List<User> searchUser(String searchParam, Pagination pagination); User getById(Long id); void insertPasswordResetToken(User user, String passwordResetToken); Long getUserIdForPasswordResetToken(String token); void deletePasswordResetTokenForUser(Long userId); void updateUserPasswordAndActivate(Long userId, String password); User selectUserByUserNameAndPassword(String userName, String password); void insertEmailNotification(SimpleMailMessage emailMessage); void disable(Long userId, Long modifiedBy); User getByUserName(String userName); List<User> getUsersWithRightOnWarehouse(Long id, String rightName); Integer getTotalSearchResultCount(String searchParam); List<LinkedHashMap> getPreferences(Long userId); String updateUserPreferences(Long userId, User user, Long programId, Long facilityId, String products); List<String> getSupervisoryRights(Long userId); void verify(User user); }
UserRepository { public Long getUserIdForPasswordResetToken(String token) { return userMapper.getUserIdForPasswordResetToken(token); } @Autowired  UserRepository(UserMapper userMapper); List<User> getUsersWithRightInNodeForProgram(Program program, SupervisoryNode node, String rightName); List<User> getUsersWithRightInHierarchyUsingBaseNode(Long nodeId, Long programId, String rightName); void create(User user); void update(User user); User getByEmail(String email); List<User> searchUser(String searchParam, Pagination pagination); User getById(Long id); void insertPasswordResetToken(User user, String passwordResetToken); Long getUserIdForPasswordResetToken(String token); void deletePasswordResetTokenForUser(Long userId); void updateUserPasswordAndActivate(Long userId, String password); User selectUserByUserNameAndPassword(String userName, String password); void insertEmailNotification(SimpleMailMessage emailMessage); void disable(Long userId, Long modifiedBy); User getByUserName(String userName); List<User> getUsersWithRightOnWarehouse(Long id, String rightName); Integer getTotalSearchResultCount(String searchParam); List<LinkedHashMap> getPreferences(Long userId); String updateUserPreferences(Long userId, User user, Long programId, Long facilityId, String products); List<String> getSupervisoryRights(Long userId); void verify(User user); static final String USER_DATA_LENGTH_INCORRECT; static final String SUPERVISOR_USER_NOT_FOUND; static final String DUPLICATE_EMPLOYEE_ID_FOUND; static final String DUPLICATE_EMAIL_FOUND; static final String DUPLICATE_USER_NAME_FOUND; }