diff options
author | 2020-12-01 14:07:08 +0000 | |
---|---|---|
committer | 2020-12-01 14:07:08 +0000 | |
commit | 8bd74157dbd47cdf52fffeda8ecd2ac8368cd994 (patch) | |
tree | bc97302a7973b142a95ab0482b8667e765dbbfae /cps-service/src/test | |
parent | 161f6390b9e4231e860811614faf77c573308580 (diff) | |
parent | 46a7718bc0f0d2951ed18795c85f6961f839df25 (diff) |
Merge "Xpath builder on data fragmentation"
Diffstat (limited to 'cps-service/src/test')
-rw-r--r-- | cps-service/src/test/groovy/org/onap/cps/utils/YangUtilsSpec.groovy | 4 |
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']"]) } } |