Search in sources :

Example 1 with ConceptMapElement

use of com.b2international.snowowl.fhir.core.model.conceptmap.ConceptMapElement in project snow-owl by b2ihealthcare.

the class ConceptMapElementTest method serializeWithMissingOptionalFields.

@Test
public void serializeWithMissingOptionalFields() throws Exception {
    ConceptMapElement element = ConceptMapElement.builder().build();
    JsonPath jsonPath = getJsonPath(element);
    assertNull(jsonPath.get("code"));
    assertNull(jsonPath.get("display"));
    assertNull(jsonPath.get("target"));
    assertNull(jsonPath.get("target"));
}
Also used : ConceptMapElement(com.b2international.snowowl.fhir.core.model.conceptmap.ConceptMapElement) JsonPath(io.restassured.path.json.JsonPath) FhirTest(com.b2international.snowowl.fhir.tests.FhirTest) Test(org.junit.Test)

Example 2 with ConceptMapElement

use of com.b2international.snowowl.fhir.core.model.conceptmap.ConceptMapElement in project snow-owl by b2ihealthcare.

the class ConceptMapElementTest method deserialize.

@Test
public void deserialize() throws Exception {
    ConceptMapElement readElement = objectMapper.readValue(objectMapper.writeValueAsString(element), ConceptMapElement.class);
    validate(readElement);
}
Also used : ConceptMapElement(com.b2international.snowowl.fhir.core.model.conceptmap.ConceptMapElement) FhirTest(com.b2international.snowowl.fhir.tests.FhirTest) Test(org.junit.Test)

Aggregations

ConceptMapElement (com.b2international.snowowl.fhir.core.model.conceptmap.ConceptMapElement)2 FhirTest (com.b2international.snowowl.fhir.tests.FhirTest)2 Test (org.junit.Test)2 JsonPath (io.restassured.path.json.JsonPath)1