public void InsertTextNodeAfterWithNullOwner()
 {
     InsertTextNodeAfterCommand command = new InsertTextNodeAfterCommand();
     command.Run();
 }
        public void InsertTextNodeAfter()
        {
            AddChildTextNode();

            XmlText textNode = bodyElement.SelectSingleNode("text()") as XmlText;
            textNode.Value = "OriginalTextNode";

            XmlTextTreeNode textTreeNode = bodyTreeNode.Nodes[0] as XmlTextTreeNode;
            treeView.SelectedNode = textTreeNode;
            InsertTextNodeAfterCommand command = new InsertTextNodeAfterCommand();
            command.Owner = treeViewContainer;
            command.Run();

            XmlTextTreeNode insertedTextTreeNode = bodyTreeNode.LastNode as XmlTextTreeNode;
            XmlText insertedTextNode = bodyElement.LastChild as XmlText;
            Assert.IsNotNull(insertedTextTreeNode);
            Assert.AreEqual(2, bodyTreeNode.Nodes.Count);
            Assert.AreEqual(String.Empty, insertedTextTreeNode.XmlText.Value);
            Assert.IsNotNull(insertedTextNode);
            Assert.AreEqual(2, bodyElement.ChildNodes.Count);
            Assert.AreEqual(String.Empty, insertedTextNode.Value);
        }