summaryrefslogtreecommitdiffstats
path: root/src/test/groovy/org/onap/cps/ncmp/dmi/service/client/NcmpRestClientSpec.groovy
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/groovy/org/onap/cps/ncmp/dmi/service/client/NcmpRestClientSpec.groovy')
-rw-r--r--src/test/groovy/org/onap/cps/ncmp/dmi/service/client/NcmpRestClientSpec.groovy8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/test/groovy/org/onap/cps/ncmp/dmi/service/client/NcmpRestClientSpec.groovy b/src/test/groovy/org/onap/cps/ncmp/dmi/service/client/NcmpRestClientSpec.groovy
index 4f929865..f5c059c7 100644
--- a/src/test/groovy/org/onap/cps/ncmp/dmi/service/client/NcmpRestClientSpec.groovy
+++ b/src/test/groovy/org/onap/cps/ncmp/dmi/service/client/NcmpRestClientSpec.groovy
@@ -20,14 +20,14 @@
package org.onap.cps.ncmp.dmi.service.client
-import org.onap.cps.ncmp.dmi.config.CpsConfiguration
+import org.onap.cps.ncmp.dmi.config.DmiConfiguration
import org.springframework.http.ResponseEntity
import org.springframework.web.client.RestTemplate
import spock.lang.Specification
class NcmpRestClientSpec extends Specification {
def objectUnderTest = new NcmpRestClient(mockCpsProperties, mockRestTemplate)
- def mockCpsProperties = Mock(CpsConfiguration.CpsProperties)
+ def mockCpsProperties = Mock(DmiConfiguration.CpsProperties)
def mockRestTemplate = Mock(RestTemplate)
def setup() {
@@ -45,12 +45,12 @@ class NcmpRestClientSpec extends Specification {
mockCpsProperties.authPassword >> 'some-password'
and: 'the rest template returns a valid response entity'
def mockResponseEntity = Mock(ResponseEntity)
- when: 'registerCmHandle is invoked'
+ when: 'register cm-handle with ncmp is invoked'
def result = objectUnderTest.registerCmHandlesWithNcmp(jsonData)
then: 'the rest template is called with the correct uri and json in the body'
1 * mockRestTemplate.postForEntity({ it.toString() == 'http://some-uri/some-url' },
{ it.body.contains(jsonData) }, String.class) >> mockResponseEntity
- and: 'the output of the method is the same as the output from the test template'
+ and: 'the output of the method is equal to the output from the test template'
result == mockResponseEntity
}
} \ No newline at end of file