diff options
author | mpriyank <priyank.maheshwari@est.tech> | 2024-08-23 16:33:44 +0100 |
---|---|---|
committer | mpriyank <priyank.maheshwari@est.tech> | 2024-08-27 12:44:15 +0100 |
commit | 9718417885caa9581a9115ba07e2060bd38ec9b8 (patch) | |
tree | fe718fcfef86d3f7174966ffa4d0659dec828c87 /cps-ncmp-rest/src/test | |
parent | 102127e47d8ce02a73ccadbd4c60498b59241925 (diff) |
Support for alternate-id CPS-E05 composite state
- Added support for alternate id for the composite state API for
CPS-E05#15
Issue-ID: CPS-2377
Change-Id: I1af41efb8cec762be68250cae7c1e98fbc61a4f5
Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
Diffstat (limited to 'cps-ncmp-rest/src/test')
-rw-r--r-- | cps-ncmp-rest/src/test/groovy/org/onap/cps/ncmp/rest/controller/NetworkCmProxyControllerSpec.groovy | 9 |
1 files changed, 4 insertions, 5 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 9f5331dbc3..92b47c6c8b 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 @@ -32,7 +32,6 @@ import groovy.json.JsonSlurper import org.mapstruct.factory.Mappers import org.onap.cps.TestUtils import org.onap.cps.events.EventsPublisher -import org.onap.cps.ncmp.api.data.models.CmResourceAddress import org.onap.cps.ncmp.api.inventory.NetworkCmProxyInventoryFacade import org.onap.cps.ncmp.api.inventory.models.CompositeState import org.onap.cps.ncmp.api.inventory.models.NcmpServiceCmHandle @@ -95,7 +94,7 @@ class NetworkCmProxyControllerSpec extends Specification { NetworkCmProxyInventoryFacade mockNetworkCmProxyInventoryFacade = Mock() @SpringBean - AlternateIdMatcher mockalternateIdMatcher = Mock() + AlternateIdMatcher mockAlternateIdMatcher = Mock() @SpringBean ObjectMapper objectMapper = new ObjectMapper() @@ -324,13 +323,13 @@ class NetworkCmProxyControllerSpec extends Specification { assertContainsPublicProperties(response) } - def 'Get Cm Handle composite state by Cm Handle id.'() { + def 'Get Cm Handle composite state by Cm Handle Reference.'() { given: 'a cm handle state endpoint' - def cmHandlePropertiesEndpoint = "$ncmpBasePathV1/ch/some-cm-handle/state" + def cmHandlePropertiesEndpoint = "$ncmpBasePathV1/ch/some-cm-handle-reference/state" and: 'some cm handle composite state' def compositeState = compositeStateTestObject() and: 'the service method is invoked with the cm handle id returning the cm handle composite state' - 1 * mockNetworkCmProxyInventoryFacade.getCmHandleCompositeState('some-cm-handle') >> compositeState + 1 * mockNetworkCmProxyInventoryFacade.getCmHandleCompositeState('some-cm-handle-reference') >> compositeState when: 'the cm handle state api is invoked' def response = mvc.perform(get(cmHandlePropertiesEndpoint)).andReturn().response then: 'the correct response is returned' |