コード例 #1
0
 public void InsertElementAfterWithNullOwner()
 {
     InsertElementAfterCommand command = new InsertElementAfterCommand();
     command.Run();
 }
コード例 #2
0
        public void InsertElementAfter()
        {
            treeView.SelectedNode = bodyTreeNode;
            treeViewContainer.AddElementDialogElementNamesReturned.Add("afterBody");
            InsertElementAfterCommand command = new InsertElementAfterCommand();
            command.Owner = treeViewContainer;
            command.Run();

            XmlElement newElement = (XmlElement)doc.SelectSingleNode("/html/afterBody");
            Assert.IsNotNull(newElement, "Expected a new element to be inserted.");
            Assert.AreSame(newElement, doc.DocumentElement.ChildNodes[1]);
        }