aboutsummaryrefslogtreecommitdiffstats
path: root/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/NetworkCmProxyDataServiceImplSpec.groovy
diff options
context:
space:
mode:
Diffstat (limited to 'cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/NetworkCmProxyDataServiceImplSpec.groovy')
-rw-r--r--cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/NetworkCmProxyDataServiceImplSpec.groovy12
1 files changed, 7 insertions, 5 deletions
diff --git a/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/NetworkCmProxyDataServiceImplSpec.groovy b/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/NetworkCmProxyDataServiceImplSpec.groovy
index 51af0f55e..2cd573106 100644
--- a/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/NetworkCmProxyDataServiceImplSpec.groovy
+++ b/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/NetworkCmProxyDataServiceImplSpec.groovy
@@ -22,6 +22,9 @@
package org.onap.cps.ncmp.api.impl
+
+import org.onap.cps.ncmp.api.impl.exception.ServerNcmpException
+
import static org.onap.cps.ncmp.api.impl.operations.DmiOperations.DataStoreEnum.PASSTHROUGH_OPERATIONAL
import static org.onap.cps.ncmp.api.impl.operations.DmiOperations.DataStoreEnum.PASSTHROUGH_RUNNING
import static org.onap.cps.ncmp.api.impl.operations.DmiRequestBody.OperationEnum.CREATE
@@ -94,12 +97,11 @@ class NetworkCmProxyDataServiceImplSpec extends Specification {
'testResourceId', CREATE,
'{some-json}', 'application/json')
then: 'exception is thrown'
- def exceptionThrown = thrown(NcmpException.class)
+ def exceptionThrown = thrown(ServerNcmpException.class)
and: 'details contains (not found) error code: 404'
exceptionThrown.details.contains('404')
}
-
def 'Get resource data for pass-through operational from dmi.'() {
given: 'a data node'
def dataNode = getDataNode(true)
@@ -139,7 +141,7 @@ class NetworkCmProxyDataServiceImplSpec extends Specification {
'testAcceptParam',
'(a=1,b=2)')
then: 'exception is thrown with the expected details'
- def exceptionThrown = thrown(NcmpException.class)
+ def exceptionThrown = thrown(ServerNcmpException.class)
exceptionThrown.details == 'DMI status code: 404, DMI response body: NOK-json'
}
@@ -162,7 +164,7 @@ class NetworkCmProxyDataServiceImplSpec extends Specification {
'testAcceptParam',
'(a=1,b=2)')
then: 'exception is thrown'
- def exceptionThrown = thrown(NcmpException.class)
+ def exceptionThrown = thrown(ServerNcmpException.class)
and: 'details contains the original response'
exceptionThrown.details.contains('NOK-json')
}
@@ -207,7 +209,7 @@ class NetworkCmProxyDataServiceImplSpec extends Specification {
'testAcceptParam',
'(a=1,b=2)')
then: 'exception is thrown'
- def exceptionThrown = thrown(NcmpException.class)
+ def exceptionThrown = thrown(ServerNcmpException.class)
and: 'details contains the original response'
exceptionThrown.details.contains('NOK-json')
}