diff options
author | sourabh_sourabh <sourabh.sourabh@est.tech> | 2022-03-04 00:31:07 +0530 |
---|---|---|
committer | sourabh_sourabh <sourabh.sourabh@est.tech> | 2022-03-10 21:54:41 +0530 |
commit | 3d02e9210625b75419089a3f5612f386c3b997ea (patch) | |
tree | c51e4f460588ddd4a06d77563eefee1b91877ff7 /cps-service/src/test | |
parent | 06b6584a741b565922b32bb7e861ae4d16854673 (diff) |
Removed ExtendedModuleReference Object
-Introduced ModuleReference with 2 prop name and revision
-Removed default constructor of ModuleReference
Issue-ID: CPS-592
Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
Change-Id: I27a8a521f133c0773ef0aa0b9700ac42f6bc613b
Diffstat (limited to 'cps-service/src/test')
-rw-r--r-- | cps-service/src/test/groovy/org/onap/cps/api/impl/CpsModuleServiceImplSpec.groovy | 7 |
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 |