use of com.b2international.snowowl.fhir.core.model.conceptmap.Target in project snow-owl by b2ihealthcare.
the class TargetTest method deserialize.
@Test
public void deserialize() throws Exception {
Target readTarget = objectMapper.readValue(objectMapper.writeValueAsString(target), Target.class);
validate(readTarget);
}
use of com.b2international.snowowl.fhir.core.model.conceptmap.Target in project snow-owl by b2ihealthcare.
the class TargetTest method serializeWithMissingOptionalFields.
@Test
public void serializeWithMissingOptionalFields() throws Exception {
Target target = Target.builder().build();
JsonPath jsonPath = getJsonPath(target);
assertNull(jsonPath.get("code"));
assertNull(jsonPath.get("display"));
assertNull(jsonPath.get("equivalence"));
assertNull(jsonPath.get("comment"));
assertNull(jsonPath.get("dependsOn"));
assertNull(jsonPath.get("product"));
}
use of com.b2international.snowowl.fhir.core.model.conceptmap.Target in project snow-owl by b2ihealthcare.
the class ConceptMapElementTest method validate.
private void validate(ConceptMapElement element) {
assertEquals("Code", element.getCode().getCodeValue());
assertEquals("Display", element.getDisplay());
Target target = element.getTargets().iterator().next();
assertEquals("TargetDisplay", target.getDisplay());
assertEquals("TargetCode", target.getCode().getCodeValue());
}