use of org.ehrbase.validation.terminology.FhirTerminologyValidation in project openEHR_SDK by ehrbase.
the class DvCodedTextTest method testFailOnError_Disabled.
@Test
void testFailOnError_Disabled() throws Exception {
var validationSupport = new FhirTerminologyValidation("https://wrong.terminology.server/fhir");
var codePhrase = new CodePhrase(new TerminologyId("http://hl7.org/fhir/observation-status"), "B");
var dvCodedText = new DvCodedText("Buccal", codePhrase);
var validator = new DvCodedTextValidator(validationSupport);
var node = parseNode("/webtemplate_nodes/dv_codedtext_fhir_valueset.json");
assertThrows(ExternalTerminologyValidationException.class, () -> validator.validate(dvCodedText, node));
}
use of org.ehrbase.validation.terminology.FhirTerminologyValidation in project openEHR_SDK by ehrbase.
the class DvCodedTextTest method testFailOnError_Enabled.
@Test
void testFailOnError_Enabled() throws Exception {
var validationSupport = new FhirTerminologyValidation("https://wrong.terminology.server/fhir");
var codePhrase = new CodePhrase(new TerminologyId("http://hl7.org/fhir/observation-status"), "B");
var dvCodedText = new DvCodedText("Buccal", codePhrase);
var validator = new DvCodedTextValidator(validationSupport);
var node = parseNode("/webtemplate_nodes/dv_codedtext_fhir_valueset.json");
assertThrows(ExternalTerminologyValidationException.class, () -> validator.validate(dvCodedText, node));
}
Aggregations