summaryrefslogtreecommitdiffstats
path: root/cps-service/src/test
diff options
context:
space:
mode:
authorRudrangi Anupriya <ra00745022@techmahindra.com>2023-07-31 16:50:32 +0530
committerRudrangi Anupriya <ra00745022@techmahindra.com>2023-07-31 16:51:09 +0530
commit77ef0b4e4ab1330a6e86ddb0ec57cafad0d6e513 (patch)
tree53583087ee639de02214cf4eaabcfae01a02936a /cps-service/src/test
parent50851e424f8cbc7b11db5c2b840a62dc1c995207 (diff)
Add 'direct' keyword to descendants option to query direct children (ep1)
-added 'direct' keyword also to Fetch Descendants Option along with 'all' and 'none' to Query direct child. -added unit tests to test direct keyword Issue-ID: CPS-1784 Change-Id: Icb7f59fbeebb03703626132d6d5d2cfde0e5ab4d Signed-off-by: Rudrangi Anupriya <ra00745022@techmahindra.com>
Diffstat (limited to 'cps-service/src/test')
-rw-r--r--cps-service/src/test/groovy/org/onap/cps/api/impl/CpsQueryServiceImplSpec.groovy2
-rw-r--r--cps-service/src/test/groovy/org/onap/cps/spi/FetchDescendantsOptionSpec.groovy2
2 files changed, 2 insertions, 2 deletions
diff --git a/cps-service/src/test/groovy/org/onap/cps/api/impl/CpsQueryServiceImplSpec.groovy b/cps-service/src/test/groovy/org/onap/cps/api/impl/CpsQueryServiceImplSpec.groovy
index 4e3d27964d..553027a4b8 100644
--- a/cps-service/src/test/groovy/org/onap/cps/api/impl/CpsQueryServiceImplSpec.groovy
+++ b/cps-service/src/test/groovy/org/onap/cps/api/impl/CpsQueryServiceImplSpec.groovy
@@ -45,7 +45,7 @@ class CpsQueryServiceImplSpec extends Specification {
1 * mockCpsValidator.validateNameCharacters(dataspaceName, anchorName)
where: 'all fetch descendants options are supported'
fetchDescendantsOption << [FetchDescendantsOption.OMIT_DESCENDANTS, FetchDescendantsOption.INCLUDE_ALL_DESCENDANTS,
- FetchDescendantsOption.DIRECT_CHILD_ONLY, new FetchDescendantsOption(10)]
+ FetchDescendantsOption.DIRECT_CHILDREN_ONLY, new FetchDescendantsOption(10)]
}
def 'Query data nodes across all anchors by cps path with #fetchDescendantsOption.'() {
diff --git a/cps-service/src/test/groovy/org/onap/cps/spi/FetchDescendantsOptionSpec.groovy b/cps-service/src/test/groovy/org/onap/cps/spi/FetchDescendantsOptionSpec.groovy
index 28bf38fb5e..c1958472e9 100644
--- a/cps-service/src/test/groovy/org/onap/cps/spi/FetchDescendantsOptionSpec.groovy
+++ b/cps-service/src/test/groovy/org/onap/cps/spi/FetchDescendantsOptionSpec.groovy
@@ -106,7 +106,7 @@ class FetchDescendantsOptionSpec extends Specification {
where: 'the following option is used'
fetchDescendantsOption || expectedStringValue
FetchDescendantsOption.OMIT_DESCENDANTS || 'OmitDescendants'
- FetchDescendantsOption.DIRECT_CHILD_ONLY || 'DirectChildOnly'
+ FetchDescendantsOption.DIRECT_CHILDREN_ONLY || 'DirectChildrenOnly'
FetchDescendantsOption.INCLUDE_ALL_DESCENDANTS || 'IncludeAllDescendants'
new FetchDescendantsOption(2) || 'Depth=2'
}