Пример #1
0
 @Test
 public void failLogin() throws UserException {
   userService.addUser("joel", "password");
   assertFalse(userService.checkLogin("joel", "joel"));
 }
Пример #2
0
 @Test
 public void succesfulLogin() throws UserException {
   userService.addUser("joris", "password");
   assertTrue(userService.checkLogin("joris", "password"));
 }
Пример #3
0
 @Test(expected = UserException.class)
 public void registerExistingUser() throws UserException {
   userService.addUser("keke", "password");
   userService.addUser("keke", "password");
 }
Пример #4
0
 @Test
 public void getExistingUser() throws UserException {
   userService.addUser("robin", "password");
   assertNotNull(userService.getUser("robin"));
 }
Пример #5
0
 @Test
 public void registerUnexistingUser() throws UserException {
   userService.addUser("gijs.muys", "password");
   assertNotNull(userService.getUser("gijs.muys"));
 }