fix path problem

This commit is contained in:
Grahame Grieve 2020-05-29 13:57:53 +10:00
parent dab9a7d4cd
commit a3d60843e4
1 changed files with 8 additions and 0 deletions

View File

@ -521,6 +521,7 @@ public class SnapShotGenerationTestsX {
}
if (output.getDifferential().hasElement()) {
RenderingContext rc = new RenderingContext(TestingUtilities.context(), null, null, "http://hl7.org/fhir", "", null, ResourceRendererMode.RESOURCE);
rc.setDestDir(makeTempDir());
rc.setProfileUtilities(new ProfileUtilities(TestingUtilities.context(), null, new TestPKP()));
RendererFactory.factory(output, rc).render(output);
}
@ -540,6 +541,13 @@ public class SnapShotGenerationTestsX {
}
}
private String makeTempDir() throws IOException {
String path = Utilities.path("[tmp]", "snapshot");
Utilities.createDirectory(path);
return path;
}
private StructureDefinition getSD(String url) throws DefinitionException, FHIRException, IOException {
StructureDefinition sd = context.getByUrl(url);
if (sd == null)