diff --git a/org.hl7.fhir.r4/src/test/java/org/hl7/fhir/r4/test/JsonDirectTests.java b/org.hl7.fhir.r4/src/test/java/org/hl7/fhir/r4/test/JsonDirectTests.java index 8592d4ca3..ea3f7e1c8 100644 --- a/org.hl7.fhir.r4/src/test/java/org/hl7/fhir/r4/test/JsonDirectTests.java +++ b/org.hl7.fhir.r4/src/test/java/org/hl7/fhir/r4/test/JsonDirectTests.java @@ -12,6 +12,7 @@ import org.hl7.fhir.r4.formats.IParser.OutputStyle; import org.hl7.fhir.r4.formats.JsonParser; import org.hl7.fhir.r4.formats.XmlParser; import org.hl7.fhir.r4.model.Observation; +import org.hl7.fhir.utilities.Utilities; import org.junit.Before; import org.junit.Test; @@ -23,10 +24,10 @@ public class JsonDirectTests { @Test public void test() throws FHIRFormatError, FileNotFoundException, IOException { - File src = new File("C:\\temp\\obs.xml"); - File xml = new File("C:\\temp\\xml.xml"); - File json = new File("C:\\temp\\json.json"); - File json2 = new File("C:\\temp\\json2.json"); + File src = new File(Utilities.path("[tmp]", "obs.xml")); + File xml = new File(Utilities.path("[tmp]", "xml.xml")); + File json = new File(Utilities.path("[tmp]", "json.json")); + File json2 = new File(Utilities.path("[tmp]", "json2.json")); FileUtils.copyFile(new File("C:\\work\\org.hl7.fhir\\build\\publish\\observation-decimal.xml"), src); Observation obs = (Observation) new XmlParser().parse(new FileInputStream(src)); new JsonParser().setOutputStyle(OutputStyle.PRETTY).compose(new FileOutputStream(json), obs); diff --git a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/JsonDirectTests.java b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/JsonDirectTests.java index 9a173bf92..2a912db46 100644 --- a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/JsonDirectTests.java +++ b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/JsonDirectTests.java @@ -12,6 +12,7 @@ import org.hl7.fhir.r5.formats.IParser.OutputStyle; import org.hl7.fhir.r5.formats.JsonParser; import org.hl7.fhir.r5.formats.XmlParser; import org.hl7.fhir.r5.model.Observation; +import org.hl7.fhir.utilities.Utilities; import org.junit.Before; import org.junit.Test; @@ -23,10 +24,10 @@ public class JsonDirectTests { @Test public void test() throws FHIRFormatError, FileNotFoundException, IOException { - File src = new File("C:\\temp\\obs.xml"); - File xml = new File("C:\\temp\\xml.xml"); - File json = new File("C:\\temp\\json.json"); - File json2 = new File("C:\\temp\\json2.json"); + File src = new File(Utilities.path("[tmp]", "obs.xml")); + File xml = new File(Utilities.path("[tmp]", "xml.xml")); + File json = new File(Utilities.path("[tmp]", "json.json")); + File json2 = new File(Utilities.path("[tmp]", "json2.json")); FileUtils.copyFile(new File("C:\\work\\org.hl7.fhir\\build\\publish\\observation-decimal.xml"), src); Observation obs = (Observation) new XmlParser().parse(new FileInputStream(src)); new JsonParser().setOutputStyle(OutputStyle.PRETTY).compose(new FileOutputStream(json), obs);