Merge "Update Model to allow Persisting of alternateId"
[cps.git] / cps-ncmp-service / src / test / groovy / org / onap / cps / ncmp / api / impl / utils / DmiServiceUrlBuilderSpec.groovy
index b1a8e85..c83a540 100644 (file)
@@ -32,7 +32,7 @@ import spock.lang.Specification
 class DmiServiceUrlBuilderSpec extends Specification {
 
     static YangModelCmHandle yangModelCmHandle = YangModelCmHandle.toYangModelCmHandle('dmiServiceName',
-        'dmiDataServiceName', 'dmiModuleServiceName', new NcmpServiceCmHandle(cmHandleId: 'some-cm-handle-id'))
+        'dmiDataServiceName', 'dmiModuleServiceName', new NcmpServiceCmHandle(cmHandleId: 'some-cm-handle-id'),'my-module-set-tag', 'my-alternate-id')
 
     NcmpConfiguration.DmiProperties dmiProperties = new NcmpConfiguration.DmiProperties()
 
@@ -81,15 +81,15 @@ class DmiServiceUrlBuilderSpec extends Specification {
         given: 'the required path parameters'
             def batchRequestUriVariables = [dmiServiceName: 'some-service', dmiBasePath: 'testBase', cmHandleId: '123']
         and: 'the relevant query parameters'
-            def batchRequestQueryParams = objectUnderTest.getBatchRequestQueryParams('some topic', 'some id')
+            def batchRequestQueryParams = objectUnderTest.getDataOperationRequestQueryParams('some topic', 'some id')
         when: 'a URL is created'
-            def result = objectUnderTest.getBatchRequestUrl(batchRequestQueryParams, batchRequestUriVariables)
+            def result = objectUnderTest.getDataOperationRequestUrl(batchRequestQueryParams, batchRequestUriVariables)
         then: 'it is formed correctly'
             assert result.toString() == 'some-service/testBase/v1/data?topic=some topic&requestId=some id'
     }
 
     def 'Populate batch uri variables.'() {
         expect: 'Populate batch uri variables returns a map with given service name and base path from setup'
-            assert objectUnderTest.populateBatchUriVariables('some service')  == [ dmiServiceName: 'some service',dmiBasePath: 'dmi' ]
+            assert objectUnderTest.populateDataOperationRequestUriVariables('some service')  == [dmiServiceName: 'some service', dmiBasePath: 'dmi' ]
     }
 }