Search in sources :

Example 1 with CreateNewProjectAction

use of edu.stanford.bmir.protege.web.shared.project.CreateNewProjectAction in project webprotege by protegeproject.

the class CreateNewProjectActionHandler_TestCase method shouldNotAllowGuestsToCreateProjects.

@Test
public void shouldNotAllowGuestsToCreateProjects() {
    when(userId.isGuest()).thenReturn(true);
    CreateNewProjectAction action = new CreateNewProjectAction(newProjectSettings);
    RequestValidator validator = handler.getRequestValidator(action, requestContext);
    RequestValidationResult validationResult = validator.validateAction();
    assertThat(validationResult.isValid(), is(false));
}
Also used : CreateNewProjectAction(edu.stanford.bmir.protege.web.shared.project.CreateNewProjectAction) RequestValidationResult(edu.stanford.bmir.protege.web.server.dispatch.RequestValidationResult) RequestValidator(edu.stanford.bmir.protege.web.server.dispatch.RequestValidator) Test(org.junit.Test)

Aggregations

RequestValidationResult (edu.stanford.bmir.protege.web.server.dispatch.RequestValidationResult)1 RequestValidator (edu.stanford.bmir.protege.web.server.dispatch.RequestValidator)1 CreateNewProjectAction (edu.stanford.bmir.protege.web.shared.project.CreateNewProjectAction)1 Test (org.junit.Test)1