NodeItemTest: check that parent is set when using NodeItem(data, supplier, parent)

This commit is contained in:
Paul Campbell 2016-05-26 13:08:52 +01:00
parent 6c13cd2735
commit d3b8fa721b

View file

@ -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<String>(null, n -> "overridden", node);
//then
assertThat(child.getName()).isEqualTo("overridden");
assertThat(child.getParent()).contains(node);
}
@Test