diff options
Diffstat (limited to 'cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/operation/DmiOperationsSpec.groovy')
-rw-r--r-- | cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/operation/DmiOperationsSpec.groovy | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/operation/DmiOperationsSpec.groovy b/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/operation/DmiOperationsSpec.groovy index 987ab2bca..6a1ce1a18 100644 --- a/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/operation/DmiOperationsSpec.groovy +++ b/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/operation/DmiOperationsSpec.groovy @@ -92,4 +92,18 @@ class DmiOperationsSpec extends Specification { then: 'the post operation is executed with the correct URL' 1 * mockDmiRestClient.postOperation(expectedUrl, _ as HttpHeaders) } + + def 'Call get resource from dmi with json data.'() { + given: 'expected url & json data' + def requestBody = 'some json' + def expectedUrl = 'testDmiBasePath/dmi/v1/ch/testCmHandle/modules' + def expectedHttpHeaders = new HttpHeaders() + when: 'get resource data is called to dmi' + objectUnderTest.getResourceFromDmiWithJsonData('testDmiBasePath', + requestBody, + 'testCmHandle', + 'modules') + then: 'the post operation is executed with the correct URL and json data' + 1 * mockDmiRestClient.postOperationWithJsonData(expectedUrl, requestBody, expectedHttpHeaders) + } }
\ No newline at end of file |