Search in sources :

Example 1 with RequestContext

use of edu.stanford.bmir.protege.web.server.dispatch.RequestContext in project webprotege by protegeproject.

the class GetProjectPermissionsActionHandler_TestCase method shouldAllowAnyOneToRetrievePermissions.

@Test
public void shouldAllowAnyOneToRetrievePermissions() {
    RequestContext requestContext = mock(RequestContext.class);
    when(requestContext.getUserId()).thenReturn(UserId.getGuest());
    RequestValidator validator = handler.getRequestValidator(action, requestContext);
    assertThat(validator.validateAction().isValid(), is(true));
}
Also used : RequestValidator(edu.stanford.bmir.protege.web.server.dispatch.RequestValidator) RequestContext(edu.stanford.bmir.protege.web.server.dispatch.RequestContext) Test(org.junit.Test)

Aggregations

RequestContext (edu.stanford.bmir.protege.web.server.dispatch.RequestContext)1 RequestValidator (edu.stanford.bmir.protege.web.server.dispatch.RequestValidator)1 Test (org.junit.Test)1