summaryrefslogtreecommitdiffstats
path: root/cps-service/src/test/groovy/org/onap
diff options
context:
space:
mode:
authorniamhcore <niamh.core@est.tech>2021-01-28 16:11:52 +0000
committerniamhcore <niamh.core@est.tech>2021-02-01 14:18:35 +0000
commit74753d923b77d87b17e8221ecc86a084446648b7 (patch)
tree19d933504e9a9040da75d478b2298b8413283c42 /cps-service/src/test/groovy/org/onap
parent3cf66a1b795042ade82a8c9cb2b4df978bc6485d (diff)
Attach a (JSON) data instance for a container with children to a given Anchor
Issue-ID: CPS-26 Signed-off-by: niamhcore <niamh.core@est.tech> Change-Id: I38fc1b1a6ccf84e64eff3218372b40c8fa2491ba
Diffstat (limited to 'cps-service/src/test/groovy/org/onap')
-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
}
}