From 3d02e9210625b75419089a3f5612f386c3b997ea Mon Sep 17 00:00:00 2001 From: sourabh_sourabh Date: Fri, 4 Mar 2022 00:31:07 +0530 Subject: 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 Change-Id: I27a8a521f133c0773ef0aa0b9700ac42f6bc613b --- .../spi/impl/CpsModulePersistenceServiceConcurrencySpec.groovy | 9 --------- .../spi/impl/CpsModulePersistenceServiceIntegrationSpec.groovy | 4 +--- 2 files changed, 1 insertion(+), 12 deletions(-) (limited to 'cps-ri/src/test') diff --git a/cps-ri/src/test/groovy/org/onap/cps/spi/impl/CpsModulePersistenceServiceConcurrencySpec.groovy b/cps-ri/src/test/groovy/org/onap/cps/spi/impl/CpsModulePersistenceServiceConcurrencySpec.groovy index 085bb3340b..214fd69ff1 100644 --- a/cps-ri/src/test/groovy/org/onap/cps/spi/impl/CpsModulePersistenceServiceConcurrencySpec.groovy +++ b/cps-ri/src/test/groovy/org/onap/cps/spi/impl/CpsModulePersistenceServiceConcurrencySpec.groovy @@ -21,29 +21,20 @@ package org.onap.cps.spi.impl import com.fasterxml.jackson.databind.ObjectMapper import org.hibernate.exception.ConstraintViolationException -import org.mockito.InjectMocks -import org.mockito.Mock import org.onap.cps.spi.CpsAdminPersistenceService import org.onap.cps.spi.CpsModulePersistenceService import org.onap.cps.spi.entities.DataspaceEntity -import org.onap.cps.spi.entities.YangResourceEntity import org.onap.cps.spi.exceptions.DuplicatedYangResourceException -import org.onap.cps.spi.model.ExtendedModuleReference import org.onap.cps.spi.model.ModuleReference import org.onap.cps.spi.repository.AnchorRepository import org.onap.cps.spi.repository.DataspaceRepository -import org.onap.cps.spi.repository.FragmentRepository import org.onap.cps.spi.repository.SchemaSetRepository import org.onap.cps.spi.repository.YangResourceRepository import org.onap.cps.utils.JsonObjectMapper import org.spockframework.spring.SpringBean import org.springframework.beans.factory.annotation.Autowired -import org.springframework.boot.test.context.SpringBootTest -import org.springframework.boot.test.mock.mockito.MockBean import org.springframework.dao.DataIntegrityViolationException -import org.springframework.test.context.jdbc.Sql import spock.lang.Shared -import spock.lang.Specification import java.sql.SQLException diff --git a/cps-ri/src/test/groovy/org/onap/cps/spi/impl/CpsModulePersistenceServiceIntegrationSpec.groovy b/cps-ri/src/test/groovy/org/onap/cps/spi/impl/CpsModulePersistenceServiceIntegrationSpec.groovy index 1b37bef9c6..c4cfa3d50b 100644 --- a/cps-ri/src/test/groovy/org/onap/cps/spi/impl/CpsModulePersistenceServiceIntegrationSpec.groovy +++ b/cps-ri/src/test/groovy/org/onap/cps/spi/impl/CpsModulePersistenceServiceIntegrationSpec.groovy @@ -27,9 +27,7 @@ import org.onap.cps.spi.exceptions.AlreadyDefinedException import org.onap.cps.spi.exceptions.DataspaceNotFoundException import org.onap.cps.spi.exceptions.SchemaSetNotFoundException import org.onap.cps.spi.model.ModuleReference -import org.onap.cps.spi.model.ExtendedModuleReference import org.onap.cps.spi.repository.AnchorRepository -import org.onap.cps.spi.repository.ModuleReferenceRepository import org.onap.cps.spi.repository.SchemaSetRepository import org.springframework.beans.factory.annotation.Autowired import org.springframework.test.context.jdbc.Sql @@ -68,7 +66,7 @@ class CpsModulePersistenceServiceIntegrationSpec extends CpsPersistenceSpecBase static final String NEW_RESOURCE_CHECKSUM = 'b13faef573ed1374139d02c40d8ce09c80ea1dc70e63e464c1ed61568d48d539' static final String NEW_RESOURCE_MODULE_NAME = 'stores' static final String NEW_RESOURCE_REVISION = '2020-09-15' - static final ExtendedModuleReference newModuleReference = ExtendedModuleReference.builder().name(NEW_RESOURCE_MODULE_NAME) + static final ModuleReference newModuleReference = ModuleReference.builder().moduleName(NEW_RESOURCE_MODULE_NAME) .revision(NEW_RESOURCE_REVISION).build() def newYangResourcesNameToContentMap = [(NEW_RESOURCE_NAME):NEW_RESOURCE_CONTENT] -- cgit 1.2.3-korg