public void InsertThenDeleteExact() { var textChange = TextChange.CreateReduced( TextChange.NewInsert("cat"), TextChange.NewDeleteLeft(3)); Assert.Equal("", textChange.AsInsert().Item); }
public void InsertThenDeleteMore() { var textChange = TextChange.CreateReduced( TextChange.NewInsert("cat"), TextChange.NewDeleteLeft(4)); Assert.Equal(1, textChange.AsDeleteLeft().Item); }
public void DoubleDeleteRight() { var textChange = TextChange.CreateReduced( TextChange.NewDeleteRight(5), TextChange.NewDeleteRight(6)); Assert.Equal(11, textChange.AsDeleteRight().Item); }
public void DoubleInsert() { var textChange = TextChange.CreateReduced( TextChange.NewInsert("a"), TextChange.NewInsert("b")); Assert.Equal("ab", textChange.AsInsert().Item); }
public void InsertThenDeletePartial() { var textChange = TextChange.CreateReduced( TextChange.NewInsert("cat"), TextChange.NewDeleteLeft(2)); Assert.Equal("c", textChange.AsInsert().Text); }
public void InsertAndDeleteLeft() { var textChange = TextChange.CreateReduced( TextChange.NewCombination( TextChange.NewInsert("cat"), TextChange.NewDeleteLeft(3)), TextChange.NewDeleteRight(3)); Assert.Equal(3, textChange.AsDeleteRight().Item); }
public void Issue1108() { var textChange = TextChange.CreateReduced( TextChange.NewInsert("pr"), TextChange.NewCombination( TextChange.NewDeleteLeft(2), TextChange.NewInsert("protected"))); Assert.Equal("protected", textChange.AsInsert().Item); }