def 'Read bookstore top-level container(s) using #fetchDescendantsOption.'() {
when: 'get data nodes for bookstore container'
- def result = objectUnderTest.getDataNodes(FUNCTIONAL_TEST_DATASPACE, BOOKSTORE_ANCHOR, '/bookstore', fetchDescendantsOption)
+ def result = objectUnderTest.getDataNodes(FUNCTIONAL_TEST_DATASPACE_1, BOOKSTORE_ANCHOR_1, '/bookstore', fetchDescendantsOption)
then: 'the tree consist ouf of #expectNumberOfDataNodes data nodes'
assert countDataNodesInTree(result) == expectNumberOfDataNodes
and: 'the top level data node has the expected attribute and value'
where: 'the following option is used'
fetchDescendantsOption || expectNumberOfDataNodes
FetchDescendantsOption.OMIT_DESCENDANTS || 1
- FetchDescendantsOption.DIRECT_CHILDREN_ONLY || 5
- FetchDescendantsOption.INCLUDE_ALL_DESCENDANTS || 14
- new FetchDescendantsOption(2) || 14
+ FetchDescendantsOption.DIRECT_CHILDREN_ONLY || 6
+ FetchDescendantsOption.INCLUDE_ALL_DESCENDANTS || 17
+ new FetchDescendantsOption(2) || 17
}
def 'Read bookstore top-level container(s) has correct dataspace and anchor.'() {
when: 'get data nodes for bookstore container'
- def result = objectUnderTest.getDataNodes(FUNCTIONAL_TEST_DATASPACE, BOOKSTORE_ANCHOR, '/bookstore', FetchDescendantsOption.INCLUDE_ALL_DESCENDANTS)
+ def result = objectUnderTest.getDataNodes(FUNCTIONAL_TEST_DATASPACE_1, BOOKSTORE_ANCHOR_1, '/bookstore', FetchDescendantsOption.INCLUDE_ALL_DESCENDANTS)
then: 'the correct dataspace was queried'
- assert result.dataspace.toSet() == [FUNCTIONAL_TEST_DATASPACE].toSet()
+ assert result.dataspace.toSet() == [FUNCTIONAL_TEST_DATASPACE_1].toSet()
and: 'the correct anchor was queried'
- assert result.anchorName.toSet() == [BOOKSTORE_ANCHOR].toSet()
+ assert result.anchorName.toSet() == [BOOKSTORE_ANCHOR_1].toSet()
}
}