summaryrefslogtreecommitdiffstats
path: root/cps-service/src/test/groovy
diff options
context:
space:
mode:
Diffstat (limited to 'cps-service/src/test/groovy')
-rw-r--r--cps-service/src/test/groovy/org/onap/cps/utils/YangUtilsSpec.groovy4
1 files changed, 4 insertions, 0 deletions
diff --git a/cps-service/src/test/groovy/org/onap/cps/utils/YangUtilsSpec.groovy b/cps-service/src/test/groovy/org/onap/cps/utils/YangUtilsSpec.groovy
index 6a463ad6f5..801e43079a 100644
--- a/cps-service/src/test/groovy/org/onap/cps/utils/YangUtilsSpec.groovy
+++ b/cps-service/src/test/groovy/org/onap/cps/utils/YangUtilsSpec.groovy
@@ -96,6 +96,10 @@ class YangUtilsSpec extends Specification{
result.childFragments.size() == 2
and: 'each child (category) has the root fragment (result) as parent and in turn as 1 child (a list of books)'
result.childFragments.each { it.parentFragment == result && it.childFragments.size() == 1 }
+ and: 'the fragments have the correct xpaths'
+ assert result.xpath == '/bookstore'
+ assert result.childFragments.collect { it.xpath }
+ .containsAll(["/bookstore/categories[@code='01']", "/bookstore/categories[@code='02']"])
}
}