Package org.camunda.bpm.engine.rest.dto.authorization

Examples of org.camunda.bpm.engine.rest.dto.authorization.AuthorizationDto


    AuthorizationQuery authorizationQuery = mock(AuthorizationQuery.class);
    when(authorizationServiceMock.createAuthorizationQuery()).thenReturn(authorizationQuery);
    when(authorizationQuery.authorizationId(MockProvider.EXAMPLE_AUTHORIZATION_ID)).thenReturn(authorizationQuery);
    when(authorizationQuery.singleResult()).thenReturn(authorization);
   
    AuthorizationDto dto = AuthorizationDto.fromAuthorization(authorization);
   
    given()
        .body(dto).contentType(ContentType.JSON)
    .then().expect()
        .statusCode(Status.OK.getStatusCode())
View Full Code Here


    AuthorizationQuery authorizationQuery = mock(AuthorizationQuery.class);
    when(authorizationServiceMock.createAuthorizationQuery()).thenReturn(authorizationQuery);
    when(authorizationQuery.authorizationId(MockProvider.EXAMPLE_AUTHORIZATION_ID)).thenReturn(authorizationQuery);
    when(authorizationQuery.singleResult()).thenReturn(authorization);
   
    AuthorizationDto dto = AuthorizationDto.fromAuthorization(authorization);
   
    given()
        .body(dto).contentType(ContentType.JSON)
    .then().expect()
        .statusCode(Status.OK.getStatusCode())
View Full Code Here

    AuthorizationQuery authorizationQuery = mock(AuthorizationQuery.class);
    when(authorizationServiceMock.createAuthorizationQuery()).thenReturn(authorizationQuery);
    when(authorizationQuery.authorizationId(MockProvider.EXAMPLE_AUTHORIZATION_ID)).thenReturn(authorizationQuery);
    when(authorizationQuery.singleResult()).thenReturn(authorization);
   
    AuthorizationDto dto = AuthorizationDto.fromAuthorization(authorization);
   
    given()
        .body(dto).contentType(ContentType.JSON)
    .then().expect()
        .statusCode(Status.OK.getStatusCode())
View Full Code Here

    AuthorizationQuery authorizationQuery = mock(AuthorizationQuery.class);
    when(authorizationServiceMock.createAuthorizationQuery()).thenReturn(authorizationQuery);
    when(authorizationQuery.authorizationId(MockProvider.EXAMPLE_AUTHORIZATION_ID)).thenReturn(authorizationQuery);
    when(authorizationQuery.singleResult()).thenReturn(authorization);
    
    AuthorizationDto dto = AuthorizationDto.fromAuthorization(authorization);
   
    given()
        .pathParam("id", MockProvider.EXAMPLE_AUTHORIZATION_ID)
        .body(dto).contentType(ContentType.JSON)
    .then().expect()
        .statusCode(Status.NO_CONTENT.getStatusCode())
    .when()
        .put(AUTH_RESOURCE_PATH);
   
    verify(authorizationQuery).authorizationId(MockProvider.EXAMPLE_AUTHORIZATION_ID);
   
    verify(authorization).setGroupId(dto.getGroupId());
    verify(authorization).setUserId(dto.getUserId());
    verify(authorization).setResourceId(dto.getResourceId());
    verify(authorization).setResourceType(dto.getResourceType());
   
    verify(authorizationServiceMock).saveAuthorization(authorization);
   
  }
View Full Code Here

    AuthorizationQuery authorizationQuery = mock(AuthorizationQuery.class);
    when(authorizationServiceMock.createAuthorizationQuery()).thenReturn(authorizationQuery);
    when(authorizationQuery.authorizationId(MockProvider.EXAMPLE_AUTHORIZATION_ID)).thenReturn(authorizationQuery);
    when(authorizationQuery.singleResult()).thenReturn(null);
   
    AuthorizationDto dto = AuthorizationDto.fromAuthorization(authorization);
   
    given()
        .pathParam("id", MockProvider.EXAMPLE_AUTHORIZATION_ID)
        .body(dto).contentType(ContentType.JSON)
    .then().expect()
View Full Code Here

TOP

Related Classes of org.camunda.bpm.engine.rest.dto.authorization.AuthorizationDto

Copyright © 2018 www.massapicom. 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.