From 37bda90e3f1c8dade06f85c43e93b9c0719646a3 Mon Sep 17 00:00:00 2001 From: David Waltermire Date: Sun, 27 Oct 2024 17:45:17 -0400 Subject: [PATCH] Removed Metapath result type "NODE", which has no difference from "ITEM". Replaced existing entries with "ITEM". --- core/metaschema | 2 +- .../core/metapath/MetapathExpression.java | 10 ++-------- .../core/metapath/cst/BuildCstVisitorTest.java | 13 +++++++------ .../metapath/function/library/ArrayAppendTest.java | 2 +- .../metapath/function/library/ArrayGetTest.java | 2 +- .../function/library/ArrayInsertBeforeTest.java | 2 +- .../metapath/function/library/ArrayJoinTest.java | 2 +- .../metapath/function/library/ArrayPutTest.java | 2 +- .../metapath/function/library/ArrayRemoveTest.java | 2 +- .../metapath/function/library/ArrayReverseTest.java | 2 +- .../metapath/function/library/ArraySizeTest.java | 2 +- .../function/library/ArraySubarrayTest.java | 2 +- .../metapath/function/library/ArrayTailTest.java | 2 +- .../metapath/function/library/FnLowerCaseTest.java | 2 +- .../function/library/FnStringLengthTest.java | 2 +- .../metapath/function/library/FnStringTest.java | 2 +- .../metapath/function/library/FnUpperCaseTest.java | 2 +- .../metapath/function/library/MapContainsTest.java | 2 +- .../metapath/function/library/MapEntryTest.java | 2 +- .../core/metapath/function/library/MapFindTest.java | 2 +- .../metapath/function/library/MapMergeTest.java | 2 +- .../core/metapath/function/library/MapPutTest.java | 2 +- .../metapath/function/library/MapRemoveTest.java | 2 +- .../core/metapath/function/library/MapSizeTest.java | 2 +- .../core/metapath/item/function/IArrayItemTest.java | 4 ++-- 25 files changed, 33 insertions(+), 38 deletions(-) diff --git a/core/metaschema b/core/metaschema index 73e2499c2..20c107794 160000 --- a/core/metaschema +++ b/core/metaschema @@ -1 +1 @@ -Subproject commit 73e2499c2ea345b4afd1876eca04da1107a9e3c0 +Subproject commit 20c107794327ff3c2cc39ce98f462c8c0791d916 diff --git a/core/src/main/java/gov/nist/secauto/metaschema/core/metapath/MetapathExpression.java b/core/src/main/java/gov/nist/secauto/metaschema/core/metapath/MetapathExpression.java index b84950188..9ba2b3cda 100644 --- a/core/src/main/java/gov/nist/secauto/metaschema/core/metapath/MetapathExpression.java +++ b/core/src/main/java/gov/nist/secauto/metaschema/core/metapath/MetapathExpression.java @@ -20,7 +20,6 @@ import gov.nist.secauto.metaschema.core.metapath.item.atomic.IAnyAtomicItem; import gov.nist.secauto.metaschema.core.metapath.item.atomic.IDecimalItem; import gov.nist.secauto.metaschema.core.metapath.item.atomic.INumericItem; -import gov.nist.secauto.metaschema.core.metapath.item.node.INodeItem; import gov.nist.secauto.metaschema.core.util.ObjectUtils; import org.antlr.v4.runtime.CharStreams; @@ -66,11 +65,6 @@ public enum ResultType { * The result is expected to be an {@link ISequence} value. */ SEQUENCE, - /** - * The result is expected to be an {@link INodeItem} value. - */ - // TODO: audit use of this value, replace with ITEM where appropriate - NODE, /** * The result is expected to be an {@link IItem} value. */ @@ -117,7 +111,8 @@ public static MetapathExpression compile(@NonNull String path) { */ @NonNull public static MetapathExpression compile(@NonNull String path, @NonNull StaticContext context) { - @NonNull MetapathExpression retval; + @NonNull + MetapathExpression retval; if (".".equals(path)) { retval = CONTEXT_NODE; } else { @@ -337,7 +332,6 @@ protected T toResultType(@NonNull ISequence sequence, @NonNull ResultType result = FnBoolean.fnBoolean(sequence).toBoolean(); break; case ITEM: - case NODE: result = sequence.getFirstItem(true); break; case NUMBER: diff --git a/core/src/test/java/gov/nist/secauto/metaschema/core/metapath/cst/BuildCstVisitorTest.java b/core/src/test/java/gov/nist/secauto/metaschema/core/metapath/cst/BuildCstVisitorTest.java index c2944f654..8630fc355 100644 --- a/core/src/test/java/gov/nist/secauto/metaschema/core/metapath/cst/BuildCstVisitorTest.java +++ b/core/src/test/java/gov/nist/secauto/metaschema/core/metapath/cst/BuildCstVisitorTest.java @@ -128,7 +128,8 @@ void testAbbreviatedParentAxis() { // select starting node IDocumentNodeItem document = newTestDocument(); IFieldNodeItem field - = MetapathExpression.compile("/root/field1", staticContext).evaluateAs(document, ResultType.NODE); + = MetapathExpression.compile("/root/field1", staticContext) + .evaluateAs(document, ResultType.ITEM); assert field != null; // evaluate @@ -145,12 +146,12 @@ void testParentAxisMatch() { // select starting node IDocumentNodeItem document = newTestDocument(); IFieldNodeItem field = MetapathExpression.compile("/root/field1", staticContext) - .evaluateAs(document, ResultType.NODE); + .evaluateAs(document, ResultType.ITEM); assert field != null; // compile expression IItem result = MetapathExpression.compile("parent::root", staticContext) - .evaluateAs(field, ResultType.NODE); + .evaluateAs(field, ResultType.ITEM); assert result != null; assertAll( @@ -165,7 +166,7 @@ void testParentAxisNonMatch() { // select starting node IDocumentNodeItem document = newTestDocument(); IFieldNodeItem field = MetapathExpression.compile("/root/field1", staticContext) - .evaluateAs(document, ResultType.NODE); + .evaluateAs(document, ResultType.ITEM); assert field != null; // compile expression @@ -221,7 +222,7 @@ void testAbbreviatedForwardAxisFlagName() { // select starting node IDocumentNodeItem document = newTestDocument(); IFieldNodeItem field = MetapathExpression.compile("/root/field2", staticContext) - .evaluateAs(document, ResultType.NODE); + .evaluateAs(document, ResultType.ITEM); assert field != null; // evaluate @@ -242,7 +243,7 @@ void testForwardstepChild() { // select starting node IDocumentNodeItem document = newTestDocument(); IRootAssemblyNodeItem root = MetapathExpression.compile("/root", staticContext) - .evaluateAs(document, ResultType.NODE, new DynamicContext(staticContext)); + .evaluateAs(document, ResultType.ITEM, new DynamicContext(staticContext)); assert root != null; // evaluate diff --git a/core/src/test/java/gov/nist/secauto/metaschema/core/metapath/function/library/ArrayAppendTest.java b/core/src/test/java/gov/nist/secauto/metaschema/core/metapath/function/library/ArrayAppendTest.java index 3c3d248b1..a121be452 100644 --- a/core/src/test/java/gov/nist/secauto/metaschema/core/metapath/function/library/ArrayAppendTest.java +++ b/core/src/test/java/gov/nist/secauto/metaschema/core/metapath/function/library/ArrayAppendTest.java @@ -38,7 +38,7 @@ private static Stream provideValues() { // NOPMD - false positive @MethodSource("provideValues") void testExpression(@NonNull IItem expected, @NonNull String metapath) { IItem result = MetapathExpression.compile(metapath) - .evaluateAs(null, MetapathExpression.ResultType.NODE, newDynamicContext()); + .evaluateAs(null, MetapathExpression.ResultType.ITEM, newDynamicContext()); assertEquals(expected, result); } } diff --git a/core/src/test/java/gov/nist/secauto/metaschema/core/metapath/function/library/ArrayGetTest.java b/core/src/test/java/gov/nist/secauto/metaschema/core/metapath/function/library/ArrayGetTest.java index 99c0e489d..11bd2b2f6 100644 --- a/core/src/test/java/gov/nist/secauto/metaschema/core/metapath/function/library/ArrayGetTest.java +++ b/core/src/test/java/gov/nist/secauto/metaschema/core/metapath/function/library/ArrayGetTest.java @@ -38,7 +38,7 @@ private static Stream provideValues() { // NOPMD - false positive void testExpression(@NonNull IItem expected, @NonNull String metapath) { IItem result = MetapathExpression.compile(metapath) - .evaluateAs(null, MetapathExpression.ResultType.NODE, newDynamicContext()); + .evaluateAs(null, MetapathExpression.ResultType.ITEM, newDynamicContext()); assertEquals(expected, result); } } diff --git a/core/src/test/java/gov/nist/secauto/metaschema/core/metapath/function/library/ArrayInsertBeforeTest.java b/core/src/test/java/gov/nist/secauto/metaschema/core/metapath/function/library/ArrayInsertBeforeTest.java index bdf41120b..1e1f50d8b 100644 --- a/core/src/test/java/gov/nist/secauto/metaschema/core/metapath/function/library/ArrayInsertBeforeTest.java +++ b/core/src/test/java/gov/nist/secauto/metaschema/core/metapath/function/library/ArrayInsertBeforeTest.java @@ -41,7 +41,7 @@ private static Stream provideValues() { // NOPMD - false positive @MethodSource("provideValues") void testExpression(@NonNull IItem expected, @NonNull String metapath) { IItem result = MetapathExpression.compile(metapath) - .evaluateAs(null, MetapathExpression.ResultType.NODE, newDynamicContext()); + .evaluateAs(null, MetapathExpression.ResultType.ITEM, newDynamicContext()); assertEquals(expected, result); } } diff --git a/core/src/test/java/gov/nist/secauto/metaschema/core/metapath/function/library/ArrayJoinTest.java b/core/src/test/java/gov/nist/secauto/metaschema/core/metapath/function/library/ArrayJoinTest.java index 83010c05a..11e4a6f87 100644 --- a/core/src/test/java/gov/nist/secauto/metaschema/core/metapath/function/library/ArrayJoinTest.java +++ b/core/src/test/java/gov/nist/secauto/metaschema/core/metapath/function/library/ArrayJoinTest.java @@ -47,7 +47,7 @@ private static Stream provideValues() { // NOPMD - false positive @MethodSource("provideValues") void testExpression(@NonNull IItem expected, @NonNull String metapath) { IItem result = MetapathExpression.compile(metapath) - .evaluateAs(null, MetapathExpression.ResultType.NODE, newDynamicContext()); + .evaluateAs(null, MetapathExpression.ResultType.ITEM, newDynamicContext()); assertEquals(expected, result); } } diff --git a/core/src/test/java/gov/nist/secauto/metaschema/core/metapath/function/library/ArrayPutTest.java b/core/src/test/java/gov/nist/secauto/metaschema/core/metapath/function/library/ArrayPutTest.java index b2f675669..06449d6f3 100644 --- a/core/src/test/java/gov/nist/secauto/metaschema/core/metapath/function/library/ArrayPutTest.java +++ b/core/src/test/java/gov/nist/secauto/metaschema/core/metapath/function/library/ArrayPutTest.java @@ -42,7 +42,7 @@ private static Stream provideValues() { // NOPMD - false positive void testExpression(@NonNull IItem expected, @NonNull String metapath) { IItem result = MetapathExpression.compile(metapath) - .evaluateAs(null, MetapathExpression.ResultType.NODE, newDynamicContext()); + .evaluateAs(null, MetapathExpression.ResultType.ITEM, newDynamicContext()); assertEquals(expected, result); } } diff --git a/core/src/test/java/gov/nist/secauto/metaschema/core/metapath/function/library/ArrayRemoveTest.java b/core/src/test/java/gov/nist/secauto/metaschema/core/metapath/function/library/ArrayRemoveTest.java index 68d6e3ec5..3285e7f01 100644 --- a/core/src/test/java/gov/nist/secauto/metaschema/core/metapath/function/library/ArrayRemoveTest.java +++ b/core/src/test/java/gov/nist/secauto/metaschema/core/metapath/function/library/ArrayRemoveTest.java @@ -47,7 +47,7 @@ private static Stream provideValues() { // NOPMD - false positive void testExpression(@NonNull IItem expected, @NonNull String metapath) { IItem result = MetapathExpression.compile(metapath) - .evaluateAs(null, MetapathExpression.ResultType.NODE, newDynamicContext()); + .evaluateAs(null, MetapathExpression.ResultType.ITEM, newDynamicContext()); assertEquals(expected, result); } } diff --git a/core/src/test/java/gov/nist/secauto/metaschema/core/metapath/function/library/ArrayReverseTest.java b/core/src/test/java/gov/nist/secauto/metaschema/core/metapath/function/library/ArrayReverseTest.java index 364faf0a6..4a59b973f 100644 --- a/core/src/test/java/gov/nist/secauto/metaschema/core/metapath/function/library/ArrayReverseTest.java +++ b/core/src/test/java/gov/nist/secauto/metaschema/core/metapath/function/library/ArrayReverseTest.java @@ -45,7 +45,7 @@ private static Stream provideValues() { // NOPMD - false positive @MethodSource("provideValues") void testExpression(@NonNull IItem expected, @NonNull String metapath) { IItem result = MetapathExpression.compile(metapath) - .evaluateAs(null, MetapathExpression.ResultType.NODE, newDynamicContext()); + .evaluateAs(null, MetapathExpression.ResultType.ITEM, newDynamicContext()); assertEquals(expected, result); } } diff --git a/core/src/test/java/gov/nist/secauto/metaschema/core/metapath/function/library/ArraySizeTest.java b/core/src/test/java/gov/nist/secauto/metaschema/core/metapath/function/library/ArraySizeTest.java index d1faf62cd..c42fe69b8 100644 --- a/core/src/test/java/gov/nist/secauto/metaschema/core/metapath/function/library/ArraySizeTest.java +++ b/core/src/test/java/gov/nist/secauto/metaschema/core/metapath/function/library/ArraySizeTest.java @@ -44,7 +44,7 @@ private static Stream provideValues() { // NOPMD - false positive void testExpression(@NonNull IIntegerItem expected, @NonNull String metapath) { IItem result = MetapathExpression.compile(metapath) - .evaluateAs(null, MetapathExpression.ResultType.NODE, newDynamicContext()); + .evaluateAs(null, MetapathExpression.ResultType.ITEM, newDynamicContext()); assertEquals(expected, result); } } diff --git a/core/src/test/java/gov/nist/secauto/metaschema/core/metapath/function/library/ArraySubarrayTest.java b/core/src/test/java/gov/nist/secauto/metaschema/core/metapath/function/library/ArraySubarrayTest.java index bad7df7d4..7f0bc2149 100644 --- a/core/src/test/java/gov/nist/secauto/metaschema/core/metapath/function/library/ArraySubarrayTest.java +++ b/core/src/test/java/gov/nist/secauto/metaschema/core/metapath/function/library/ArraySubarrayTest.java @@ -52,7 +52,7 @@ private static Stream provideValues() { // NOPMD - false positive @MethodSource("provideValues") void testExpression(@NonNull IItem expected, @NonNull String metapath) { IItem result = MetapathExpression.compile(metapath) - .evaluateAs(null, MetapathExpression.ResultType.NODE, newDynamicContext()); + .evaluateAs(null, MetapathExpression.ResultType.ITEM, newDynamicContext()); assertEquals(expected, result); } } diff --git a/core/src/test/java/gov/nist/secauto/metaschema/core/metapath/function/library/ArrayTailTest.java b/core/src/test/java/gov/nist/secauto/metaschema/core/metapath/function/library/ArrayTailTest.java index 53414fea4..ccbcaf7bb 100644 --- a/core/src/test/java/gov/nist/secauto/metaschema/core/metapath/function/library/ArrayTailTest.java +++ b/core/src/test/java/gov/nist/secauto/metaschema/core/metapath/function/library/ArrayTailTest.java @@ -43,7 +43,7 @@ private static Stream provideValues() { // NOPMD - false positive void testExpression(@NonNull IArrayItem expected, @NonNull String metapath) { IArrayItem result = MetapathExpression.compile(metapath) - .evaluateAs(null, MetapathExpression.ResultType.NODE, newDynamicContext()); + .evaluateAs(null, MetapathExpression.ResultType.ITEM, newDynamicContext()); assertEquals(expected, result); } } diff --git a/core/src/test/java/gov/nist/secauto/metaschema/core/metapath/function/library/FnLowerCaseTest.java b/core/src/test/java/gov/nist/secauto/metaschema/core/metapath/function/library/FnLowerCaseTest.java index afe7fb1ed..febe46935 100644 --- a/core/src/test/java/gov/nist/secauto/metaschema/core/metapath/function/library/FnLowerCaseTest.java +++ b/core/src/test/java/gov/nist/secauto/metaschema/core/metapath/function/library/FnLowerCaseTest.java @@ -33,7 +33,7 @@ private static Stream provideValues() { // NOPMD - false positive @MethodSource("provideValues") void testExpression(@NonNull IStringItem expected, @NonNull String metapath) { IStringItem result = MetapathExpression.compile(metapath) - .evaluateAs(null, MetapathExpression.ResultType.NODE, newDynamicContext()); + .evaluateAs(null, MetapathExpression.ResultType.ITEM, newDynamicContext()); assertEquals(expected, result); } } diff --git a/core/src/test/java/gov/nist/secauto/metaschema/core/metapath/function/library/FnStringLengthTest.java b/core/src/test/java/gov/nist/secauto/metaschema/core/metapath/function/library/FnStringLengthTest.java index be1a7495c..e20018fa5 100644 --- a/core/src/test/java/gov/nist/secauto/metaschema/core/metapath/function/library/FnStringLengthTest.java +++ b/core/src/test/java/gov/nist/secauto/metaschema/core/metapath/function/library/FnStringLengthTest.java @@ -44,7 +44,7 @@ private static Stream provideValues() { // NOPMD - false positive @MethodSource("provideValues") void testExpression(@NonNull IIntegerItem expected, @NonNull String metapath) { IIntegerItem result = MetapathExpression.compile(metapath) - .evaluateAs(null, MetapathExpression.ResultType.NODE, newDynamicContext()); + .evaluateAs(null, MetapathExpression.ResultType.ITEM, newDynamicContext()); assertEquals(expected, result); } diff --git a/core/src/test/java/gov/nist/secauto/metaschema/core/metapath/function/library/FnStringTest.java b/core/src/test/java/gov/nist/secauto/metaschema/core/metapath/function/library/FnStringTest.java index 74b39219d..c72905f50 100644 --- a/core/src/test/java/gov/nist/secauto/metaschema/core/metapath/function/library/FnStringTest.java +++ b/core/src/test/java/gov/nist/secauto/metaschema/core/metapath/function/library/FnStringTest.java @@ -52,7 +52,7 @@ private static Stream provideValues() { // NOPMD - false positive @MethodSource("provideValues") void testExpression(@NonNull IStringItem expected, @NonNull String metapath) { IStringItem result = MetapathExpression.compile(metapath) - .evaluateAs(null, MetapathExpression.ResultType.NODE, newDynamicContext()); + .evaluateAs(null, MetapathExpression.ResultType.ITEM, newDynamicContext()); assertEquals(expected, result); } diff --git a/core/src/test/java/gov/nist/secauto/metaschema/core/metapath/function/library/FnUpperCaseTest.java b/core/src/test/java/gov/nist/secauto/metaschema/core/metapath/function/library/FnUpperCaseTest.java index a1e317051..3cd7799f4 100644 --- a/core/src/test/java/gov/nist/secauto/metaschema/core/metapath/function/library/FnUpperCaseTest.java +++ b/core/src/test/java/gov/nist/secauto/metaschema/core/metapath/function/library/FnUpperCaseTest.java @@ -33,7 +33,7 @@ private static Stream provideValues() { // NOPMD - false positive @MethodSource("provideValues") void testExpression(@NonNull IStringItem expected, @NonNull String metapath) { IStringItem result = MetapathExpression.compile(metapath) - .evaluateAs(null, MetapathExpression.ResultType.NODE, newDynamicContext()); + .evaluateAs(null, MetapathExpression.ResultType.ITEM, newDynamicContext()); assertEquals(expected, result); } } diff --git a/core/src/test/java/gov/nist/secauto/metaschema/core/metapath/function/library/MapContainsTest.java b/core/src/test/java/gov/nist/secauto/metaschema/core/metapath/function/library/MapContainsTest.java index fbb4600a2..18c8527bf 100644 --- a/core/src/test/java/gov/nist/secauto/metaschema/core/metapath/function/library/MapContainsTest.java +++ b/core/src/test/java/gov/nist/secauto/metaschema/core/metapath/function/library/MapContainsTest.java @@ -47,7 +47,7 @@ private static Stream provideValues() { // NOPMD - false positive void testExpression(@NonNull IItem expected, @NonNull String metapath) { IItem result = MetapathExpression.compile(metapath) - .evaluateAs(null, MetapathExpression.ResultType.NODE, newDynamicContext()); + .evaluateAs(null, MetapathExpression.ResultType.ITEM, newDynamicContext()); assertEquals(expected, result); } } diff --git a/core/src/test/java/gov/nist/secauto/metaschema/core/metapath/function/library/MapEntryTest.java b/core/src/test/java/gov/nist/secauto/metaschema/core/metapath/function/library/MapEntryTest.java index f530f1924..8195960f1 100644 --- a/core/src/test/java/gov/nist/secauto/metaschema/core/metapath/function/library/MapEntryTest.java +++ b/core/src/test/java/gov/nist/secauto/metaschema/core/metapath/function/library/MapEntryTest.java @@ -38,7 +38,7 @@ private static Stream provideValues() { // NOPMD - false positive void testExpression(@NonNull IMapItem expected, @NonNull String metapath) { IItem result = MetapathExpression.compile(metapath) - .evaluateAs(null, MetapathExpression.ResultType.NODE, newDynamicContext()); + .evaluateAs(null, MetapathExpression.ResultType.ITEM, newDynamicContext()); assertEquals(expected, result); } } diff --git a/core/src/test/java/gov/nist/secauto/metaschema/core/metapath/function/library/MapFindTest.java b/core/src/test/java/gov/nist/secauto/metaschema/core/metapath/function/library/MapFindTest.java index 79c6beab3..c072e0425 100644 --- a/core/src/test/java/gov/nist/secauto/metaschema/core/metapath/function/library/MapFindTest.java +++ b/core/src/test/java/gov/nist/secauto/metaschema/core/metapath/function/library/MapFindTest.java @@ -53,7 +53,7 @@ private static Stream provideValues() { // NOPMD - false positive void testExpression(@NonNull IItem expected, @NonNull String metapath) { IItem result = MetapathExpression.compile(metapath) - .evaluateAs(null, MetapathExpression.ResultType.NODE, newDynamicContext()); + .evaluateAs(null, MetapathExpression.ResultType.ITEM, newDynamicContext()); assertEquals(expected, result); } } diff --git a/core/src/test/java/gov/nist/secauto/metaschema/core/metapath/function/library/MapMergeTest.java b/core/src/test/java/gov/nist/secauto/metaschema/core/metapath/function/library/MapMergeTest.java index bfc8e998b..e5b28f061 100644 --- a/core/src/test/java/gov/nist/secauto/metaschema/core/metapath/function/library/MapMergeTest.java +++ b/core/src/test/java/gov/nist/secauto/metaschema/core/metapath/function/library/MapMergeTest.java @@ -86,7 +86,7 @@ private static Stream provideValues() { // NOPMD - false positive void testExpression(@NonNull IItem expected, @NonNull String metapath) { IItem result = MetapathExpression.compile(metapath) - .evaluateAs(null, MetapathExpression.ResultType.NODE, newDynamicContext()); + .evaluateAs(null, MetapathExpression.ResultType.ITEM, newDynamicContext()); assertEquals(expected, result); } } diff --git a/core/src/test/java/gov/nist/secauto/metaschema/core/metapath/function/library/MapPutTest.java b/core/src/test/java/gov/nist/secauto/metaschema/core/metapath/function/library/MapPutTest.java index bdddae0b3..ec96bae18 100644 --- a/core/src/test/java/gov/nist/secauto/metaschema/core/metapath/function/library/MapPutTest.java +++ b/core/src/test/java/gov/nist/secauto/metaschema/core/metapath/function/library/MapPutTest.java @@ -58,7 +58,7 @@ private static Stream provideValues() { // NOPMD - false positive void testExpression(@NonNull IMapItem expected, @NonNull String metapath) { IItem result = MetapathExpression.compile(metapath) - .evaluateAs(null, MetapathExpression.ResultType.NODE, newDynamicContext()); + .evaluateAs(null, MetapathExpression.ResultType.ITEM, newDynamicContext()); assertEquals(expected, result); } } diff --git a/core/src/test/java/gov/nist/secauto/metaschema/core/metapath/function/library/MapRemoveTest.java b/core/src/test/java/gov/nist/secauto/metaschema/core/metapath/function/library/MapRemoveTest.java index 5de961db3..90c4ec1b9 100644 --- a/core/src/test/java/gov/nist/secauto/metaschema/core/metapath/function/library/MapRemoveTest.java +++ b/core/src/test/java/gov/nist/secauto/metaschema/core/metapath/function/library/MapRemoveTest.java @@ -74,7 +74,7 @@ private static Stream provideValues() { // NOPMD - false positive void testExpression(@NonNull IMapItem expected, @NonNull String metapath) { IItem result = MetapathExpression.compile(metapath) - .evaluateAs(null, MetapathExpression.ResultType.NODE, newDynamicContext()); + .evaluateAs(null, MetapathExpression.ResultType.ITEM, newDynamicContext()); assertEquals(expected, result); } } diff --git a/core/src/test/java/gov/nist/secauto/metaschema/core/metapath/function/library/MapSizeTest.java b/core/src/test/java/gov/nist/secauto/metaschema/core/metapath/function/library/MapSizeTest.java index 71947dde9..895c15c0d 100644 --- a/core/src/test/java/gov/nist/secauto/metaschema/core/metapath/function/library/MapSizeTest.java +++ b/core/src/test/java/gov/nist/secauto/metaschema/core/metapath/function/library/MapSizeTest.java @@ -38,7 +38,7 @@ private static Stream provideValues() { // NOPMD - false positive void testExpression(@NonNull IIntegerItem expected, @NonNull String metapath) { IItem result = MetapathExpression.compile(metapath) - .evaluateAs(null, MetapathExpression.ResultType.NODE, newDynamicContext()); + .evaluateAs(null, MetapathExpression.ResultType.ITEM, newDynamicContext()); assertEquals(expected, result); } } diff --git a/core/src/test/java/gov/nist/secauto/metaschema/core/metapath/item/function/IArrayItemTest.java b/core/src/test/java/gov/nist/secauto/metaschema/core/metapath/item/function/IArrayItemTest.java index 4db9bfd2f..e167745e8 100644 --- a/core/src/test/java/gov/nist/secauto/metaschema/core/metapath/item/function/IArrayItemTest.java +++ b/core/src/test/java/gov/nist/secauto/metaschema/core/metapath/item/function/IArrayItemTest.java @@ -41,7 +41,7 @@ private static Stream squareConstructorValues() { // NOPMD - false po @MethodSource("squareConstructorValues") void testSquareConstructor(@NonNull IArrayItem expected, @NonNull String metapath) { IArrayItem result = MetapathExpression.compile(metapath) - .evaluateAs(null, MetapathExpression.ResultType.NODE, newDynamicContext()); + .evaluateAs(null, MetapathExpression.ResultType.ITEM, newDynamicContext()); assertEquals(expected, result); } @@ -60,7 +60,7 @@ private static Stream curlyConstructorValues() { // NOPMD - false pos @MethodSource("curlyConstructorValues") void testCurlyConstructor(@NonNull IArrayItem expected, @NonNull String metapath) { IArrayItem result = MetapathExpression.compile(metapath) - .evaluateAs(null, MetapathExpression.ResultType.NODE, newDynamicContext()); + .evaluateAs(null, MetapathExpression.ResultType.ITEM, newDynamicContext()); assertEquals(expected, result); }