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=8592af908d8aa20c451b8ffc20af1675d4701c3f;hb=2b7d23c2ffa067732df1ecc3879d252646dad2da;hp=d2f43c9362a773a1aab222722c8b2fa7c58d771f;hpb=964fc0f1f9a19e64aa45c3f3469a8f4d5079724c;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 d2f43c936..8592af908 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 @@ -119,12 +119,18 @@ class CpsExceptionsSpec extends Specification { + "Anchor records associated.") } - def 'Creating a exception that a datanode does not exist.'() { + def 'Creating a exception that a datanode with a specified xpath does not exist.'() { expect: 'the exception details contains the correct message with dataspace name and xpath.' (new DataNodeNotFoundException(dataspaceName, anchorName, xpath)).details == "DataNode with xpath ${xpath} was not found for anchor ${anchorName} and dataspace ${dataspaceName}." } + def 'Creating a exception that a datanode does not exist.'() { + expect: 'the exception details contains the correct message with dataspace name and anchor.' + (new DataNodeNotFoundException(dataspaceName, anchorName)).details + == "DataNode not found for anchor ${anchorName} and dataspace ${dataspaceName}." + } + def 'Creating a exception that a dataspace already exists.'() { expect: 'the exception details contains the correct message with dataspace name.' (AlreadyDefinedException.forDataspace(dataspaceName, rootCause)).details