summaryrefslogtreecommitdiffstats
path: root/cps-service/src/test
diff options
context:
space:
mode:
authoremaclee <lee.anjella.macabuhay@est.tech>2022-06-17 17:42:56 +0100
committeremaclee <lee.anjella.macabuhay@est.tech>2022-06-30 12:08:14 +0100
commite1f73e264e2dca1f10c273620653f541c2f25d69 (patch)
treef9adc065420549de0368842ae1f4e7df30c4effe /cps-service/src/test
parentf7c7848d4cd7654ab94d9c31b62a71ed2bc4b9e8 (diff)
Add method to get YANG module sources for CM handle
- part of this commit includes renaming the enum SyncState to DataStoreSyncState Issue-ID: CPS-1064 Signed-off-by: emaclee <lee.anjella.macabuhay@est.tech> Change-Id: I6bf419141a1b33f09871946445cdfff422c8c354
Diffstat (limited to 'cps-service/src/test')
-rw-r--r--cps-service/src/test/groovy/org/onap/cps/api/impl/CpsModuleServiceImplSpec.groovy8
1 files changed, 7 insertions, 1 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 95d731478..429de7d51 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
@@ -24,7 +24,6 @@ package org.onap.cps.api.impl
import org.onap.cps.TestUtils
import org.onap.cps.api.CpsAdminService
-import org.onap.cps.spi.CascadeDeleteAllowed
import org.onap.cps.spi.CpsModulePersistenceService
import org.onap.cps.spi.exceptions.DataValidationException
import org.onap.cps.spi.exceptions.ModelValidationException
@@ -243,4 +242,11 @@ class CpsModuleServiceImplSpec extends Specification {
then: 'cps module persistence service is called with module references to check'
1 * mockCpsModulePersistenceService.identifyNewModuleReferences(moduleReferencesToCheck);
}
+
+ def 'Getting module definitions.'() {
+ when: 'get module definitions method is called with a valid dataspace and anchor name'
+ objectUnderTest.getModuleDefinitionsByAnchorName('some-dataspace-name', 'some-anchor-name')
+ then: 'CPS module persistence service is invoked the correct number of times'
+ 1 * mockCpsModulePersistenceService.getYangResourceDefinitions('some-dataspace-name', 'some-anchor-name')
+ }
}