@Override protected void run(@NotNull Result result) { myFixture.getTempDirFixture().createFile("fileName.txt"); } }.execute();
@NotNull private GoCoverageAnnotator annotate(@NotNull String fileName, @NotNull String... fileNames) throws IOException { myFixture.getTempDirFixture().createFile(fileName); for (String name : fileNames) { myFixture.getTempDirFixture().createFile(name); } return annotate(parseData("coverage.out")); }
public void testSimple() { myFixture.getTempDirFixture().createFile("fileName.txt"); doTest("fileN<caret>", "fileName.txt<caret>"); }
public void testNegation() throws IOException { myFixture.getTempDirFixture().createFile("fileName.txt"); doTest("!fileNa<caret>", "!fileName.txt<caret>"); }
public void testSimple() { myFixture.getTempDirFixture().createFile("fileName.txt"); doTest("fileNa<caret>me.txt", "fileName.txt"); }
public void testNegation() throws IOException { myFixture.getTempDirFixture().createFile("fileName.txt"); doTest("!fileNa<caret>me.txt", "fileName.txt"); }
public void testMerging() throws IOException { VirtualFile file = myFixture.getTempDirFixture().createFile(file()); GoCoverageProjectData firstData = parseData("coverage.out"); GoCoverageProjectData secondData = parseData("coverage_for_merge.out"); GoCoverageAnnotator firstAnnotator = annotate(firstData); GoCoverageAnnotator secondAnnotator = annotate(secondData); firstData.merge(secondData); GoCoverageAnnotator mergeAnnotator = annotate(firstData); assertEquals("75% statements", firstAnnotator.getFileCoverageInformationString(file)); assertEquals("33.3% statements", secondAnnotator.getFileCoverageInformationString(file)); assertEquals("80% statements", mergeAnnotator.getFileCoverageInformationString(file)); }