Beispiel #1
0
 @Test(expected = ValidationException.class)
 public void nullPasswordRequest() {
   CreateUserRequest request = new CreateUserRequest();
   request.setUser(getUser());
   request.setPassword(new PasswordRequest());
   userService.createUser(request, Role.authenticated);
 }
Beispiel #2
0
 @Test(expected = ValidationException.class)
 public void nullEmailAndUsernameRequest() {
   CreateUserRequest request = new CreateUserRequest();
   ExternalUser user =
       ExternalUserBuilder.create().withFirstName("John").withLastName("Smith").build();
   request.setUser(user);
   request.setPassword(new PasswordRequest("password"));
   userService.createUser(request, Role.authenticated);
 }
Beispiel #3
0
 @Test(expected = ValidationException.class)
 public void badNameRequest() {
   CreateUserRequest request = new CreateUserRequest();
   ExternalUser user = getUser();
   user.setFirstName(RandomStringUtils.random(101));
   request.setUser(user);
   request.setPassword(new PasswordRequest());
   userService.createUser(request, Role.authenticated);
 }