use of com.evolveum.midpoint.prism.query.builder.S_FilterExit in project midpoint by Evolveum.
the class SqaleRepoBaseTest method searchObjectTest.
protected <T extends ObjectType> SearchResultList<T> searchObjectTest(String description, Class<T> type, Function<S_FilterEntryOrEmpty, S_FilterExit> filter, String... expectedOids) throws SchemaException {
String typeName = type.getSimpleName().replaceAll("Type$", "").toLowerCase();
when("searching for " + typeName + "(s) " + description);
OperationResult operationResult = createOperationResult();
SearchResultList<T> result = searchObjects(type, filter.apply(prismContext.queryFor(type)).build(), operationResult);
then(typeName + "(s) " + description + " are returned");
assertThatOperationResult(operationResult).isSuccess();
assertThat(result).extracting(o -> o.getOid()).containsExactlyInAnyOrder(expectedOids);
return result;
}
Aggregations