diff options
author | 2025-03-12 17:21:28 +0000 | |
---|---|---|
committer | 2025-03-12 17:21:28 +0000 | |
commit | 36027000ecc2d0bbffc7cd45fe3941db77e1d178 (patch) | |
tree | 2c933735724c22ef1767d01e74d418d03581d839 /integration-test | |
parent | 2cbb4d5940a099c4626bc4bf99090538d8311971 (diff) | |
parent | b701e3090b90b4bb3aef93c9f89a6d642e6e084a (diff) |
Diffstat (limited to 'integration-test')
-rw-r--r-- | integration-test/src/test/groovy/org/onap/cps/integration/functional/cps/QueryServiceIntegrationSpec.groovy | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/integration-test/src/test/groovy/org/onap/cps/integration/functional/cps/QueryServiceIntegrationSpec.groovy b/integration-test/src/test/groovy/org/onap/cps/integration/functional/cps/QueryServiceIntegrationSpec.groovy index 42fb964d52..6ae14dd11b 100644 --- a/integration-test/src/test/groovy/org/onap/cps/integration/functional/cps/QueryServiceIntegrationSpec.groovy +++ b/integration-test/src/test/groovy/org/onap/cps/integration/functional/cps/QueryServiceIntegrationSpec.groovy @@ -458,8 +458,8 @@ class QueryServiceIntegrationSpec extends FunctionalSpecBase { assert result.anchorName.toSet() == [BOOKSTORE_ANCHOR_1, BOOKSTORE_ANCHOR_2].toSet() } - def 'Query with a limit of #limit.' () { - when: + def 'Query data nodes with a limit of #limit.' () { + when: 'a query for data nodes is executed with a result limit' def result = objectUnderTest.queryDataNodes(FUNCTIONAL_TEST_DATASPACE_1, BOOKSTORE_ANCHOR_1, '/bookstore/categories', OMIT_DESCENDANTS, limit) then: 'the expected number of nodes is returned' assert countDataNodesInTree(result) == expectedNumberOfResults @@ -470,4 +470,17 @@ class QueryServiceIntegrationSpec extends FunctionalSpecBase { 0 || 5 -1 || 5 } + + def 'Query data leaf with a limit of #limit.' () { + when: 'a query for data leaf is executed with a result limit' + def result = objectUnderTest.queryDataLeaf(FUNCTIONAL_TEST_DATASPACE_1, BOOKSTORE_ANCHOR_1, '/bookstore/categories/@name', limit, String) + then: 'the expected number of leaf values is returned' + assert result.size() == expectedNumberOfResults + where: 'the following parameters are used' + limit || expectedNumberOfResults + 1 || 1 + 2 || 2 + 0 || 5 + -1 || 5 + } } |