public void Clearing_Children_Should_Clear_VisualParent() { var children = new[] { new Visual(), new Visual() }; var target = new TestVisual(); target.AddChildren(children); target.ClearChildren(); var result = children.Select(x => x.GetVisualParent()).ToList(); Assert.Equal(new Visual[] { null, null }, result); }
public void Clearing_Children_Should_Clear_VisualParent() { var target = new TestVisual { InitialChildren = new[] { new Visual(), new Visual() } }; target.ClearChildren(); var result = target.InitialChildren.Select(x => x.GetVisualParent()).ToList(); CollectionAssert.AreEqual(new Visual[] { null, null }, result); }