From 1ea7802768dd6041c60c4be267f5780284032737 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Thu, 26 May 2016 13:17:21 +0100 Subject: [PATCH] NodeItemTest: ensure that removeParent() removes the child from the parent too --- src/test/java/net/kemitix/node/NodeItemTest.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/test/java/net/kemitix/node/NodeItemTest.java b/src/test/java/net/kemitix/node/NodeItemTest.java index 283b042..700b053 100644 --- a/src/test/java/net/kemitix/node/NodeItemTest.java +++ b/src/test/java/net/kemitix/node/NodeItemTest.java @@ -761,11 +761,12 @@ public class NodeItemTest { public void removingParentFromNodeWithParentRemovesParent() { //given node = new NodeItem<>(null); - NodeItem child = new NodeItem<>(null, node); + val child = new NodeItem(null, node); //when child.removeParent(); //then assertThat(child.getParent()).isEmpty(); + assertThat(node.getChildren()).isEmpty(); } @Test