diff options
author | ToineSiebelink <toine.siebelink@est.tech> | 2020-11-10 16:32:50 +0000 |
---|---|---|
committer | Ruslan Kashapov <ruslan.kashapov@pantheon.tech> | 2020-12-01 13:24:01 +0200 |
commit | 46a7718bc0f0d2951ed18795c85f6961f839df25 (patch) | |
tree | f1d521a52247897e22718fa71b7c61bdfce3d1f1 /cps-service/src/test/groovy | |
parent | e731118eca0540792a140803f18c298fb3be132d (diff) |
Xpath builder on data fragmentation
Issue-ID: CPS-72
Change-Id: Iab5be2bf0dd7d5540b8880bbf5ab2c6ed9342a9e
Signed-off-by: Ruslan Kashapov <ruslan.kashapov@pantheon.tech>
Diffstat (limited to 'cps-service/src/test/groovy')
-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']"]) } } |