fix test case

This commit is contained in:
Grahame Grieve 2019-09-18 00:23:01 +10:00
parent e998722d1b
commit d857d546e5
1 changed files with 1 additions and 1 deletions

View File

@ -302,7 +302,7 @@ public class ValidationTestSuite implements IEvaluationContext, IValidatorResour
public Element fetch(Object appContext, String url) throws FHIRFormatError, DefinitionException, IOException, FHIRException { public Element fetch(Object appContext, String url) throws FHIRFormatError, DefinitionException, IOException, FHIRException {
if (url.equals("Patient/test")) if (url.equals("Patient/test"))
return new ObjectConverter(TestingUtilities.context()).convert(new Patient()); return new ObjectConverter(TestingUtilities.context()).convert(new Patient());
String filename = TestingUtilities.resourceNameToFile("validation-examples", url.replace("/", "-")); String filename = TestingUtilities.resourceNameToFile("validation-examples", url.replace("/", "-").toLowerCase());
if (new File(filename+".json").exists()) if (new File(filename+".json").exists())
return Manager.makeParser(TestingUtilities.context(), FhirFormat.JSON).parse(new FileInputStream(filename+".json")); return Manager.makeParser(TestingUtilities.context(), FhirFormat.JSON).parse(new FileInputStream(filename+".json"));
if (new File(filename+".xml").exists()) if (new File(filename+".xml").exists())