use of org.drools.workbench.services.verifier.api.client.index.ObjectType in project drools-wb by kiegroup.
the class QueryableIndexTest method makeSureFirstAndLastObjectTypesAreTheSame.
@Test
public void makeSureFirstAndLastObjectTypesAreTheSame() throws Exception {
queryableIndex.getObjectTypes().where(ObjectType.type().is("Person")).select().first(objectTypeQueryCallback);
verify(objectTypeQueryCallback).callback(objectTypeArgumentCaptor.capture());
final ObjectType first = objectTypeArgumentCaptor.getValue();
reset(objectTypeQueryCallback);
queryableIndex.getObjectTypes().where(ObjectType.type().is("Person")).select().last(objectTypeQueryCallback);
verify(objectTypeQueryCallback).callback(objectTypeArgumentCaptor.capture());
final ObjectType last = objectTypeArgumentCaptor.getValue();
assertEquals("Person", first.getType());
assertEquals(first, last);
}
Aggregations