use of com.evolveum.midpoint.repo.sqale.qmodel.object.MObject in project midpoint by Evolveum.
the class SqaleRepoSearchTest method test921SearchAssignmentHolderTypeFindsAllObjectsExceptShadows.
@Test
public void test921SearchAssignmentHolderTypeFindsAllObjectsExceptShadows() throws SchemaException {
OperationResult operationResult = createOperationResult();
given("query without any filter");
ObjectQuery query = prismContext.queryFor(ObjectType.class).build();
when("search is called with AssignmentHolderType");
SearchResultList<AssignmentHolderType> result = searchObjects(AssignmentHolderType.class, query, operationResult);
then("all repository objects except shadows are returned");
QObject<MObject> o = aliasFor(QObject.CLASS);
assertThat(result).hasSize((int) count(o, o.objectType.ne(MObjectType.SHADOW)));
assertThat(result).hasSize((int) count(QAssignmentHolder.CLASS));
// without additional objects the test would be meaningless
assertThat(result).hasSizeLessThan((int) count(o));
}
Aggregations