summaryrefslogtreecommitdiffstats
path: root/cps-ri/src/test
diff options
context:
space:
mode:
authordanielhanrahan <daniel.hanrahan@est.tech>2023-04-05 17:11:24 +0100
committerSourabh Sourabh <sourabh.sourabh@est.tech>2023-04-12 12:15:37 +0000
commitb99ae09807a2893e0678d2209b4ee08194f95fe8 (patch)
tree964c32565e4bbfde6a83ecfe28caaab991c916ce /cps-ri/src/test
parentbc05c93a30bf7b11707476d3c277623ee5acc729 (diff)
Migrate query tests to integration-test module #3
Issue-ID: CPS-1597 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I1d92355f272271424a7014057d251cf88eac0203
Diffstat (limited to 'cps-ri/src/test')
-rw-r--r--cps-ri/src/test/groovy/org/onap/cps/spi/impl/CpsDataPersistenceQueryDataNodeSpec.groovy18
1 files changed, 0 insertions, 18 deletions
diff --git a/cps-ri/src/test/groovy/org/onap/cps/spi/impl/CpsDataPersistenceQueryDataNodeSpec.groovy b/cps-ri/src/test/groovy/org/onap/cps/spi/impl/CpsDataPersistenceQueryDataNodeSpec.groovy
index 5f8d1caf35..d5a6be4e80 100644
--- a/cps-ri/src/test/groovy/org/onap/cps/spi/impl/CpsDataPersistenceQueryDataNodeSpec.groovy
+++ b/cps-ri/src/test/groovy/org/onap/cps/spi/impl/CpsDataPersistenceQueryDataNodeSpec.groovy
@@ -38,24 +38,6 @@ class CpsDataPersistenceQueryDataNodeSpec extends CpsPersistenceSpecBase {
static final String SET_DATA = '/data/cps-path-query.sql'
@Sql([CLEAR_DATA, SET_DATA])
- def 'Cps Path query using descendant anywhere with #scenario condition(s) for a container element.'() {
- when: 'a query is executed to get a data node by the given cps path'
- def result = objectUnderTest.queryDataNodes(DATASPACE_NAME, ANCHOR_FOR_SHOP_EXAMPLE, cpsPath, OMIT_DESCENDANTS)
- then: 'the correct number of data nodes are retrieved'
- result.size() == expectedXPaths.size()
- and: 'xpaths of the retrieved data nodes are as expected'
- for (int i = 0; i < result.size(); i++) {
- assert result[i].getXpath() == expectedXPaths[i]
- }
- where: 'the following data is used'
- scenario | cpsPath || expectedXPaths
- 'one leaf' | '//author[@FirstName="Joe"]' || ["/shops/shop[@id='1']/categories[@code='1']/book/author[@FirstName='Joe' and @Surname='Bloggs']", "/shops/shop[@id='1']/categories[@code='2']/book/author[@FirstName='Joe' and @Surname='Smith']"]
- 'more than one leaf' | '//author[@FirstName="Joe" and @Surname="Bloggs"]' || ["/shops/shop[@id='1']/categories[@code='1']/book/author[@FirstName='Joe' and @Surname='Bloggs']"]
- 'leaves reversed in order' | '//author[@Surname="Bloggs" and @FirstName="Joe"]' || ["/shops/shop[@id='1']/categories[@code='1']/book/author[@FirstName='Joe' and @Surname='Bloggs']"]
- 'leaf and text condition' | '//author[@FirstName="Joe"]/Surname[text()="Bloggs"]' || ["/shops/shop[@id='1']/categories[@code='1']/book/author[@FirstName='Joe' and @Surname='Bloggs']"]
- }
-
- @Sql([CLEAR_DATA, SET_DATA])
def 'Cps Path query using descendant anywhere with #scenario condition(s) for a list element.'() {
when: 'a query is executed to get a data node by the given cps path'
def result = objectUnderTest.queryDataNodes(DATASPACE_NAME, ANCHOR_FOR_SHOP_EXAMPLE, cpsPath, OMIT_DESCENDANTS)