public void TestDocumentRemoveStoreTest() { IDocument document = new DocumentFactory().CreateDocument(); string top = "1234567890\n"; string testText = "12345678\n" + "1234567\n" + "123456\n" + "12345\n" + "1234\n" + "123\n" + "12\n" + "1\n" + "\n"; document.TextContent = top + testText; document.Remove(0, top.Length); Assert.AreEqual(document.TextContent, testText); document.Remove(0, document.TextLength); LineSegment line = document.GetLineSegment(0); Assert.AreEqual(0, line.Offset); Assert.AreEqual(0, line.Length); Assert.AreEqual(0, document.TextLength); Assert.AreEqual(1, document.TotalNumberOfLines); }
public void TestDocumentBug1Test() { IDocument document = new DocumentFactory().CreateDocument(); string top = "1234567890"; document.TextContent = top; Assert.AreEqual(document.GetLineSegment(0).Length, document.TextLength); document.Remove(0, document.TextLength); LineSegment line = document.GetLineSegment(0); Assert.AreEqual(0, line.Offset); Assert.AreEqual(0, line.Length); Assert.AreEqual(0, document.TextLength); Assert.AreEqual(1, document.TotalNumberOfLines); }