Last active
April 8, 2018 14:41
-
-
Save aritraroy/c7c099eaaae95e2a4316120c8f460fe2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment