use of com.google.errorprone.matchers.Description in project error-prone by google.
the class DescriptionBasedDiffTest method prefixDiff.
@Test
public void prefixDiff() {
DescriptionBasedDiff diff = createDescriptionBasedDiff();
diff.onDescribed(new Description(null, "message", SuggestedFix.replace(140, 140, "bar"), SeverityLevel.SUGGESTION));
diff.applyDifferences(sourceFile);
assertThat(sourceFile.getLines()).containsExactly("package foo.bar;", "import org.bar.Baz;", "import com.foo.Bar;", "", "class Foo {", " public static void main(String[] args) {", " System.out.println(\"foobar\");", " }", "}").inOrder();
}
Aggregations