summaryrefslogtreecommitdiffstats
path: root/cps-service/src/test
diff options
context:
space:
mode:
authorRuslan Kashapov <ruslan.kashapov@pantheon.tech>2020-12-10 10:49:59 +0200
committerRuslan Kashapov <ruslan.kashapov@pantheon.tech>2021-01-06 15:03:59 +0200
commit5a8718b84dbd3c6fa78aa644a4695274a0a1ab5d (patch)
tree4dbd96f90aee895053036d5616a00b9912dcde82 /cps-service/src/test
parentec3e17505d12785586fc2418438c3d45b63d7dbd (diff)
Create dataspace
Issue-ID: CPS-134 Change-Id: Ie7f00f9c322a12a6c2a71c1407f6970a7dd24d2d Signed-off-by: Ruslan Kashapov <ruslan.kashapov@pantheon.tech>
Diffstat (limited to 'cps-service/src/test')
-rw-r--r--cps-service/src/test/groovy/org/onap/cps/api/impl/CpsAdminServiceImplSpec.groovy7
1 files changed, 7 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 9e13c771d3..022282493b 100644
--- 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
@@ -32,6 +32,13 @@ class CpsAdminServiceImplSpec extends Specification {
objectUnderTest.cpsAdminPersistenceService = mockCpsAdminPersistenceService
}
+ def 'Create dataspace method invokes persistence service'() {
+ when: 'Create dataspace method is invoked'
+ objectUnderTest.createDataspace('someDataspace')
+ then: 'The persistence service method is invoked with same parameters'
+ 1 * mockCpsAdminPersistenceService.createDataspace('someDataspace')
+ }
+
def 'Create anchor method invokes persistence service'() {
when: 'Create anchor method is invoked'
objectUnderTest.createAnchor('dummyDataspace', 'dummySchemaSet', 'dummyAnchorName')