Search in sources :

Example 1 with GetPersonIdItemsResult

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

the class GetPersonIdItemsActionHandler_TestCase method shouldOnlyMatchExact.

@Test
public void shouldOnlyMatchExact() {
    when(action.getItemNames()).thenReturn(Arrays.asList("John Smith"));
    GetPersonIdItemsResult result = actionHandler.execute(action, mock(ExecutionContext.class));
    assertThat(result.getItems(), hasItems(new PersonId(johnSmith_UpperCase.getUserName())));
}
Also used : ExecutionContext(edu.stanford.bmir.protege.web.server.dispatch.ExecutionContext) PersonId(edu.stanford.bmir.protege.web.shared.sharing.PersonId) GetPersonIdItemsResult(edu.stanford.bmir.protege.web.shared.itemlist.GetPersonIdItemsResult) Test(org.junit.Test)

Aggregations

ExecutionContext (edu.stanford.bmir.protege.web.server.dispatch.ExecutionContext)1 GetPersonIdItemsResult (edu.stanford.bmir.protege.web.shared.itemlist.GetPersonIdItemsResult)1 PersonId (edu.stanford.bmir.protege.web.shared.sharing.PersonId)1 Test (org.junit.Test)1