diff options
author | niamhcore <niamh.core@est.tech> | 2021-10-28 13:39:24 +0100 |
---|---|---|
committer | niamhcore <niamh.core@est.tech> | 2021-11-02 15:05:39 +0000 |
commit | b0d930752fd6be436061226c7395038f6828438e (patch) | |
tree | 206389f51db0ffe46dae7c7c0e5d21c2f880e548 /cps-service/src/test | |
parent | 6fda688fa63ea7ccd450002fb94a18b07095bea9 (diff) |
Add get cm handles by modules names - service layer
Issue-ID: CPS-644
Signed-off-by: niamhcore <niamh.core@est.tech>
Change-Id: Ic2a57df02d533a0066382c12c35be8d524b6cdad
Diffstat (limited to 'cps-service/src/test')
-rwxr-xr-x | cps-service/src/test/groovy/org/onap/cps/api/impl/CpsAdminServiceImplSpec.groovy | 8 |
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'] + + } } |