summaryrefslogtreecommitdiffstats
path: root/cps-service/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'cps-service/src/test')
-rw-r--r--cps-service/src/test/groovy/org/onap/cps/api/impl/CpsModuleServiceImplSpec.groovy11
1 files changed, 7 insertions, 4 deletions
diff --git a/cps-service/src/test/groovy/org/onap/cps/api/impl/CpsModuleServiceImplSpec.groovy b/cps-service/src/test/groovy/org/onap/cps/api/impl/CpsModuleServiceImplSpec.groovy
index 5f2168aeb9..261d174934 100644
--- a/cps-service/src/test/groovy/org/onap/cps/api/impl/CpsModuleServiceImplSpec.groovy
+++ b/cps-service/src/test/groovy/org/onap/cps/api/impl/CpsModuleServiceImplSpec.groovy
@@ -22,6 +22,7 @@ package org.onap.cps.api.impl
import org.onap.cps.TestUtils
import org.onap.cps.api.CpsAdminService
+import org.onap.cps.spi.CpsDataPersistenceService
import org.onap.cps.spi.CpsModulePersistenceService
import org.onap.cps.spi.exceptions.ModelValidationException
import org.onap.cps.spi.model.ModuleReference
@@ -46,6 +47,8 @@ class CpsModuleServiceImplSpec extends Specification {
CpsModulePersistenceService mockModuleStoreService = Mock()
@SpringBean
CpsAdminService mockCpsAdminService = Mock()
+ @SpringBean
+ CpsDataPersistenceService mockDataPersistenceService = Mock()
@Autowired
CpsModuleServiceImpl objectUnderTest = new CpsModuleServiceImpl()
@SpringBean
@@ -93,14 +96,14 @@ class CpsModuleServiceImplSpec extends Specification {
}
@Unroll
- def 'Delete set by name and dataspace with #cascadeDeleteOption.'(){
+ def 'Delete set by name and dataspace with #cascadeDeleteOption.'() {
when: 'schema set deletion is requested'
objectUnderTest.deleteSchemaSet(dataspaceName, schemaSetname, cascadeDeleteOption)
then: 'persistence service method is invoked with same parameters'
mockModuleStoreService.deleteSchemaSet(dataspaceName, schemaSetname, cascadeDeleteOption)
where: 'following parameters are used'
- dataspaceName | schemaSetname | cascadeDeleteOption
- 'dataspace-1' | 'schemas-set-1' | CASCADE_DELETE_ALLOWED
- 'dataspace-2' | 'schemas-set-2' | CASCADE_DELETE_PROHIBITED
+ dataspaceName | schemaSetname | cascadeDeleteOption
+ 'dataspace-1' | 'schemas-set-1' | CASCADE_DELETE_ALLOWED
+ 'dataspace-2' | 'schemas-set-2' | CASCADE_DELETE_PROHIBITED
}
}