diff options
Diffstat (limited to 'vid-app-common/src')
-rw-r--r-- | vid-app-common/src/test/java/org/onap/vid/utils/TreeTest.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/vid-app-common/src/test/java/org/onap/vid/utils/TreeTest.java b/vid-app-common/src/test/java/org/onap/vid/utils/TreeTest.java index eaa9990c2..9b27f6e23 100644 --- a/vid-app-common/src/test/java/org/onap/vid/utils/TreeTest.java +++ b/vid-app-common/src/test/java/org/onap/vid/utils/TreeTest.java @@ -80,4 +80,12 @@ public class TreeTest { assertTrue(subTree.isPathExist("d")); assertFalse(subTree.isPathExist("b","c","d")); } + + @Test + public void getChildrenDepthTest() { + Tree<String> tree = buildTreeForTest(); + assertEquals(3, tree.getChildrenDepth()); + Tree<String> subTree = tree.getSubTree("b"); + assertEquals(2, subTree.getChildrenDepth()); + } } |