Examples of UserDTO


Examples of org.apache.ace.useradmin.ui.editor.UserDTO

        m_userEditor.removeUser(userDTO);
    }

    public void testAddUserWithEmptyUsername() throws Exception {
        try {
            UserDTO userDTO = new UserDTO("", "tran", "TestGroup");
            m_userEditor.addUser(userDTO);
        }
        catch (IllegalArgumentException ex) {
            assertEquals("Username, password and groupname cannot be null or \"\"", ex.getMessage());
        }
View Full Code Here

Examples of org.apache.ace.useradmin.ui.editor.UserDTO

        }
    }

    public void testAddUserWithNullUsername() throws Exception {
        try {
            UserDTO userDTO = new UserDTO(null, "tran", "TestGroup");
            m_userEditor.addUser(userDTO);
        }
        catch (IllegalArgumentException ex) {
            assertEquals("Username, password and groupname cannot be null or \"\"", ex.getMessage());
        }
View Full Code Here

Examples of org.apache.ace.useradmin.ui.editor.UserDTO

        }
    }

    public void testAddUserToNonExistingGroup() throws Exception {
        try {
            UserDTO userDTO = new UserDTO("tran", "bob", "nonexistingGroup");
            m_userEditor.addUser(userDTO);
        }
        catch (Exception ex) {
            assertEquals("Group: nonexistingGroup not found", ex.getMessage());
        }
View Full Code Here

Examples of org.apache.ace.useradmin.ui.editor.UserDTO

        }
    }

    public void testAddUserToNullGroup() throws Exception {
        try {
            UserDTO userDTO = new UserDTO("tran", "bob", null);
            m_userEditor.addUser(userDTO);
        }
        catch (IllegalArgumentException ex) {
            assertEquals("Username, password and groupname cannot be null or \"\"", ex.getMessage());
        }
View Full Code Here

Examples of org.apache.ace.useradmin.ui.editor.UserDTO

        }
    }

    public void testAddUserToEmptyGroupname() throws Exception {
        try {
            UserDTO userDTO = new UserDTO("tran", "bob", "");
            m_userEditor.addUser(userDTO);
        }
        catch (Exception ex) {
            assertEquals("Username, password and groupname cannot be null or \"\"", ex.getMessage());
        }
View Full Code Here

Examples of org.apache.openmeetings.data.beans.user.UserDTO

  public UserSearchResult(SearchResult<User> copy) {
    this.objectName = copy.getObjectName();
    this.records = copy.getRecords();
    this.result = new ArrayList<UserDTO>(copy.getResult().size());
    for (User u : copy.getResult()) {
      result.add(new UserDTO(u));
    }
    this.errorId = copy.getErrorId();
  }
View Full Code Here

Examples of org.baeldung.persistence.service.UserDto

    public void initialize(PasswordMatches constraintAnnotation) {
    }

    @Override
    public boolean isValid(Object obj, ConstraintValidatorContext context) {
        UserDto user = (UserDto) obj;
        return user.getPassword().equals(user.getMatchingPassword());
    }
View Full Code Here

Examples of org.brixcms.rmiserver.UserService.UserDto

            }
        }
    }

    private void bootstrapUsers() {
        UserDto dto = new UserDto();
        dto.login = "admin";
        dto.password = "admin";
        dto.roles.add(Role.ADMIN);
        userService.create(dto);
View Full Code Here

Examples of org.camunda.bpm.engine.rest.dto.identity.UserDto

    client.destroy();
  }

  public void createInitialUser(String id, String password, String firstName, String lastName) {

    UserDto user = new UserDto();
    UserCredentialsDto credentials = new UserCredentialsDto();
    credentials.setPassword(password);
    user.setCredentials(credentials);
    UserProfileDto profile = new UserProfileDto();
    profile.setId(id);
    profile.setFirstName(firstName);
    profile.setLastName(lastName);
    user.setProfile(profile);

    WebResource webResource = client.resource(testProperties.getApplicationPath("/camunda/api/admin/setup/default/user/create"));
    ClientResponse clientResponse = webResource.accept(MediaType.APPLICATION_JSON).type(MediaType.APPLICATION_JSON).post(ClientResponse.class, user);
    try {
      if (clientResponse.getResponseStatus() != Response.Status.NO_CONTENT) {
View Full Code Here

Examples of org.camunda.bpm.engine.rest.dto.identity.UserDto

  @Test
  public void testCreateNewUserWithCredentials() {
    User newUser = MockProvider.createMockUser();
    when(identityServiceMock.newUser(MockProvider.EXAMPLE_USER_ID)).thenReturn(newUser);

    UserDto userDto = UserDto.fromUser(newUser, true);

    given()
        .body(userDto).contentType(ContentType.JSON)
    .expect()
        .statusCode(Status.NO_CONTENT.getStatusCode())
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.