X-Git-Url: https://gerrit.onap.org/r/gitweb?p=cps.git;a=blobdiff_plain;f=cps-service%2Fsrc%2Ftest%2Fgroovy%2Forg%2Fonap%2Fcps%2Fapi%2Fimpl%2FCpsAnchorServiceImplSpec.groovy;fp=cps-service%2Fsrc%2Ftest%2Fgroovy%2Forg%2Fonap%2Fcps%2Fapi%2Fimpl%2FCpsAnchorServiceImplSpec.groovy;h=c7865386bc6f779879fc47263efa405381e34518;hp=3546b8167183e6b7da244581ffbbb57de3a05679;hb=2830723b8c5d5bb40c171c88f055adbc1a808f68;hpb=2b979f63a4020b65a2a85ecdb2bfa2b970eb9f76 diff --git a/cps-service/src/test/groovy/org/onap/cps/api/impl/CpsAnchorServiceImplSpec.groovy b/cps-service/src/test/groovy/org/onap/cps/api/impl/CpsAnchorServiceImplSpec.groovy index 3546b8167..c7865386b 100644 --- a/cps-service/src/test/groovy/org/onap/cps/api/impl/CpsAnchorServiceImplSpec.groovy +++ b/cps-service/src/test/groovy/org/onap/cps/api/impl/CpsAnchorServiceImplSpec.groovy @@ -118,7 +118,7 @@ class CpsAnchorServiceImplSpec extends Specification { 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')] + mockCpsAdminPersistenceService.queryAnchorNames('some-dataspace-name', ['some-module-name']) >> ['some-anchor-identifier'] when: 'query anchor names is called using a dataspace name and module name' def result = objectUnderTest.queryAnchorNames('some-dataspace-name', ['some-module-name']) then: 'get anchor identifiers returns the same anchor identifier returned by the persistence layer' @@ -130,7 +130,7 @@ class CpsAnchorServiceImplSpec extends Specification { def 'Query all anchors with Module Names Not Found Exception in persistence layer.'() { given: 'the persistence layer throws a Module Names Not Found Exception' def originalException = new ModuleNamesNotFoundException('exception-ds', ['m1', 'm2']) - mockCpsAdminPersistenceService.queryAnchors(*_) >> { throw originalException} + mockCpsAdminPersistenceService.queryAnchorNames(*_) >> { throw originalException} when: 'attempt query anchors' objectUnderTest.queryAnchorNames('some-dataspace-name', []) then: 'the same exception is thrown (up)'