Search in sources :

Example 11 with TextDiff

use of com.google.startupos.common.Protos.TextDiff in project startup-os by google.

the class TextDifferencerTest method testLeftAndRightAreEqual.

@Test
public void testLeftAndRightAreEqual() {
    String text = "aaa";
    TextDiff expectedTextDiff = TextDiff.newBuilder().setLeftFileContents(text).setRightFileContents(text).build();
    assertEquals(expectedTextDiff, differencer.getTextDiff(text, text, ""));
}
Also used : TextDiff(com.google.startupos.common.Protos.TextDiff) Test(org.junit.Test)

Aggregations

TextDiff (com.google.startupos.common.Protos.TextDiff)11 Test (org.junit.Test)9 ChangeType (com.google.startupos.common.Protos.ChangeType)1 DiffLine (com.google.startupos.common.Protos.DiffLine)1 ArrayList (java.util.ArrayList)1