summaryrefslogtreecommitdiffstats
path: root/cps-service/src/test/groovy/org
diff options
context:
space:
mode:
authorRishi.Chail <rishi.chail@est.tech>2021-04-14 00:51:44 +0100
committerRishi.Chail <rishi.chail@est.tech>2021-04-26 12:58:17 +0100
commit2b7d23c2ffa067732df1ecc3879d252646dad2da (patch)
treed8ef8bcb618aeb10d2917afd49af0f6d7f0d7cd6 /cps-service/src/test/groovy/org
parent964fc0f1f9a19e64aa45c3f3469a8f4d5079724c (diff)
Get Data under anchor using single root
Issue-ID: CPS-325 Signed-off-by: Rishi.Chail <rishi.chail@est.tech> Change-Id: Id8da3d767199c5767c625b55d175ac6791dcca48
Diffstat (limited to 'cps-service/src/test/groovy/org')
-rwxr-xr-xcps-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 d2f43c9362..8592af908d 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