use of com.vaticle.typedb.core.test.behaviour.reasoner.verification.Materialiser in project grakn by graknlabs.
the class MaterialiserTest method testDeduplicationOfInferredConcepts.
@Test
public void testDeduplicationOfInferredConcepts() {
loadTransitivityExample(databaseMgr);
try (CoreSession session = databaseMgr.session(database, Arguments.Session.Type.DATA)) {
Materialiser materialiser = Materialiser.materialise(session);
TypeQLMatch inferredAnswersQuery = TypeQL.match(TypeQL.var("lh").isa("location-hierarchy"));
List<ConceptMap> inferredAnswers = iterate(materialiser.query(inferredAnswersQuery).entrySet()).flatMap(Map.Entry::getValue).toList();
assertEquals(6, inferredAnswers.size());
}
}
Aggregations