public void Removing_child_from_layout_unregisters_for_updated() { var layout = new TestLayout(); var view = new TestView(); layout.Add(view); layout.Remove(view); view.RaiseUpdated(); layout.OnChildUpdatedInvocationCount.Should().Be(0); layout.Children.Should().BeEmpty(); }
public void Clearing_children_removes_all_child_views() { var layout = new TestLayout(); var view1 = new TestView(); var view2 = new TestView(); layout.Add(view1); layout.Remove(view2); layout.Clear(); layout.Children.Should().BeEmpty(); }