use of com.b2international.snowowl.snomed.reasoner.index.RelationshipChangeDocument in project snow-owl by b2ihealthcare.
the class RelationshipChangeSerializationTest method indexNewRelationship.
@Test
public void indexNewRelationship() throws Exception {
final String classificationId = randomUUID();
final RelationshipChangeDocument expected = RelationshipChangeDocument.builder().characteristicTypeId(Concepts.INFERRED_RELATIONSHIP).classificationId(classificationId).destinationId("destinationId").group(1).nature(ChangeNature.NEW).relationshipId("12345678901").released(Boolean.FALSE).sourceId("sourceId").typeId("typeId").unionGroup(2).build();
indexDocument(expected);
final RelationshipChangeDocument actual = rawIndex().read(r -> r.search(Query.select(RelationshipChangeDocument.class).where(Expressions.matchAll()).build()).first());
assertDocEquals(expected, actual);
}
use of com.b2international.snowowl.snomed.reasoner.index.RelationshipChangeDocument in project snow-owl by b2ihealthcare.
the class RelationshipChangeSerializationTest method indexUpdatedRelationship.
@Test
public void indexUpdatedRelationship() throws Exception {
final String classificationId = randomUUID();
final RelationshipChangeDocument expected = RelationshipChangeDocument.builder().classificationId(classificationId).destinationId("destinationId").group(50).nature(ChangeNature.UPDATED).relationshipId("12345678901").released(Boolean.TRUE).sourceId("sourceId").build();
indexDocument(expected);
final RelationshipChangeDocument actual = rawIndex().read(r -> r.search(Query.select(RelationshipChangeDocument.class).where(Expressions.matchAll()).build()).first());
assertDocEquals(expected, actual);
}
use of com.b2international.snowowl.snomed.reasoner.index.RelationshipChangeDocument in project snow-owl by b2ihealthcare.
the class RelationshipChangeSerializationTest method indexRedundantRelationship.
@Test
public void indexRedundantRelationship() throws Exception {
final String classificationId = randomUUID();
final RelationshipChangeDocument expected = RelationshipChangeDocument.builder().classificationId(classificationId).destinationId("destinationId").nature(ChangeNature.REDUNDANT).relationshipId("12345678901").released(Boolean.TRUE).sourceId("sourceId").build();
indexDocument(expected);
final RelationshipChangeDocument actual = rawIndex().read(r -> r.search(Query.select(RelationshipChangeDocument.class).where(Expressions.matchAll()).build()).first());
assertDocEquals(expected, actual);
}
Aggregations