public void BackspaceOverPara() { XmlElement para = doc.CreateElement("para"); doc.DocumentElement.AppendChild(para); XmlText text = doc.CreateTextNode("testing..."); para.AppendChild(text); Assert.AreEqual(0, v.InvalidNodes.AllErrors.Length, "Errors before backspace"); TextSelectionPoint tsp = new TextSelectionPoint(text, 0); Selection sel = new Selection(tsp); SelectionManager selManager = new SelectionManager(new Stylesheet()); selManager.Backspace(sel); Assert.AreEqual(1, v.InvalidNodes.AllErrors.Length, "Expected error after backspace"); para = doc.CreateElement("para"); doc.DocumentElement.AppendChild(para); para.AppendChild(text); Assert.AreEqual(0, v.InvalidNodes.AllErrors.Length, "Errors still exist after undo"); }