summaryrefslogtreecommitdiffstats
path: root/cps-ncmp-rest/src/test/groovy/org
diff options
context:
space:
mode:
Diffstat (limited to 'cps-ncmp-rest/src/test/groovy/org')
-rw-r--r--cps-ncmp-rest/src/test/groovy/org/onap/cps/ncmp/rest/controller/NetworkCmProxyControllerSpec.groovy3
-rw-r--r--cps-ncmp-rest/src/test/groovy/org/onap/cps/ncmp/rest/mapper/RestOutputCmHandleStateMapperTest.groovy5
2 files changed, 5 insertions, 3 deletions
diff --git a/cps-ncmp-rest/src/test/groovy/org/onap/cps/ncmp/rest/controller/NetworkCmProxyControllerSpec.groovy b/cps-ncmp-rest/src/test/groovy/org/onap/cps/ncmp/rest/controller/NetworkCmProxyControllerSpec.groovy
index 036928fe35..71258102ed 100644
--- a/cps-ncmp-rest/src/test/groovy/org/onap/cps/ncmp/rest/controller/NetworkCmProxyControllerSpec.groovy
+++ b/cps-ncmp-rest/src/test/groovy/org/onap/cps/ncmp/rest/controller/NetworkCmProxyControllerSpec.groovy
@@ -26,6 +26,7 @@ package org.onap.cps.ncmp.rest.controller
import org.mapstruct.factory.Mappers
import org.onap.cps.ncmp.api.inventory.CmHandleState
import org.onap.cps.ncmp.api.inventory.CompositeState
+import org.onap.cps.ncmp.api.inventory.SyncState
import org.onap.cps.ncmp.api.models.NcmpServiceCmHandle
import org.onap.cps.ncmp.rest.mapper.RestOutputCmHandleStateMapper
import org.onap.cps.ncmp.rest.executor.CpsNcmpTaskExecutor
@@ -392,7 +393,7 @@ class NetworkCmProxyControllerSpec extends Specification {
def dataStores() {
DataStores.builder()
.operationalDataStore(Operational.builder()
- .syncState('NONE_REQUESTED')
+ .syncState(SyncState.NONE_REQUESTED)
.lastSyncTime(formattedDateAndTime.toString()).build()).build()
}
diff --git a/cps-ncmp-rest/src/test/groovy/org/onap/cps/ncmp/rest/mapper/RestOutputCmHandleStateMapperTest.groovy b/cps-ncmp-rest/src/test/groovy/org/onap/cps/ncmp/rest/mapper/RestOutputCmHandleStateMapperTest.groovy
index 22c9fe6056..695ca5ad67 100644
--- a/cps-ncmp-rest/src/test/groovy/org/onap/cps/ncmp/rest/mapper/RestOutputCmHandleStateMapperTest.groovy
+++ b/cps-ncmp-rest/src/test/groovy/org/onap/cps/ncmp/rest/mapper/RestOutputCmHandleStateMapperTest.groovy
@@ -24,6 +24,7 @@ import org.mapstruct.factory.Mappers
import org.onap.cps.ncmp.api.inventory.CmHandleState
import org.onap.cps.ncmp.api.inventory.CompositeStateBuilder
import org.onap.cps.ncmp.api.inventory.LockReasonCategory
+import org.onap.cps.ncmp.api.inventory.SyncState
import org.onap.cps.ncmp.rest.model.RestOutputCmHandleState
import spock.lang.Specification
@@ -43,7 +44,7 @@ class RestOutputCmHandleStateMapperTest extends Specification {
.withCmHandleState(CmHandleState.ADVISED)
.withLastUpdatedTime(formattedDateAndTime.toString())
.withLockReason(LockReasonCategory.LOCKED_MISBEHAVING, 'locked other details')
- .withOperationalDataStores('SYNCHRONIZED', formattedDateAndTime).build()
+ .withOperationalDataStores(SyncState.SYNCHRONIZED, formattedDateAndTime).build()
compositeState.setDataSyncEnabled(false)
when: 'mapper is called'
def result = objectUnderTest.toRestOutputCmHandleState(compositeState)
@@ -54,7 +55,7 @@ class RestOutputCmHandleStateMapperTest extends Specification {
assert result.lastUpdateTime == formattedDateAndTime
assert result.lockReason.reason == 'LOCKED_MISBEHAVING'
assert result.lockReason.details == 'locked other details'
- assert result.cmHandleState == CmHandleState.ADVISED.name()
+ assert result.cmHandleState == 'ADVISED'
assert result.dataSyncState.operational.getState() != null
}