use of com.b2international.snowowl.snomed.core.domain.RelationshipValue in project snow-owl by b2ihealthcare.
the class SnomedRelationshipIndexEntrySerializationTest method indexDecimal.
@Test
public void indexDecimal() throws Exception {
final SnomedRelationshipIndexEntry decimalValue = createBuilder().value(new RelationshipValue(new BigDecimal("3.333"))).build();
indexRevision(RevisionBranch.MAIN_PATH, decimalValue);
final SnomedRelationshipIndexEntry actual = assertDocEquals(decimalValue);
assertEquals(RelationshipValueType.DECIMAL, actual.getValueType());
}
use of com.b2international.snowowl.snomed.core.domain.RelationshipValue in project snow-owl by b2ihealthcare.
the class SnomedConcreteValueApiTest method createConcreteValue.
@Test
public void createConcreteValue() {
Json requestBody = createConcreteValueRequestBody(Concepts.ROOT_CONCEPT, Concepts.PART_OF, new RelationshipValue("string value")).with("commitComment", "Created new concrete value");
createComponent(branchPath, SnomedComponentType.RELATIONSHIP, requestBody).statusCode(201);
}
use of com.b2international.snowowl.snomed.core.domain.RelationshipValue in project snow-owl by b2ihealthcare.
the class SnomedConcreteValueApiTest method createConcreteValueNonExistentBranch.
@Test
public void createConcreteValueNonExistentBranch() {
Json requestBody = createConcreteValueRequestBody(Concepts.ROOT_CONCEPT, Concepts.PART_OF, new RelationshipValue("Hello world!")).with("commitComment", "Created new concrete value on non-existent branch");
createComponent(BranchPathUtils.createPath("MAIN/x/y/z"), SnomedComponentType.RELATIONSHIP, requestBody).statusCode(404);
}
use of com.b2international.snowowl.snomed.core.domain.RelationshipValue in project snow-owl by b2ihealthcare.
the class SnomedConcreteValueApiTest method createConcreteValueInferred.
@Test
public void createConcreteValueInferred() {
Json requestBody = createConcreteValueRequestBody(Concepts.ROOT_CONCEPT, Concepts.PART_OF, new RelationshipValue(7), Concepts.INFERRED_RELATIONSHIP).with("commitComment", "Created new concrete value with inferred characteristic type");
String relationshipId = assertCreated(createComponent(branchPath, SnomedComponentType.RELATIONSHIP, requestBody));
getComponent(branchPath, SnomedComponentType.RELATIONSHIP, relationshipId).statusCode(200).body("characteristicTypeId", equalTo(Concepts.INFERRED_RELATIONSHIP));
}
use of com.b2international.snowowl.snomed.core.domain.RelationshipValue in project snow-owl by b2ihealthcare.
the class SnomedConcreteValueApiTest method createConcreteValueInvalidModule.
@Test
public void createConcreteValueInvalidModule() {
Json requestBody = createConcreteValueRequestBody(Concepts.ROOT_CONCEPT, Concepts.PART_OF, new RelationshipValue(5), Concepts.INFERRED_RELATIONSHIP, 0, "11110000").with("commitComment", "Created new concrete value with invalid moduleId");
createComponent(branchPath, SnomedComponentType.RELATIONSHIP, requestBody).statusCode(400);
}
Aggregations