From d3b8fa721b3151ad13943a370368d85fd0e56916 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Thu, 26 May 2016 13:08:52 +0100 Subject: [PATCH] NodeItemTest: check that parent is set when using NodeItem(data, supplier, parent) --- 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 68770a2..277b81a 100644 --- a/src/test/java/net/kemitix/node/NodeItemTest.java +++ b/src/test/java/net/kemitix/node/NodeItemTest.java @@ -55,9 +55,10 @@ public class NodeItemTest { //given node = new NodeItem<>(null, n -> "root name supplier"); //when - val child = new NodeItem<>(null, n -> "overridden", node); + val child = new NodeItem(null, n -> "overridden", node); //then assertThat(child.getName()).isEqualTo("overridden"); + assertThat(child.getParent()).contains(node); } @Test