public void DeleteTextEnd() { // Arrange var buf = new Utf32Buffer(); // Act buf.Add("abxx🌐xxcd"); buf.Delete(4, 5); // Assert Assert.Equal("abxx", buf.ToString()); }
public void InsertText() { // Arrange var buf = new Utf32Buffer(); var strA = "abcd"; var strB = "xx🌐xx"; // Act buf.Add(strA); buf.Insert(2, strB); // Assert Assert.Equal("abxx🌐xxcd", buf.ToString()); }
public void AddText() { // Arrange var buf = new Utf32Buffer(); var str = "ab🌐cde"; // Act buf.Add(str); // Assert Assert.Equal(7, str.Length); Assert.Equal(6, buf.Length); Assert.Equal(str, buf.ToString()); }