diff options
author | 2021-12-03 13:22:51 +0000 | |
---|---|---|
committer | 2021-12-03 13:22:51 +0000 | |
commit | f1e1acb92cb2b891b2a9e64b99ad85c26758fbe2 (patch) | |
tree | a4ee6f767ef4e9f713d147cf2dcd0dff8414883f /cps-ncmp-service/src/test | |
parent | 7c483c72e3643abb0d425f0092c15310c5359276 (diff) | |
parent | 14ace1a5da8dd770acd098cf2de575c16962ee78 (diff) |
Merge "Changing putOperationWithJson to postOperationWithJson"
Diffstat (limited to 'cps-ncmp-service/src/test')
2 files changed, 1 insertions, 11 deletions
diff --git a/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/client/DmiRestClientSpec.groovy b/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/client/DmiRestClientSpec.groovy index a1779a757..8c46178dd 100644 --- a/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/client/DmiRestClientSpec.groovy +++ b/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/client/DmiRestClientSpec.groovy @@ -43,16 +43,6 @@ class DmiRestClientSpec extends Specification { DmiRestClient objectUnderTest def resourceUrl = 'some url' - def 'DMI PUT operation.'() { - given: 'the rest template returns a valid response entity' - def mockResponseEntity = Mock(ResponseEntity) - mockRestTemplate.exchange(resourceUrl, HttpMethod.PUT, _ as HttpEntity, Object.class) >> mockResponseEntity - when: 'PUT operation is invoked' - def result = objectUnderTest.putOperationWithJsonData(resourceUrl, 'json-data', new HttpHeaders()) - then: 'the output of the method is equal to the output from the test template' - result == mockResponseEntity - } - def 'DMI POST operation'() { given: 'the rest template returns a valid response entity' def mockResponseEntity = Mock(ResponseEntity) diff --git a/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/operations/DmiDataOperationsSpec.groovy b/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/operations/DmiDataOperationsSpec.groovy index 674a44238..b9704b1ea 100644 --- a/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/operations/DmiDataOperationsSpec.groovy +++ b/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/operations/DmiDataOperationsSpec.groovy @@ -45,7 +45,7 @@ class DmiDataOperationsSpec extends DmiOperationsBaseSpec { mockPersistenceCmHandleRetrieval(additionalProperties) and: 'a positive response from dmi service when it is called with the expected parameters' def responseFromDmi = new ResponseEntity<Object>(HttpStatus.OK) - mockDmiRestClient.putOperationWithJsonData( + mockDmiRestClient.postOperationWithJsonData( "${dmiServiceName}/dmi/v1/ch/${cmHandleId}/data/ds/ncmp-datastore:${expectedDatastoreInUrl}?resourceIdentifier=${resourceIdentifier}${expectedOptionsInUrl}", expectedJson, [Accept:['sample accept header']]) >> responseFromDmi when: 'get resource data is invoked' |