aboutsummaryrefslogtreecommitdiffstats
path: root/cps-service/src/test
diff options
context:
space:
mode:
authordanielhanrahan <daniel.hanrahan@est.tech>2024-12-02 14:49:10 +0000
committerdanielhanrahan <daniel.hanrahan@est.tech>2024-12-03 15:49:03 +0000
commitcca2dc7d661fa6fbad66bfdde2638b7bfd6b9bcd (patch)
tree5dc4327ea1008a881bb059769537cf256a57e107 /cps-service/src/test
parent902d17332d3e5cebe545991e01a5e55f739f0f80 (diff)
Add tests of attribute-axis feature
Following TDD, functional acceptance tests are added for attribute-axis feature. This covers xpaths such as '//books/@title' - Add stub to CpsQueryService throwing UnsupportedOperationException - Add tests showing expected behaviour (tests currently ignored) - Implementation will be provided in following commmit for CPS-2416 Issue-ID: CPS-2416 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I71817e66b28dfc21e7b75243fd0135f3cceddb8e
Diffstat (limited to 'cps-service/src/test')
-rw-r--r--cps-service/src/test/groovy/org/onap/cps/api/impl/CpsQueryServiceImplSpec.groovy8
1 files changed, 8 insertions, 0 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 3b10669ddb..74127e095f 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
@@ -71,4 +71,12 @@ class CpsQueryServiceImplSpec extends Specification {
then: 'the persistence service is called once with the correct parameters'
1 * mockCpsDataPersistenceService.countAnchorsForDataspaceAndCpsPath("some-dataspace", "/cps-path")
}
+
+ // TODO will be implemented in CPS-2416
+ def 'Query data leaf.'() {
+ when: 'a query for a specific leaf is executed'
+ objectUnderTest.queryDataLeaf('some-dataspace', 'some-anchor', '/cps-path/@id', Object.class)
+ then: 'solution is not implemented yet'
+ thrown(UnsupportedOperationException)
+ }
}