예제 #1
0
        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);
        }
예제 #2
0
        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);
        }