@Test void comments() { InputFile inputFile = TestUtils.inputFile("src/test/files/metrics/Comments.java"); NoSonarFilter noSonarFilter = mock(NoSonarFilter.class); JavaAstScanner.scanSingleFileForTests(inputFile, new VisitorsBridge(new Measurer(context, noSonarFilter))); verify(noSonarFilter).noSonarInFile(inputFile, Collections.singleton(15)); }
@VisibleForTesting public static void scanSingleFileForTests(InputFile file, VisitorsBridge visitorsBridge) { scanSingleFileForTests(file, visitorsBridge, new JavaVersionImpl(), null); }
JavaAstScanner { @VisibleForTesting public static void scanSingleFileForTests(InputFile file, VisitorsBridge visitorsBridge) { scanSingleFileForTests(file, visitorsBridge, new JavaVersionImpl(), null); } }
JavaAstScanner { @VisibleForTesting public static void scanSingleFileForTests(InputFile file, VisitorsBridge visitorsBridge) { scanSingleFileForTests(file, visitorsBridge, new JavaVersionImpl(), null); } JavaAstScanner(@Nullable SonarComponents sonarComponents); }
JavaAstScanner { @VisibleForTesting public static void scanSingleFileForTests(InputFile file, VisitorsBridge visitorsBridge) { scanSingleFileForTests(file, visitorsBridge, new JavaVersionImpl(), null); } JavaAstScanner(@Nullable SonarComponents sonarComponents); void scan(Iterable<? extends InputFile> inputFiles); void setVisitorBridge(VisitorsBridge visitor); @VisibleForTesting static void scanSingleFileForTests(InputFile file, VisitorsBridge visitorsBridge); @VisibleForTesting static void scanSingleFileForTests(InputFile inputFile, VisitorsBridge visitorsBridge, JavaVersion javaVersion, @Nullable SonarComponents sonarComponents); }
JavaAstScanner { @VisibleForTesting public static void scanSingleFileForTests(InputFile file, VisitorsBridge visitorsBridge) { scanSingleFileForTests(file, visitorsBridge, new JavaVersionImpl(), null); } JavaAstScanner(@Nullable SonarComponents sonarComponents); void scan(Iterable<? extends InputFile> inputFiles); void setVisitorBridge(VisitorsBridge visitor); @VisibleForTesting static void scanSingleFileForTests(InputFile file, VisitorsBridge visitorsBridge); @VisibleForTesting static void scanSingleFileForTests(InputFile inputFile, VisitorsBridge visitorsBridge, JavaVersion javaVersion, @Nullable SonarComponents sonarComponents);  }