summaryrefslogtreecommitdiffstats
path: root/cps-ri/src/test
diff options
context:
space:
mode:
authorleventecsanyi <levente.csanyi@est.tech>2024-09-17 12:07:32 +0200
committerleventecsanyi <levente.csanyi@est.tech>2024-09-17 17:28:32 +0200
commit4310430012a1bd939d406ec8a53045a128505ec9 (patch)
tree8cc09de92521cd4351f75aa5edca26a7f4532e27 /cps-ri/src/test
parent3cf653576440e233d195e2e54851aec833ee9922 (diff)
Refactored cps-ri package structure
- fixed import order and moved package structure Issue-ID: CPS-2293 Change-Id: Ie2f9f057f261577054530feee7480850ba4b41e1 Signed-off-by: leventecsanyi <levente.csanyi@est.tech>
Diffstat (limited to 'cps-ri/src/test')
-rw-r--r--cps-ri/src/test/groovy/org/onap/cps/ri/CpsDataPersistenceServiceImplSpec.groovy (renamed from cps-ri/src/test/groovy/org/onap/cps/spi/impl/CpsDataPersistenceServiceSpec.groovy)20
-rw-r--r--cps-ri/src/test/groovy/org/onap/cps/ri/CpsModulePersistenceServiceConcurrencySpec.groovy (renamed from cps-ri/src/test/groovy/org/onap/cps/spi/impl/CpsModulePersistenceServiceConcurrencySpec.groovy)14
-rw-r--r--cps-ri/src/test/groovy/org/onap/cps/ri/CpsModulePersistenceServiceImplSpec.groovy (renamed from cps-ri/src/test/groovy/org/onap/cps/spi/impl/CpsModulePersistenceServiceSpec.groovy)15
-rw-r--r--cps-ri/src/test/groovy/org/onap/cps/ri/utils/CpsValidatorImplSpec.groovy (renamed from cps-ri/src/test/groovy/org/onap/cps/spi/impl/utils/CpsValidatorSpec.groovy)5
-rw-r--r--cps-ri/src/test/groovy/org/onap/cps/ri/utils/EscapeUtilsSpec.groovy (renamed from cps-ri/src/test/groovy/org/onap/cps/spi/utils/EscapeUtilsSpec.groovy)2
-rw-r--r--cps-ri/src/test/groovy/org/onap/cps/ri/utils/SessionManagerSpec.groovy (renamed from cps-ri/src/test/groovy/org/onap/cps/spi/utils/SessionManagerSpec.groovy)12
6 files changed, 34 insertions, 34 deletions
diff --git a/cps-ri/src/test/groovy/org/onap/cps/spi/impl/CpsDataPersistenceServiceSpec.groovy b/cps-ri/src/test/groovy/org/onap/cps/ri/CpsDataPersistenceServiceImplSpec.groovy
index c72c3046e8..36bf55e2db 100644
--- a/cps-ri/src/test/groovy/org/onap/cps/spi/impl/CpsDataPersistenceServiceSpec.groovy
+++ b/cps-ri/src/test/groovy/org/onap/cps/ri/CpsDataPersistenceServiceImplSpec.groovy
@@ -18,29 +18,29 @@
* ============LICENSE_END=========================================================
*/
-package org.onap.cps.spi.impl
+package org.onap.cps.ri
import com.fasterxml.jackson.databind.ObjectMapper
import org.hibernate.StaleStateException
+import org.onap.cps.ri.models.AnchorEntity
+import org.onap.cps.ri.models.DataspaceEntity
+import org.onap.cps.ri.models.FragmentEntity
+import org.onap.cps.ri.repository.AnchorRepository
+import org.onap.cps.ri.repository.DataspaceRepository
+import org.onap.cps.ri.repository.FragmentRepository
+import org.onap.cps.ri.utils.SessionManager
import org.onap.cps.spi.FetchDescendantsOption
-import org.onap.cps.spi.entities.AnchorEntity
-import org.onap.cps.spi.entities.DataspaceEntity
-import org.onap.cps.spi.entities.FragmentEntity
-
import org.onap.cps.spi.exceptions.ConcurrencyException
import org.onap.cps.spi.exceptions.DataValidationException
import org.onap.cps.spi.model.DataNode
import org.onap.cps.spi.model.DataNodeBuilder
-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.utils.SessionManager
import org.onap.cps.utils.JsonObjectMapper
import org.springframework.dao.DataIntegrityViolationException
import spock.lang.Specification
+
import java.util.stream.Collectors
-class CpsDataPersistenceServiceSpec extends Specification {
+class CpsDataPersistenceServiceImplSpec extends Specification {
def mockDataspaceRepository = Mock(DataspaceRepository)
def mockAnchorRepository = Mock(AnchorRepository)
diff --git a/cps-ri/src/test/groovy/org/onap/cps/spi/impl/CpsModulePersistenceServiceConcurrencySpec.groovy b/cps-ri/src/test/groovy/org/onap/cps/ri/CpsModulePersistenceServiceConcurrencySpec.groovy
index 2e4dba2e9b..b892fe4dae 100644
--- a/cps-ri/src/test/groovy/org/onap/cps/spi/impl/CpsModulePersistenceServiceConcurrencySpec.groovy
+++ b/cps-ri/src/test/groovy/org/onap/cps/ri/CpsModulePersistenceServiceConcurrencySpec.groovy
@@ -18,19 +18,19 @@
* SPDX-License-Identifier: Apache-2.0
* ============LICENSE_END=========================================================
*/
-package org.onap.cps.spi.impl
+package org.onap.cps.ri
import org.hibernate.exception.ConstraintViolationException
+import org.onap.cps.ri.models.DataspaceEntity
+import org.onap.cps.ri.models.SchemaSetEntity
+import org.onap.cps.ri.repository.DataspaceRepository
+import org.onap.cps.ri.repository.ModuleReferenceRepository
+import org.onap.cps.ri.repository.SchemaSetRepository
+import org.onap.cps.ri.repository.YangResourceRepository
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.SchemaSetEntity
import org.onap.cps.spi.exceptions.DuplicatedYangResourceException
import org.onap.cps.spi.model.ModuleReference
-import org.onap.cps.spi.repository.DataspaceRepository
-import org.onap.cps.spi.repository.ModuleReferenceRepository
-import org.onap.cps.spi.repository.SchemaSetRepository
-import org.onap.cps.spi.repository.YangResourceRepository
import org.spockframework.spring.SpringBean
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.boot.test.context.SpringBootTest
diff --git a/cps-ri/src/test/groovy/org/onap/cps/spi/impl/CpsModulePersistenceServiceSpec.groovy b/cps-ri/src/test/groovy/org/onap/cps/ri/CpsModulePersistenceServiceImplSpec.groovy
index 3447a1c599..1b61ff39c0 100644
--- a/cps-ri/src/test/groovy/org/onap/cps/spi/impl/CpsModulePersistenceServiceSpec.groovy
+++ b/cps-ri/src/test/groovy/org/onap/cps/ri/CpsModulePersistenceServiceImplSpec.groovy
@@ -17,25 +17,26 @@
* ============LICENSE_END=========================================================
*/
-package org.onap.cps.spi.impl
+package org.onap.cps.ri
import org.hibernate.exception.ConstraintViolationException
+import org.onap.cps.ri.models.SchemaSetEntity
+import org.onap.cps.ri.repository.DataspaceRepository
+import org.onap.cps.ri.repository.ModuleReferenceRepository
+import org.onap.cps.ri.repository.SchemaSetRepository
+import org.onap.cps.ri.repository.YangResourceRepository
import org.onap.cps.spi.CpsModulePersistenceService
-import org.onap.cps.spi.entities.SchemaSetEntity
import org.onap.cps.spi.exceptions.DuplicatedYangResourceException
import org.onap.cps.spi.model.ModuleReference
-import org.onap.cps.spi.repository.DataspaceRepository
-import org.onap.cps.spi.repository.ModuleReferenceRepository
-import org.onap.cps.spi.repository.SchemaSetRepository
-import org.onap.cps.spi.repository.YangResourceRepository
import org.springframework.dao.DataIntegrityViolationException
import spock.lang.Specification
+
import java.sql.SQLException
/**
* Specification unit test class for CPS module persistence service.
*/
-class CpsModulePersistenceServiceSpec extends Specification {
+class CpsModulePersistenceServiceImplSpec extends Specification {
CpsModulePersistenceService objectUnderTest
diff --git a/cps-ri/src/test/groovy/org/onap/cps/spi/impl/utils/CpsValidatorSpec.groovy b/cps-ri/src/test/groovy/org/onap/cps/ri/utils/CpsValidatorImplSpec.groovy
index 8d348443c7..d57bf25058 100644
--- a/cps-ri/src/test/groovy/org/onap/cps/spi/impl/utils/CpsValidatorSpec.groovy
+++ b/cps-ri/src/test/groovy/org/onap/cps/ri/utils/CpsValidatorImplSpec.groovy
@@ -18,13 +18,14 @@
* ============LICENSE_END=========================================================
*/
-package org.onap.cps.spi.impl.utils
+package org.onap.cps.ri.utils
+
import org.onap.cps.spi.PaginationOption
import org.onap.cps.spi.exceptions.DataValidationException
import spock.lang.Specification
-class CpsValidatorSpec extends Specification {
+class CpsValidatorImplSpec extends Specification {
def objectUnderTest = new CpsValidatorImpl()
diff --git a/cps-ri/src/test/groovy/org/onap/cps/spi/utils/EscapeUtilsSpec.groovy b/cps-ri/src/test/groovy/org/onap/cps/ri/utils/EscapeUtilsSpec.groovy
index 52330e6251..8afd9695a7 100644
--- a/cps-ri/src/test/groovy/org/onap/cps/spi/utils/EscapeUtilsSpec.groovy
+++ b/cps-ri/src/test/groovy/org/onap/cps/ri/utils/EscapeUtilsSpec.groovy
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.onap.cps.spi.utils
+package org.onap.cps.ri.utils
import spock.lang.Specification
diff --git a/cps-ri/src/test/groovy/org/onap/cps/spi/utils/SessionManagerSpec.groovy b/cps-ri/src/test/groovy/org/onap/cps/ri/utils/SessionManagerSpec.groovy
index feda338b80..b50a20c124 100644
--- a/cps-ri/src/test/groovy/org/onap/cps/spi/utils/SessionManagerSpec.groovy
+++ b/cps-ri/src/test/groovy/org/onap/cps/ri/utils/SessionManagerSpec.groovy
@@ -18,20 +18,18 @@
* ============LICENSE_END=========================================================
*/
-package org.onap.cps.spi.utils
+package org.onap.cps.ri.utils
import com.google.common.util.concurrent.TimeLimiter
import com.google.common.util.concurrent.UncheckedExecutionException
import org.hibernate.HibernateException
+import org.hibernate.Session
import org.hibernate.Transaction
-import org.onap.cps.spi.config.CpsSessionFactory
-import org.onap.cps.spi.entities.AnchorEntity
+import org.onap.cps.ri.models.AnchorEntity
+import org.onap.cps.ri.repository.AnchorRepository
+import org.onap.cps.ri.repository.DataspaceRepository
import org.onap.cps.spi.exceptions.SessionManagerException
-import org.onap.cps.spi.repository.AnchorRepository
-import org.onap.cps.spi.repository.DataspaceRepository
import spock.lang.Specification
-import org.hibernate.Session
-import java.util.concurrent.ExecutionException
class SessionManagerSpec extends Specification {