Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Test
- public void login_successIfUserNameAndPasswordIsValid() {
- // Arrange
- String username = "username";
- String password = "password";
- when(userRepository.isUsernameValid(username)).thenReturn(true);
- when(userRepository.isPasswordValid(password)).thenReturn(true);
- // Act
- boolean result = authenticator.login(username, password);
- // Assert
- assertTrue(result);
- }
Add Comment
Please, Sign In to add comment