From c9c04aec3bb70e020cd08d8f16345d56ad8fb7dc Mon Sep 17 00:00:00 2001 From: Grahame Grieve Date: Tue, 22 Oct 2024 17:16:27 +1030 Subject: [PATCH] check mode in tx test cases --- .../java/org/hl7/fhir/validation/special/TxTester.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/special/TxTester.java b/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/special/TxTester.java index 0859cb341..336f7e48a 100644 --- a/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/special/TxTester.java +++ b/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/special/TxTester.java @@ -180,10 +180,12 @@ public class TxTester { List setup = loadSetupResources(suite); boolean ok = true; for (JsonObject test : suite.getJsonObjects("tests")) { - if (test.asBoolean("disabled")) { - ok = true; - } else { - ok = runTest(test, tx, setup, modes, filter, outputS.forceArray("tests")) && ok; + if ((!test.has("mode") || modes.contains(test.asString("mode")))) { + if (test.asBoolean("disabled")) { + ok = true; + } else { + ok = runTest(test, tx, setup, modes, filter, outputS.forceArray("tests")) && ok; + } } } return ok;