Search in sources :

Example 1 with ConcreteDomainChangeDocument

use of com.b2international.snowowl.snomed.reasoner.index.ConcreteDomainChangeDocument in project snow-owl by b2ihealthcare.

the class ConcreteDomainChangeSerializationTest method indexUpdatedConcreteDomain.

@Test
public void indexUpdatedConcreteDomain() throws Exception {
    final String classificationId = randomUUID();
    final ConcreteDomainChangeDocument expected = ConcreteDomainChangeDocument.builder().classificationId(classificationId).memberId(randomUUID()).nature(ChangeNature.UPDATED).referencedComponentId("12345678901").released(Boolean.TRUE).serializedValue("500").build();
    indexDocument(expected);
    final ConcreteDomainChangeDocument actual = rawIndex().read(r -> r.search(Query.select(ConcreteDomainChangeDocument.class).where(Expressions.matchAll()).build()).first());
    assertDocEquals(expected, actual);
}
Also used : ConcreteDomainChangeDocument(com.b2international.snowowl.snomed.reasoner.index.ConcreteDomainChangeDocument) BaseRevisionIndexTest(com.b2international.index.revision.BaseRevisionIndexTest) Test(org.junit.Test)

Example 2 with ConcreteDomainChangeDocument

use of com.b2international.snowowl.snomed.reasoner.index.ConcreteDomainChangeDocument in project snow-owl by b2ihealthcare.

the class ConcreteDomainChangeSerializationTest method indexNewConcreteDomain.

@Test
public void indexNewConcreteDomain() throws Exception {
    final String classificationId = randomUUID();
    final ConcreteDomainChangeDocument expected = ConcreteDomainChangeDocument.builder().characteristicTypeId(Concepts.INFERRED_RELATIONSHIP).classificationId(classificationId).group(1).memberId(randomUUID()).nature(ChangeNature.NEW).referencedComponentId("12345678901").released(Boolean.FALSE).serializedValue("500").build();
    indexDocument(expected);
    final ConcreteDomainChangeDocument actual = rawIndex().read(r -> r.search(Query.select(ConcreteDomainChangeDocument.class).where(Expressions.matchAll()).build()).first());
    assertDocEquals(expected, actual);
}
Also used : ConcreteDomainChangeDocument(com.b2international.snowowl.snomed.reasoner.index.ConcreteDomainChangeDocument) BaseRevisionIndexTest(com.b2international.index.revision.BaseRevisionIndexTest) Test(org.junit.Test)

Example 3 with ConcreteDomainChangeDocument

use of com.b2international.snowowl.snomed.reasoner.index.ConcreteDomainChangeDocument in project snow-owl by b2ihealthcare.

the class ConcreteDomainChangeSerializationTest method indexRedundantConcreteDomain.

@Test
public void indexRedundantConcreteDomain() throws Exception {
    final String classificationId = randomUUID();
    final ConcreteDomainChangeDocument expected = ConcreteDomainChangeDocument.builder().classificationId(classificationId).memberId(randomUUID()).nature(ChangeNature.REDUNDANT).referencedComponentId("12345678901").released(Boolean.TRUE).build();
    indexDocument(expected);
    final ConcreteDomainChangeDocument actual = rawIndex().read(r -> r.search(Query.select(ConcreteDomainChangeDocument.class).where(Expressions.matchAll()).build()).first());
    assertDocEquals(expected, actual);
}
Also used : ConcreteDomainChangeDocument(com.b2international.snowowl.snomed.reasoner.index.ConcreteDomainChangeDocument) BaseRevisionIndexTest(com.b2international.index.revision.BaseRevisionIndexTest) Test(org.junit.Test)

Aggregations

BaseRevisionIndexTest (com.b2international.index.revision.BaseRevisionIndexTest)3 ConcreteDomainChangeDocument (com.b2international.snowowl.snomed.reasoner.index.ConcreteDomainChangeDocument)3 Test (org.junit.Test)3