fix up test

This commit is contained in:
Grahame Grieve 2020-02-18 14:32:23 +11:00
parent a702361057
commit daaeb1a540
1 changed files with 4 additions and 1 deletions

View File

@ -1,6 +1,9 @@
package org.hl7.fhir.r5.test; package org.hl7.fhir.r5.test;
import java.io.File;
import java.io.IOException; import java.io.IOException;
import java.nio.file.Path;
import org.apache.commons.lang3.SystemUtils; import org.apache.commons.lang3.SystemUtils;
import org.hl7.fhir.utilities.Utilities; import org.hl7.fhir.utilities.Utilities;
@ -20,7 +23,7 @@ public class UtilitiesTests {
public void testPath() throws IOException { public void testPath() throws IOException {
Assert.assertEquals(Utilities.path("[tmp]", "test.txt"), SystemUtils.IS_OS_WINDOWS ? "c:\\temp\\test.txt" : "/tmp/test.txt"); Assert.assertEquals(Utilities.path("[tmp]", "test.txt"), SystemUtils.IS_OS_WINDOWS ? "c:\\temp\\test.txt" : "/tmp/test.txt");
Assert.assertEquals(Utilities.path("[user]", "test.txt"), System.getProperty("user.home")+"\\test.txt"); Assert.assertEquals(Utilities.path("[user]", "test.txt"), System.getProperty("user.home")+"\\test.txt");
Assert.assertEquals(Utilities.path("[JAVA_HOME]", "test.txt"), System.getenv("JAVA_HOME")+"\\test.txt"); Assert.assertEquals(Utilities.path("[JAVA_HOME]", "test.txt"), System.getenv("JAVA_HOME")+File.separator+"test.txt");
} }
@Test @Test