X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=cps-ncmp-service%2Fsrc%2Ftest%2Fgroovy%2Forg%2Fonap%2Fcps%2Fncmp%2Fapi%2Finventory%2FCompositeStateSpec.groovy;h=76c4d225b17a9ba8685a7e0234e555afce0d685d;hb=37d72855721caa646144ad323fe51ae78af15507;hp=5387fc675ff2ffe25f1eb9d04a58f395419cf7e1;hpb=7bb1a57b47646115c6a33ff9e3b53e3fb0949ea9;p=cps.git diff --git a/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/inventory/CompositeStateSpec.groovy b/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/inventory/CompositeStateSpec.groovy index 5387fc675..76c4d225b 100644 --- a/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/inventory/CompositeStateSpec.groovy +++ b/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/inventory/CompositeStateSpec.groovy @@ -41,20 +41,20 @@ class CompositeStateSpec extends Specification { def "Composite State Specification"() { given: "a Composite State" def compositeState = new CompositeState(cmHandleState: CmHandleState.ADVISED, - lockReason: CompositeState.LockReason.builder().lockReasonCategory(LockReasonCategory.LOCKED_MISBEHAVING).details("lock misbehaving details").build(), + lockReason: CompositeState.LockReason.builder().lockReasonCategory(LockReasonCategory.LOCKED_MODULE_SYNC_FAILED).details("lock details").build(), lastUpdateTime: formattedDateAndTime.toString(), dataSyncEnabled: false, dataStores: dataStores()) when: 'it is represented as JSON' - def jsonStateModelAsString = objectMapper.writerWithDefaultPrettyPrinter().writeValueAsString(compositeState) + def resultJson = objectMapper.writerWithDefaultPrettyPrinter().writeValueAsString(compositeState) then: 'it matches expected state model as JSON' - def expectedStateModelAsjson = getResourceFileContent('expectedStateModel.json') - assert trimAllWhitespace(expectedStateModelAsjson) == trimAllWhitespace(jsonStateModelAsString) + def expectedJson = getResourceFileContent('expectedStateModel.json') + assert trimAllWhitespace(expectedJson) == trimAllWhitespace(resultJson) } def dataStores() { DataStores.builder().operationalDataStore(Operational.builder() - .syncState('NONE_REQUESTED') + .dataStoreSyncState(DataStoreSyncState.NONE_REQUESTED) .lastSyncTime(formattedDateAndTime.toString()).build()) .build() }