From d5fff86e8e039f20ab7fefa77dc5768cbf7b6f94 Mon Sep 17 00:00:00 2001 From: Grahame Grieve Date: Tue, 28 Apr 2020 11:14:54 +1000 Subject: [PATCH] get all tests passing. --- .../org/hl7/fhir/utilities/Utilities.java | 2 ++ .../fhir/utilities/tests/UtilitiesTests.java | 6 +++--- .../tests/AllR5ValidationTests.java | 19 ------------------- .../validation/tests/ValidationTestSuite.java | 6 +++--- 4 files changed, 8 insertions(+), 25 deletions(-) delete mode 100644 org.hl7.fhir.validation/src/test/java/org/hl7/fhir/validation/tests/AllR5ValidationTests.java diff --git a/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/Utilities.java b/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/Utilities.java index 0fa101a63..0a7bfdafc 100644 --- a/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/Utilities.java +++ b/org.hl7.fhir.utilities/src/main/java/org/hl7/fhir/utilities/Utilities.java @@ -582,6 +582,8 @@ public class Utilities { String ev = System.getenv(a.replace("[", "").replace("]", "")); if (ev != null) { a = ev; + } else { + a = "null"; } } } diff --git a/org.hl7.fhir.utilities/src/test/java/org/hl7/fhir/utilities/tests/UtilitiesTests.java b/org.hl7.fhir.utilities/src/test/java/org/hl7/fhir/utilities/tests/UtilitiesTests.java index 9d1689a81..182544bfe 100644 --- a/org.hl7.fhir.utilities/src/test/java/org/hl7/fhir/utilities/tests/UtilitiesTests.java +++ b/org.hl7.fhir.utilities/src/test/java/org/hl7/fhir/utilities/tests/UtilitiesTests.java @@ -54,7 +54,7 @@ public class UtilitiesTests { return OSX_JAVA_HOME; } else if (os.contains(LINUX)) { return LINUX_JAVA_HOME; - } else if (os.contains(WINDOWS)) { + } else if (os.toUpperCase().contains(WINDOWS)) { return WIN_JAVA_HOME; } else { throw new IllegalStateException("OS not recognized...cannot verify created directories."); @@ -67,7 +67,7 @@ public class UtilitiesTests { return OSX_USER_DIR; } else if (os.contains(LINUX)) { return LINUX_USER_DIR; - } else if (os.contains(WINDOWS)) { + } else if (os.toUpperCase().contains(WINDOWS)) { return WIN_USER_DIR; } else { throw new IllegalStateException("OS not recognized...cannot verify created directories."); @@ -80,7 +80,7 @@ public class UtilitiesTests { return getOsxTempDir(); } else if (os.contains(LINUX)) { return LINUX_TEMP_DIR; - } else if (os.contains(WINDOWS)) { + } else if (os.toUpperCase().contains(WINDOWS)) { return WIN_TEMP_DIR; } else { throw new IllegalStateException("OS not recognized...cannot verify created directories."); diff --git a/org.hl7.fhir.validation/src/test/java/org/hl7/fhir/validation/tests/AllR5ValidationTests.java b/org.hl7.fhir.validation/src/test/java/org/hl7/fhir/validation/tests/AllR5ValidationTests.java deleted file mode 100644 index 42db7d132..000000000 --- a/org.hl7.fhir.validation/src/test/java/org/hl7/fhir/validation/tests/AllR5ValidationTests.java +++ /dev/null @@ -1,19 +0,0 @@ -package org.hl7.fhir.validation.tests; - -import org.hl7.fhir.conversion.tests.SnapShotGenerationTestsX; -import org.junit.runner.RunWith; -import org.junit.runners.Suite; -import org.junit.runners.Suite.SuiteClasses; - -@RunWith(Suite.class) -@SuiteClasses({ - SnapShotGenerationTestsX.class, - ValidationTestSuite.class, - ValidationEngineTests.class, - JsonSchemaTests.class, - NativeHostServiceTester.class, - // CDAValidationTestCase.class, - ProfileComparisonTests.class}) -public class AllR5ValidationTests { - -} diff --git a/org.hl7.fhir.validation/src/test/java/org/hl7/fhir/validation/tests/ValidationTestSuite.java b/org.hl7.fhir.validation/src/test/java/org/hl7/fhir/validation/tests/ValidationTestSuite.java index 7c64674bd..2a4a8ece5 100644 --- a/org.hl7.fhir.validation/src/test/java/org/hl7/fhir/validation/tests/ValidationTestSuite.java +++ b/org.hl7.fhir.validation/src/test/java/org/hl7/fhir/validation/tests/ValidationTestSuite.java @@ -302,16 +302,16 @@ public class ValidationTestSuite implements IEvaluationContext, IValidatorResour for (ValidationMessage vm : errors) { if (vm.getLevel() == IssueSeverity.FATAL || vm.getLevel() == IssueSeverity.ERROR) { ec++; - System.out.println(vm.getDisplay()); +// System.out.println(vm.getDisplay()); errLocs.add(vm.getLocation()); } if (vm.getLevel() == IssueSeverity.WARNING) { wc++; - System.out.println(vm.getDisplay()); +// System.out.println(vm.getDisplay()); } if (vm.getLevel() == IssueSeverity.INFORMATION) { hc++; - System.out.println(vm.getDisplay()); +// System.out.println(vm.getDisplay()); } } if (!TestingUtilities.context(version).isNoTerminologyServer() || !focus.has("tx-dependent")) {