summaryrefslogtreecommitdiffstats
path: root/cps-service/src/test/groovy/org/onap/cps/spi/exceptions/CpsExceptionsSpec.groovy
diff options
context:
space:
mode:
Diffstat (limited to 'cps-service/src/test/groovy/org/onap/cps/spi/exceptions/CpsExceptionsSpec.groovy')
-rwxr-xr-x[-rw-r--r--]cps-service/src/test/groovy/org/onap/cps/spi/exceptions/CpsExceptionsSpec.groovy8
1 files changed, 7 insertions, 1 deletions
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 067556dd5..e00a640d4 100644..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
@@ -104,4 +104,10 @@ class CpsExceptionsSpec extends Specification {
(new SchemaSetNotFoundException(dataspaceName,schemaSetName)).details
== "Schema Set with name ${schemaSetName} was not found for dataspace ${dataspaceName}."
}
-}
+
+ def 'Creating a exception that an anchor cannot be found.'() {
+ expect: 'the exception details contains the correct message with dataspace and anchor name'
+ (new AnchorNotFoundException(anchorName, dataspaceName)).details
+ == "Anchor with name ${anchorName} does not exist in dataspace ${dataspaceName}."
+ }
+} \ No newline at end of file