]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-7876 Add an API for Sensors to report files that can't be analyzed
authorDuarte Meneses <duarte.meneses@sonarsource.com>
Mon, 11 Jul 2016 09:58:46 +0000 (11:58 +0200)
committerDuarte Meneses <duarte.meneses@sonarsource.com>
Mon, 11 Jul 2016 09:58:46 +0000 (11:58 +0200)
plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/rule/AnalysisErrorSensorTest.java

index 8067a67acb26ef4702ca6d1e0924e6c87ea82e1f..d39b66e80f9b89bd497c3c19f87b4c8359f59ad2 100644 (file)
@@ -64,7 +64,11 @@ public class AnalysisErrorSensorTest {
     Path baseDir = temp.newFolder().toPath().toAbsolutePath();
     createErrorFile(baseDir);
 
-    DefaultInputFile inputFile = new DefaultInputFile("foo", "src/foo.xoo").setLanguage("xoo");
+    int[] offsets = {10, 20, 30, 40};
+    DefaultInputFile inputFile = new DefaultInputFile("foo", "src/foo.xoo")
+      .setLanguage("xoo")
+      .setOriginalLineOffsets(offsets)
+      .setLines(4);
     context = SensorContextTester.create(baseDir);
     context.fileSystem().add(inputFile);