summaryrefslogtreecommitdiffstats
path: root/cps-service/src/test/groovy
diff options
context:
space:
mode:
Diffstat (limited to 'cps-service/src/test/groovy')
-rwxr-xr-xcps-service/src/test/groovy/org/onap/cps/api/impl/CpsAdminServiceImplSpec.groovy8
1 files changed, 8 insertions, 0 deletions
diff --git a/cps-service/src/test/groovy/org/onap/cps/api/impl/CpsAdminServiceImplSpec.groovy b/cps-service/src/test/groovy/org/onap/cps/api/impl/CpsAdminServiceImplSpec.groovy
index be213c0fa0..95afeb4172 100755
--- a/cps-service/src/test/groovy/org/onap/cps/api/impl/CpsAdminServiceImplSpec.groovy
+++ b/cps-service/src/test/groovy/org/onap/cps/api/impl/CpsAdminServiceImplSpec.groovy
@@ -70,4 +70,12 @@ class CpsAdminServiceImplSpec extends Specification {
then: 'associated persistence service method is invoked with same parameters'
1 * mockCpsAdminPersistenceService.deleteAnchor('someDataspace','someAnchor')
}
+
+ def 'Query all anchor identifiers for a dataspace and module names.'() {
+ given: 'the persistence service is invoked with the expected parameters and returns a list of anchors'
+ mockCpsAdminPersistenceService.queryAnchors('some-dataspace-name', ['some-module-name']) >> [new Anchor(name:'some-anchor-identifier')]
+ expect: 'get anchor identifiers returns the same anchor identifier returned by the persistence layer'
+ objectUnderTest.queryAnchorNames('some-dataspace-name', ['some-module-name']) == ['some-anchor-identifier']
+
+ }
}