summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWeiss, Sara (sw793d) <sara.weiss@intl.att.com>2019-09-09 08:02:31 +0300
committerIttay Stern <ittay.stern@att.com>2019-09-09 15:16:50 +0000
commit919286bf60bb1feb4b3e6ea74f5bc8e6de44fef6 (patch)
tree7d25947442d7c4ba67b5964284279c4311cdab96
parent4edd50d4d8192a68c0bc6ee19d443c82ebf22379 (diff)
add UT to TreeTest
Issue-ID: VID-378 Signed-off-by: Sara Weiss <sara.weiss@intl.att.com> Change-Id: I8ed151cc32c7f71f929846b41ab8388e5f2f69f5
-rw-r--r--vid-app-common/src/test/java/org/onap/vid/utils/TreeTest.java8
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());
+ }
}