예제 #1
0
 @Test
 public void getExistingUser() throws UserException {
   userService.addUser("robin", "password");
   assertNotNull(userService.getUser("robin"));
 }
예제 #2
0
 @Test(expected = UserException.class)
 public void getUnexistingUser() throws UserException {
   userService.getUser("mathias");
 }
예제 #3
0
 @Test
 public void registerUnexistingUser() throws UserException {
   userService.addUser("gijs.muys", "password");
   assertNotNull(userService.getUser("gijs.muys"));
 }