X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=cps-ncmp-service%2Fsrc%2Ftest%2Fgroovy%2Forg%2Fonap%2Fcps%2Fncmp%2Fapi%2Fimpl%2Foperations%2FDmiOperationsBaseSpec.groovy;h=3a82ee3400162939851ae5fb727212ddf8ff1a8c;hb=79b2a7c04f5f81e81c8870bfef15f90b9a9f48b9;hp=dae2bcc0ae0948cbf37db3355f205f0204c73da0;hpb=47d6b392e984181418b920d0ea8fe658f6375acc;p=cps.git diff --git a/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/operations/DmiOperationsBaseSpec.groovy b/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/operations/DmiOperationsBaseSpec.groovy index dae2bcc0a..3a82ee340 100644 --- a/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/operations/DmiOperationsBaseSpec.groovy +++ b/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/operations/DmiOperationsBaseSpec.groovy @@ -25,6 +25,9 @@ import org.onap.cps.ncmp.api.impl.client.DmiRestClient import org.onap.cps.ncmp.api.impl.config.NcmpConfiguration import org.onap.cps.ncmp.api.impl.yangmodels.YangModelCmHandle import org.onap.cps.ncmp.api.impl.utils.DmiServiceUrlBuilder +import org.onap.cps.ncmp.api.inventory.CmHandleState +import org.onap.cps.ncmp.api.inventory.CompositeState +import org.onap.cps.ncmp.api.inventory.InventoryPersistence import org.spockframework.spring.SpringBean import spock.lang.Shared import spock.lang.Specification @@ -38,7 +41,7 @@ abstract class DmiOperationsBaseSpec extends Specification { DmiRestClient mockDmiRestClient = Mock() @SpringBean - YangModelCmHandleRetriever mockCmHandlePropertiesRetriever = Mock() + InventoryPersistence mockInventoryPersistence = Mock() @SpringBean ObjectMapper spyObjectMapper = Spy() @@ -56,6 +59,8 @@ abstract class DmiOperationsBaseSpec extends Specification { yangModelCmHandle.dmiServiceName = dmiServiceName yangModelCmHandle.dmiProperties = dmiProperties yangModelCmHandle.id = cmHandleId - mockCmHandlePropertiesRetriever.getYangModelCmHandle(cmHandleId) >> yangModelCmHandle + yangModelCmHandle.compositeState = new CompositeState() + yangModelCmHandle.compositeState.cmHandleState = CmHandleState.READY + mockInventoryPersistence.getYangModelCmHandle(cmHandleId) >> yangModelCmHandle } }