コード例 #1
0
 public void InsertCommentBeforeWithNullOwner()
 {
     InsertCommentBeforeCommand command = new InsertCommentBeforeCommand();
     command.Run();
 }
コード例 #2
0
        public void InsertCommentBefore()
        {
            treeView.SelectedNode = bodyTreeNode;
            InsertCommentBeforeCommand command = new InsertCommentBeforeCommand();
            command.Owner = treeViewContainer;
            command.Run();

            XmlComment comment = bodyElement.PreviousSibling as XmlComment;
            Assert.IsNotNull(comment, "Expected a new comment node to be inserted.");

            XmlCommentTreeNode treeNode = bodyTreeNode.PrevNode as XmlCommentTreeNode;
            Assert.IsNotNull(treeNode);
            Assert.AreSame(comment, treeNode.XmlComment);
        }