use of edu.stanford.bmir.protege.web.shared.entity.EntityLookupRequest in project webprotege by protegeproject.
the class EntityLookupRequestTestCase method getSearchedEntityTypesReturnsCopy.
@Test
public void getSearchedEntityTypesReturnsCopy() {
Set<EntityType<?>> types = new HashSet<EntityType<?>>();
types.add(EntityType.CLASS);
EntityLookupRequest request = new EntityLookupRequest("Test", SearchType.SUB_STRING_MATCH_IGNORE_CASE, 20, types);
request.getSearchedEntityTypes().add(EntityType.OBJECT_PROPERTY);
assertEquals(types, request.getSearchedEntityTypes());
}
use of edu.stanford.bmir.protege.web.shared.entity.EntityLookupRequest in project webprotege by protegeproject.
the class EntityLookupRequestTestCase method getSearchTypeReturnsSuppliedType.
@Test
public void getSearchTypeReturnsSuppliedType() {
EntityLookupRequest request = new EntityLookupRequest("Test", SearchType.SUB_STRING_MATCH_IGNORE_CASE, 5, Arrays.asList(EntityType.CLASS));
assertEquals(SearchType.SUB_STRING_MATCH_IGNORE_CASE, request.getSearchType());
}
use of edu.stanford.bmir.protege.web.shared.entity.EntityLookupRequest in project webprotege by protegeproject.
the class EntityLookupRequestTestCase method equalArgsGiveEqualRequests.
@Test
public void equalArgsGiveEqualRequests() {
EntityLookupRequest requestA = new EntityLookupRequest("Test", SearchType.SUB_STRING_MATCH_IGNORE_CASE, 5, Arrays.asList(EntityType.CLASS));
EntityLookupRequest requestB = new EntityLookupRequest("Test", SearchType.SUB_STRING_MATCH_IGNORE_CASE, 5, Arrays.asList(EntityType.CLASS));
assertEquals(requestA.hashCode(), requestB.hashCode());
assertEquals(requestA, requestB);
}
use of edu.stanford.bmir.protege.web.shared.entity.EntityLookupRequest in project webprotege by protegeproject.
the class EntityLookupRequestTestCase method defaultSearchTypeIsTheSameAsSearchTypeDefault.
@Test
public void defaultSearchTypeIsTheSameAsSearchTypeDefault() {
EntityLookupRequest request = new EntityLookupRequest("Test");
assertEquals(SearchType.getDefault(), request.getSearchType());
}
use of edu.stanford.bmir.protege.web.shared.entity.EntityLookupRequest in project webprotege by protegeproject.
the class EntityLookupRequestTestCase method getSearchStringReturnsSuppliedString.
@Test
public void getSearchStringReturnsSuppliedString() {
EntityLookupRequest request = new EntityLookupRequest("Test");
assertEquals("Test", request.getSearchString());
}
Aggregations