public void RemoveText_Simple() { Init(); lines.SetText("line0\nline1 text\r\nline3"); CollectionAssert.AreEqual(new string[] { "line0\n", "line1 text\r\n", "line3" }, lines.Debug_GetLinesText()); // line0N // line1 textRN // line3 lines.RemoveText(3, 1); CollectionAssert.AreEqual(new string[] { "lin0\n", "line1 text\r\n", "line3" }, lines.Debug_GetLinesText()); Assert.AreEqual(22, lines.charsCount); lines.SetText("line0\nline1 text\r\nline3"); CollectionAssert.AreEqual(new string[] { "line0\n", "line1 text\r\n", "line3" }, lines.Debug_GetLinesText()); lines.RemoveText(6, 9); CollectionAssert.AreEqual(new string[] { "line0\n", "t\r\n", "line3" }, lines.Debug_GetLinesText()); Assert.AreEqual(14, lines.charsCount); lines.SetText("line0\nline1 text\r\nline3"); CollectionAssert.AreEqual(new string[] { "line0\n", "line1 text\r\n", "line3" }, lines.Debug_GetLinesText()); lines.RemoveText(19, 3); CollectionAssert.AreEqual(new string[] { "line0\n", "line1 text\r\n", "l3" }, lines.Debug_GetLinesText()); Assert.AreEqual(20, lines.charsCount); lines.SetText("line0\nline1 text\r\nline3"); CollectionAssert.AreEqual(new string[] { "line0\n", "line1 text\r\n", "line3" }, lines.Debug_GetLinesText()); lines.RemoveText(20, 3); CollectionAssert.AreEqual(new string[] { "line0\n", "line1 text\r\n", "li" }, lines.Debug_GetLinesText()); Assert.AreEqual(20, lines.charsCount); }