public void GetScrubbedElementTree_InputHasNoParent_ReturnsCloneWithNoParentOrChild()
        {
            A11yElement input = new A11yElement();
            A11yElement copy  = input.GetScrubbedElementTree();

            Assert.IsNotNull(copy);
            Assert.IsNull(copy.Children);
            Assert.IsNull(copy.Parent);
        }
        public void GetScrubbedElementTree_InputHasParent_ReturnsRootOfTree_TreeHasTwoLevels()
        {
            A11yElement input  = new A11yElement();
            A11yElement parent = new A11yElement
            {
                Children = new List <A11yElement> {
                    input
                },
            };

            input.Parent = parent;

            A11yElement copy = input.GetScrubbedElementTree();

            Assert.IsNotNull(copy);
            Assert.IsNull(copy.Parent);
            Assert.IsNotNull(copy.Children);
            Assert.AreEqual(1, copy.Children.Count);
            Assert.IsNull(copy.Children[0].Children);
            Assert.AreSame(copy, copy.Children[0].Parent);
        }
        public void GetScrubbedElementTree_InputIsNull_ReturnsNull()
        {
            A11yElement input = null;

            Assert.IsNull(input.GetScrubbedElementTree());
        }