diff options
author | 2020-12-11 12:37:35 +0000 | |
---|---|---|
committer | 2020-12-11 12:37:35 +0000 | |
commit | a0da7f6b3e04ee6f06f4580f8a14e60f3438d5e7 (patch) | |
tree | 58e2b7b641627b27c2b43993293cb45b0f670f70 /cps-rest/src/test | |
parent | e182a6b6cb4a87b4f461adf83fe60a65948fc230 (diff) |
Remove depredcated code/classes
Issue-ID: CPS-93
Signed-off-by: niamhcore <niamh.core@est.tech>
Change-Id: I49db5244400d5eb4206d59e73aaf801b7f90c61c
Diffstat (limited to 'cps-rest/src/test')
-rw-r--r-- | cps-rest/src/test/groovy/org/onap/cps/rest/exceptions/CpsRestExceptionHandlerSpec.groovy | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/cps-rest/src/test/groovy/org/onap/cps/rest/exceptions/CpsRestExceptionHandlerSpec.groovy b/cps-rest/src/test/groovy/org/onap/cps/rest/exceptions/CpsRestExceptionHandlerSpec.groovy index d951cbeb6..e427c6063 100644 --- a/cps-rest/src/test/groovy/org/onap/cps/rest/exceptions/CpsRestExceptionHandlerSpec.groovy +++ b/cps-rest/src/test/groovy/org/onap/cps/rest/exceptions/CpsRestExceptionHandlerSpec.groovy @@ -20,7 +20,7 @@ package org.onap.cps.rest.exceptions import groovy.json.JsonSlurper -import org.onap.cps.api.CpService +import org.onap.cps.api.CpsAdminService import org.onap.cps.spi.exceptions.AnchorAlreadyDefinedException import org.onap.cps.spi.exceptions.CpsException import org.onap.cps.spi.exceptions.DataValidationException @@ -50,12 +50,12 @@ class CpsRestExceptionHandlerSpec extends Specification { def existingObjectName = 'MyAdminObject' def cpsRestController = new CpsRestController() - def mockCpService = Mock(CpService.class) + def mockCpsAdminService = Mock(CpsAdminService.class) def objectUnderTest = new CpsRestExceptionHandler() def mockMvc = standaloneSetup(cpsRestController).setControllerAdvice(objectUnderTest).build() def setup() { - cpsRestController.cpService = mockCpService + cpsRestController.cpsAdminService = mockCpsAdminService } def 'Get request with runtime exception returns HTTP Status Internal Server Error'() { @@ -130,11 +130,11 @@ class CpsRestExceptionHandlerSpec extends Specification { */ def setupTestException(exception) { - mockCpService.getJsonById(_) >> { throw exception } + mockCpsAdminService.getAnchors(_) >> { throw exception} } def performTestRequest() { - return mockMvc.perform(get('/json-object/1')).andReturn().response + return mockMvc.perform(get('/v1/dataspaces/dataspace-name/anchors')).andReturn().response } void assertTestResponse(response, expectedStatus, expectedErrorMessage, expectedErrorDetails) { |