summaryrefslogtreecommitdiffstats
path: root/cps-ncmp-service/src/test/groovy/org
diff options
context:
space:
mode:
authorkissand <andras.zoltan.kiss@est.tech>2022-06-13 10:55:49 +0200
committerkissand <andras.zoltan.kiss@est.tech>2022-06-13 10:55:49 +0200
commitf696068ae5cced10c0fdf6a1686c4eadbdfdfff0 (patch)
treeaa43df1511e2635e0f7f3041a83a29ed21ff27a3 /cps-ncmp-service/src/test/groovy/org
parent708d2b566a8b8cdf48e1dfe337369c946cec0e02 (diff)
Fix sonar code smells
- https://sonarcloud.io/project/issues?resolved=false&types=CODE_SMELL&id=onap_cps&open=AYFC3OguDZ5Vb3SQMOU1 Issue-ID: CPS-1016 Change-Id: Ic8fdae78337da1ff2c239ae2dfae67e23e88a4bb Signed-off-by: kissand <andras.zoltan.kiss@est.tech>
Diffstat (limited to 'cps-ncmp-service/src/test/groovy/org')
-rw-r--r--cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/NetworkCmProxyCmHandlerQueryServiceSpec.groovy10
-rw-r--r--cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/NetworkCmProxyDataServiceImplSpec.groovy4
2 files changed, 7 insertions, 7 deletions
diff --git a/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/NetworkCmProxyCmHandlerQueryServiceSpec.groovy b/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/NetworkCmProxyCmHandlerQueryServiceSpec.groovy
index a1ad9af191..b689097cc4 100644
--- a/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/NetworkCmProxyCmHandlerQueryServiceSpec.groovy
+++ b/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/NetworkCmProxyCmHandlerQueryServiceSpec.groovy
@@ -25,7 +25,7 @@ import org.onap.cps.ncmp.api.NetworkCmProxyCmHandlerQueryService
import org.onap.cps.spi.CpsAdminPersistenceService
import org.onap.cps.spi.CpsDataPersistenceService
import org.onap.cps.spi.model.Anchor
-import org.onap.cps.spi.model.CmHandleQueryParameters
+import org.onap.cps.spi.model.CmHandleQueryServiceParameters
import org.onap.cps.spi.model.ConditionProperties
import org.onap.cps.spi.model.DataNode
import org.onap.cps.utils.JsonObjectMapper
@@ -44,7 +44,7 @@ class NetworkCmProxyCmHandlerQueryServiceSpec extends Specification {
def 'Retrieve cm handles with public properties when #scenario.'() {
given: 'a condition property'
- def cmHandleQueryParameters = new CmHandleQueryParameters()
+ def cmHandleQueryParameters = new CmHandleQueryServiceParameters()
def conditionProperties = new ConditionProperties()
conditionProperties.conditionName = 'hasAllProperties'
conditionProperties.conditionParameters = publicProperties
@@ -65,7 +65,7 @@ class NetworkCmProxyCmHandlerQueryServiceSpec extends Specification {
def 'Retrieve cm handles with module names when #scenario.'() {
given: 'a condition property'
- def cmHandleQueryParameters = new CmHandleQueryParameters()
+ def cmHandleQueryParameters = new CmHandleQueryServiceParameters()
def conditionProperties = new ConditionProperties()
conditionProperties.conditionName = 'hasAllModules'
conditionProperties.conditionParameters = moduleNames
@@ -86,7 +86,7 @@ class NetworkCmProxyCmHandlerQueryServiceSpec extends Specification {
def 'Retrieve cm handles with combined queries when #scenario.'() {
given: 'condition properties'
- def cmHandleQueryParameters = new CmHandleQueryParameters()
+ def cmHandleQueryParameters = new CmHandleQueryServiceParameters()
def conditionProperties1 = new ConditionProperties()
conditionProperties1.conditionName = 'hasAllProperties'
conditionProperties1.conditionParameters = publicProperties
@@ -111,7 +111,7 @@ class NetworkCmProxyCmHandlerQueryServiceSpec extends Specification {
given: 'mock services'
mockResponses()
when: 'the service is invoked'
- def cmHandleQueryParameters = new CmHandleQueryParameters()
+ def cmHandleQueryParameters = new CmHandleQueryServiceParameters()
def returnedCmHandles = objectUnderTest.queryCmHandles(cmHandleQueryParameters)
then: 'the correct expected cm handles are returned'
returnedCmHandles.stream().map(d -> d.leaves.get('id').toString()).collect(Collectors.toList()) == ['PNFDemo', 'PNFDemo2', 'PNFDemo3', 'PNFDemo4']
diff --git a/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/NetworkCmProxyDataServiceImplSpec.groovy b/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/NetworkCmProxyDataServiceImplSpec.groovy
index 6ba2a2c276..d58fe6a7cd 100644
--- a/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/NetworkCmProxyDataServiceImplSpec.groovy
+++ b/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/NetworkCmProxyDataServiceImplSpec.groovy
@@ -33,7 +33,7 @@ import org.onap.cps.ncmp.api.models.DmiPluginRegistration
import org.onap.cps.ncmp.api.models.NcmpServiceCmHandle
import org.onap.cps.spi.exceptions.DataValidationException
import org.onap.cps.ncmp.api.inventory.sync.ModuleSyncService
-import org.onap.cps.spi.model.CmHandleQueryParameters
+import org.onap.cps.spi.model.CmHandleQueryServiceParameters
import org.onap.cps.spi.model.ConditionProperties
import spock.lang.Shared
@@ -252,7 +252,7 @@ class NetworkCmProxyDataServiceImplSpec extends Specification {
conditionApiProperties.conditionParameters = [[moduleName: 'module-name-1']]
cmHandleQueryApiParameters.cmHandleQueryParameters = [conditionApiProperties]
and: 'valid CmHandleQueryParameters input'
- def cmHandleQueryParameters = new CmHandleQueryParameters()
+ def cmHandleQueryParameters = new CmHandleQueryServiceParameters()
def conditionProperties = new ConditionProperties()
conditionProperties.conditionName = 'hasAllModules'
conditionProperties.conditionParameters = [[moduleName: 'module-name-1']]