NodeItemTest: ensure that removeParent() removes the child from the parent too
This commit is contained in:
parent
136bc0b4ba
commit
1ea7802768
1 changed files with 2 additions and 1 deletions
|
@ -761,11 +761,12 @@ public class NodeItemTest {
|
|||
public void removingParentFromNodeWithParentRemovesParent() {
|
||||
//given
|
||||
node = new NodeItem<>(null);
|
||||
NodeItem<String> child = new NodeItem<>(null, node);
|
||||
val child = new NodeItem<String>(null, node);
|
||||
//when
|
||||
child.removeParent();
|
||||
//then
|
||||
assertThat(child.getParent()).isEmpty();
|
||||
assertThat(node.getChildren()).isEmpty();
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
Loading…
Reference in a new issue