From 56e8774c8f20efa05c266e302d762a03ea331d76 Mon Sep 17 00:00:00 2001 From: Grahame Grieve Date: Fri, 7 Oct 2022 09:20:34 +1100 Subject: [PATCH] Fix problem with R4B FHIRPath tests --- .../org/hl7/fhir/r4b/test/FHIRPathTests.java | 21 +++++++++++-------- .../org/hl7/fhir/r5/test/FHIRPathTests.java | 21 +++++++++++-------- pom.xml | 2 +- 3 files changed, 25 insertions(+), 19 deletions(-) diff --git a/org.hl7.fhir.r4b/src/test/java/org/hl7/fhir/r4b/test/FHIRPathTests.java b/org.hl7.fhir.r4b/src/test/java/org/hl7/fhir/r4b/test/FHIRPathTests.java index fc5891eba..15d25b098 100644 --- a/org.hl7.fhir.r4b/src/test/java/org/hl7/fhir/r4b/test/FHIRPathTests.java +++ b/org.hl7.fhir.r4b/src/test/java/org/hl7/fhir/r4b/test/FHIRPathTests.java @@ -175,19 +175,22 @@ public class FHIRPathTests { } if (node != null) { + if (!Utilities.noString(input)) { + res = resources.get(input); + if (res == null) { + if (input.endsWith(".json")) { + res = new JsonParser().parse(TestingUtilities.loadTestResourceStream("r4b", input)); + } else { + res = new XmlParser().parse(TestingUtilities.loadTestResourceStream("r4b", input)); + } + resources.put(input, res); + } + } + try { if (Utilities.noString(input)) { fp.check(null, null, node); } else { - res = resources.get(input); - if (res == null) { - if (input.endsWith(".json")) { - res = new JsonParser().parse(TestingUtilities.loadTestResourceStream("r4b", input)); - } else { - res = new XmlParser().parse(TestingUtilities.loadTestResourceStream("r4b", input)); - } - resources.put(input, res); - } fp.check(res, res.getResourceType().toString(), res.getResourceType().toString(), node); } Assertions.assertTrue(fail != TestResultType.SEMANTICS, String.format("Expected exception didn't occur checking %s", expression)); diff --git a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/FHIRPathTests.java b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/FHIRPathTests.java index 53bcadcd4..d865d067d 100644 --- a/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/FHIRPathTests.java +++ b/org.hl7.fhir.r5/src/test/java/org/hl7/fhir/r5/test/FHIRPathTests.java @@ -176,19 +176,22 @@ public class FHIRPathTests { } if (node != null) { + if (!Utilities.noString(input)) { + res = resources.get(input); + if (res == null) { + if (input.endsWith(".json")) { + res = new JsonParser().parse(TestingUtilities.loadTestResourceStream("r5", input)); + } else { + res = new XmlParser().parse(TestingUtilities.loadTestResourceStream("r5", input)); + } + resources.put(input, res); + } + } + try { if (Utilities.noString(input)) { fp.check(null, null, node); } else { - res = resources.get(input); - if (res == null) { - if (input.endsWith(".json")) { - res = new JsonParser().parse(TestingUtilities.loadTestResourceStream("r5", input)); - } else { - res = new XmlParser().parse(TestingUtilities.loadTestResourceStream("r5", input)); - } - resources.put(input, res); - } fp.check(res, res.getResourceType().toString(), res.getResourceType().toString(), node); } Assertions.assertTrue(fail != TestResultType.SEMANTICS, String.format("Expected exception didn't occur checking %s", expression)); diff --git a/pom.xml b/pom.xml index a54c0f447..6897aa2e4 100644 --- a/pom.xml +++ b/pom.xml @@ -19,7 +19,7 @@ 5.4.0 - 1.1.114 + 1.1.115 5.7.1 1.8.2 3.0.0-M5