diff options
Diffstat (limited to 'src/test/groovy/org/onap/cps/ncmp/dmi/service/operation')
-rw-r--r-- | src/test/groovy/org/onap/cps/ncmp/dmi/service/operation/SdncOperationsSpec.groovy | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/test/groovy/org/onap/cps/ncmp/dmi/service/operation/SdncOperationsSpec.groovy b/src/test/groovy/org/onap/cps/ncmp/dmi/service/operation/SdncOperationsSpec.groovy index 3557bc1b..c9d7d1b8 100644 --- a/src/test/groovy/org/onap/cps/ncmp/dmi/service/operation/SdncOperationsSpec.groovy +++ b/src/test/groovy/org/onap/cps/ncmp/dmi/service/operation/SdncOperationsSpec.groovy @@ -56,7 +56,7 @@ class SdncOperationsSpec extends Specification { when: 'get module resources is called with the expected parameters' objectUnderTest.getModuleResource(nodeId, 'some-json-data') then: 'the SDNC Rest client is invoked with the correct URL and json data' - 1 * mockSdncRestClient.postOperationWithJsonData(expectedUrl, 'some-json-data') + 1 * mockSdncRestClient.postOperationWithJsonData(expectedUrl, 'some-json-data', _ as HttpHeaders) } def 'Get resource data from node to SDNC.'() { @@ -68,4 +68,13 @@ class SdncOperationsSpec extends Specification { then: 'the get operation is executed with the correct URL' 1 * mockSdncRestClient.getOperation(expectedUrl, _ as HttpHeaders) } + + def 'Write resource data to SDNC.'() { + given: 'excpected url, topology-id, sdncOperation object' + def expectedUrl = '/rests/data/network-topology:network-topology/topology=test-topology/node=node1/yang-ext:mount/testResourceId' + when: 'write resource data for pass through running is called' + objectUnderTest.writeResourceDataPassthroughRunning('node1', 'testResourceId', 'application/json','testData') + then: 'the post operation is executed with the correct URL' + 1 * mockSdncRestClient.postOperationWithJsonData(expectedUrl, _ as String, _ as HttpHeaders) + } }
\ No newline at end of file |