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); }
public void InsertCommentBeforeWithNullOwner() { InsertCommentBeforeCommand command = new InsertCommentBeforeCommand(); command.Run(); }