use of com.b2international.commons.json.Json in project snow-owl by b2ihealthcare.
the class SnomedRelationshipApiTest method createRelationshipInvalidModule.
@Test
public void createRelationshipInvalidModule() {
Json requestBody = createRelationshipRequestBody(Concepts.ROOT_CONCEPT, Concepts.PART_OF, Concepts.NAMESPACE_ROOT, "11110000").with("commitComment", "Created new relationship with invalid moduleId");
createComponent(branchPath, SnomedComponentType.RELATIONSHIP, requestBody).statusCode(400);
}
use of com.b2international.commons.json.Json in project snow-owl by b2ihealthcare.
the class SnomedRelationshipApiTest method changeRelationshipCharacteristicType.
@Test
public void changeRelationshipCharacteristicType() {
String relationshipId = createNewRelationship(branchPath);
Json requestBody = Json.object("characteristicTypeId", Concepts.ADDITIONAL_RELATIONSHIP, "commitComment", "Updated relationship characteristic type");
updateComponent(branchPath, SnomedComponentType.RELATIONSHIP, relationshipId, requestBody).statusCode(204);
getComponent(branchPath, SnomedComponentType.RELATIONSHIP, relationshipId).statusCode(200).body("characteristicTypeId", equalTo(Concepts.ADDITIONAL_RELATIONSHIP));
}
use of com.b2international.commons.json.Json in project snow-owl by b2ihealthcare.
the class SnomedRelationshipApiTest method createRelationshipInferred.
@Test
public void createRelationshipInferred() {
Json requestBody = createRelationshipRequestBody(Concepts.ROOT_CONCEPT, Concepts.PART_OF, Concepts.NAMESPACE_ROOT, Concepts.INFERRED_RELATIONSHIP).with("commitComment", "Created new relationship with inferred characteristic type");
String relationshipId = assertCreated(createComponent(branchPath, SnomedComponentType.RELATIONSHIP, requestBody));
SnomedRelationship relationship = getComponent(branchPath, SnomedComponentType.RELATIONSHIP, relationshipId, "source()", "type()", "destination()", "characteristicType()", "modifier()").statusCode(200).extract().as(SnomedRelationship.class);
assertEquals(Concepts.INFERRED_RELATIONSHIP, relationship.getCharacteristicType().getId());
assertEquals(Concepts.ROOT_CONCEPT, relationship.getSource().getId());
assertEquals(Concepts.PART_OF, relationship.getType().getId());
assertEquals(Concepts.NAMESPACE_ROOT, relationship.getDestination().getId());
assertEquals(Concepts.EXISTENTIAL_RESTRICTION_MODIFIER, relationship.getModifier().getId());
}
use of com.b2international.commons.json.Json in project snow-owl by b2ihealthcare.
the class SnomedRelationshipApiTest method createRelationshipInvalidSource.
@Test
public void createRelationshipInvalidSource() {
Json requestBody = createRelationshipRequestBody("11110000", Concepts.PART_OF, Concepts.NAMESPACE_ROOT).with("commitComment", "Created new relationship with invalid sourceId");
createComponent(branchPath, SnomedComponentType.RELATIONSHIP, requestBody).statusCode(400);
}
use of com.b2international.commons.json.Json in project snow-owl by b2ihealthcare.
the class BundleRestApiTest method createBundle_OK.
@Test
public void createBundle_OK() throws JsonProcessingException {
final Json body = prepareBundleCreateRequestBody("b1");
createBundle(body);
getBundle("b1");
}
Aggregations