X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=cps-service%2Fsrc%2Ftest%2Fgroovy%2Forg%2Fonap%2Fcps%2Fspi%2Fexceptions%2FCpsExceptionsSpec.groovy;h=5bd3678346269fa47a59009d979af830b5569e1a;hb=09c6b6e1fa2684c913d7b904f7c7ad6b26b04ef1;hp=4243c18c24f8acce5ed24da11b97580ad716552b;hpb=9e09fe868b39fd5f13092a923da3474deb0f75b9;p=cps.git diff --git a/cps-service/src/test/groovy/org/onap/cps/spi/exceptions/CpsExceptionsSpec.groovy b/cps-service/src/test/groovy/org/onap/cps/spi/exceptions/CpsExceptionsSpec.groovy index 4243c18c2..5bd367834 100755 --- a/cps-service/src/test/groovy/org/onap/cps/spi/exceptions/CpsExceptionsSpec.groovy +++ b/cps-service/src/test/groovy/org/onap/cps/spi/exceptions/CpsExceptionsSpec.groovy @@ -170,4 +170,12 @@ class CpsExceptionsSpec extends Specification { expect: 'the exception has the provided details' exception.details == providedDetails } + + def 'Creating an exception that the dataspace is being used and cannot be deleted.'() { + given: 'a dataspace in use exception is created' + def exception = new DataspaceInUseException(dataspaceName,providedDetails) + expect: 'the exception has the correct message with dataspace name and provided details' + exception.message == "Dataspace with name ${dataspaceName} is being used." + exception.details == providedDetails + } }