aboutsummaryrefslogtreecommitdiffstats
path: root/cps-service/src/test/groovy/org/onap
diff options
context:
space:
mode:
authorToine Siebelink <toine.siebelink@est.tech>2022-03-11 10:40:54 +0000
committerGerrit Code Review <gerrit@onap.org>2022-03-11 10:40:54 +0000
commit53c1625416712dfe744b7cf22e7f8e8fe7839942 (patch)
tree466070eaceba9baecbcea0822ffc4d7cc54156fd /cps-service/src/test/groovy/org/onap
parentb5a9ec3305b7d848f0fccfc6b007654679d6cf4c (diff)
parent3d02e9210625b75419089a3f5612f386c3b997ea (diff)
Merge "Removed ExtendedModuleReference Object"
Diffstat (limited to 'cps-service/src/test/groovy/org/onap')
-rw-r--r--cps-service/src/test/groovy/org/onap/cps/api/impl/CpsModuleServiceImplSpec.groovy7
1 files changed, 3 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 afd8e8666f..bae06bb9ec 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
@@ -28,7 +28,6 @@ import org.onap.cps.spi.CpsModulePersistenceService
import org.onap.cps.spi.exceptions.ModelValidationException
import org.onap.cps.spi.exceptions.SchemaSetInUseException
import org.onap.cps.spi.model.Anchor
-import org.onap.cps.spi.model.ExtendedModuleReference
import org.onap.cps.spi.model.ModuleReference
import org.onap.cps.yang.YangTextSchemaSourceSetBuilder
import spock.lang.Specification
@@ -54,7 +53,7 @@ class CpsModuleServiceImplSpec extends Specification {
def 'Create schema set from new modules and existing modules.'() {
given: 'a list of existing modules module reference'
- def moduleReferenceForExistingModule = new ExtendedModuleReference("test", "test.org", "2021-10-12")
+ def moduleReferenceForExistingModule = new ModuleReference("test", "2021-10-12","test.org")
def listOfExistingModulesModuleReference = [moduleReferenceForExistingModule]
when: 'create schema set from modules method is invoked'
objectUnderTest.createSchemaSetFromModules("someDataspaceName", "someSchemaSetName", [newModule: "newContent"], listOfExistingModulesModuleReference)
@@ -81,7 +80,7 @@ class CpsModuleServiceImplSpec extends Specification {
then: 'the correct schema set is returned'
result.getName().contains('someSchemaSet')
result.getDataspaceName().contains('someDataspace')
- result.getExtendedModuleReferences().contains(new ExtendedModuleReference('stores', 'org:onap:ccsdk:sample', '2020-09-15'))
+ result.getModuleReferences().contains(new ModuleReference('stores', '2020-09-15', 'org:onap:ccsdk:sample'))
}
def 'Delete schema-set when cascade is allowed.'() {
@@ -134,7 +133,7 @@ class CpsModuleServiceImplSpec extends Specification {
def 'Get all yang resources module references.'() {
given: 'an already present module reference'
- def moduleReferences = [new ExtendedModuleReference()]
+ def moduleReferences = [new ModuleReference('some module name','some revision name')]
mockCpsModulePersistenceService.getYangResourceModuleReferences('someDataspaceName') >> moduleReferences
expect: 'the list provided by persistence service is returned as result'
objectUnderTest.getYangResourceModuleReferences('someDataspaceName') == moduleReferences