Example #1
0
        public void Initial_Children_Should_Have_VisualParent_Set()
        {
            var target = new TestVisual
            {
                InitialChildren = new[] { new Visual(), new Visual() }
            };

            var result = target.GetVisualChildren().Select(x => x.GetVisualParent()).ToList();

            CollectionAssert.AreEqual(new[] { target, target }, result);
        }
Example #2
0
        public void Initial_Children_Should_Be_Created()
        {
            var target = new TestVisual
            {
                InitialChildren = new[] { new Visual(), new Visual() }
            };

            var result = target.GetVisualChildren().ToList();

            CollectionAssert.AreEqual(target.InitialChildren.ToList(), result);
        }