From c8e61cd9a372ecbbdaa6dd430d0aa7ee5f2f6580 Mon Sep 17 00:00:00 2001 From: jamesagnew Date: Thu, 15 Feb 2018 07:15:25 -0500 Subject: [PATCH] Fix test for #851 --- .../hapi/validation/FhirInstanceValidatorDstu3Test.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hapi-fhir-validation/src/test/java/org/hl7/fhir/dstu3/hapi/validation/FhirInstanceValidatorDstu3Test.java b/hapi-fhir-validation/src/test/java/org/hl7/fhir/dstu3/hapi/validation/FhirInstanceValidatorDstu3Test.java index b4f5037a231..5e8a98de2e2 100644 --- a/hapi-fhir-validation/src/test/java/org/hl7/fhir/dstu3/hapi/validation/FhirInstanceValidatorDstu3Test.java +++ b/hapi-fhir-validation/src/test/java/org/hl7/fhir/dstu3/hapi/validation/FhirInstanceValidatorDstu3Test.java @@ -414,7 +414,7 @@ public class FhirInstanceValidatorDstu3Test { @Test public void testValidateCoding() { ImagingStudy is = new ImagingStudy(); - is.setUid(IdType.newRandomUuid().getValue()); + is.setUid("urn:oid:1.2.3.4"); is.getPatient().setReference("Patient/1"); is.getModalityListFirstRep().setSystem("http://foo"); @@ -423,7 +423,8 @@ public class FhirInstanceValidatorDstu3Test { ValidationResult results = myVal.validateWithResult(is); List outcome = logResultsAndReturnNonInformationalOnes(results); - assertThat(outcome, empty()); + assertEquals(1, outcome.size()); + assertEquals("The Coding provided is not in the value set http://hl7.org/fhir/ValueSet/dicom-cid29 (http://hl7.org/fhir/ValueSet/dicom-cid29, and a code should come from this value set unless it has no suitable code) (error message = Code http://foo/BAR was not validated because the code system is not present)", outcome.get(0).getMessage()); }