aboutsummaryrefslogtreecommitdiffstats
path: root/server/src/test/java
diff options
context:
space:
mode:
authorAdam Wagner <wbadam@users.noreply.github.com>2017-07-27 14:09:28 +0300
committerHenri Sara <henri.sara@gmail.com>2017-07-27 14:09:28 +0300
commit42f7eba5e70c7ae2f3958f4e75e196dedfacc9c3 (patch)
tree9b571d45a43f01373f0dc47aa4e2e4a979f22eb1 /server/src/test/java
parent390fd31dc18d026a60a89e9b5cba040859cc3393 (diff)
downloadvaadin-framework-42f7eba5e70c7ae2f3958f4e75e196dedfacc9c3.tar.gz
vaadin-framework-42f7eba5e70c7ae2f3958f4e75e196dedfacc9c3.zip
Add method to get parent in TreeData (#9701)
Diffstat (limited to 'server/src/test/java')
-rw-r--r--server/src/test/java/com/vaadin/data/provider/TreeDataProviderTest.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/server/src/test/java/com/vaadin/data/provider/TreeDataProviderTest.java b/server/src/test/java/com/vaadin/data/provider/TreeDataProviderTest.java
index 8232d2fc45..3ff94e9988 100644
--- a/server/src/test/java/com/vaadin/data/provider/TreeDataProviderTest.java
+++ b/server/src/test/java/com/vaadin/data/provider/TreeDataProviderTest.java
@@ -81,6 +81,14 @@ public class TreeDataProviderTest
}
@Test
+ public void treeData_get_parent() {
+ StrBean root = rootData.get(0);
+ StrBean firstChild = data.getChildren(root).get(0);
+ Assert.assertNull(data.getParent(root));
+ Assert.assertEquals(root, data.getParent(firstChild));
+ }
+
+ @Test
public void treeData_set_parent() {
StrBean item1 = rootData.get(0);
StrBean item2 = rootData.get(1);