diff options
author | Julien HENRY <julien.henry@sonarsource.com> | 2016-06-13 17:12:39 +0200 |
---|---|---|
committer | Julien HENRY <henryju@yahoo.fr> | 2016-07-07 10:04:36 +0200 |
commit | e5818438a289fe522c87245d5bd18d71406f0e39 (patch) | |
tree | 86df13d673acd62016bc8253593bca0154934162 /plugins | |
parent | 2d20c0f3f27356ad1f9aa430f3e5925c50756cfc (diff) | |
download | sonarqube-e5818438a289fe522c87245d5bd18d71406f0e39.tar.gz sonarqube-e5818438a289fe522c87245d5bd18d71406f0e39.zip |
SONAR-7755 deploy/plugins/index.txt should expose SonarLint compatibility
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/XooPluginTest.java | 8 | ||||
-rw-r--r-- | plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/rule/OneIssuePerLineSensorTest.java | 4 |
2 files changed, 8 insertions, 4 deletions
diff --git a/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/XooPluginTest.java b/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/XooPluginTest.java index 138ba56fb5b..6257dea6f92 100644 --- a/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/XooPluginTest.java +++ b/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/XooPluginTest.java @@ -21,21 +21,23 @@ package org.sonar.xoo; import org.junit.Test; import org.sonar.api.Plugin; +import org.sonar.api.SonarProduct; +import org.sonar.api.SonarQubeSide; +import org.sonar.api.SonarRuntime; import org.sonar.api.utils.Version; import org.sonar.xoo.lang.CpdTokenizerSensor; import static org.assertj.core.api.Assertions.assertThat; -import static org.sonar.api.RuntimeApiVersion.V5_5; public class XooPluginTest { @Test public void provide_extensions_for_5_5() { - Plugin.Context context = new Plugin.Context(V5_5, false); + Plugin.Context context = new Plugin.Context(new SonarRuntime(Version.parse("5.5"), SonarProduct.SONARQUBE, SonarQubeSide.SCANNER)); new XooPlugin().define(context); assertThat(context.getExtensions()).hasSize(40).contains(CpdTokenizerSensor.class); - context = new Plugin.Context(Version.parse("5.4"), false); + context = new Plugin.Context(new SonarRuntime(Version.parse("5.4"), SonarProduct.SONARLINT, null)); new XooPlugin().define(context); assertThat(context.getExtensions()).hasSize(39).doesNotContain(CpdTokenizerSensor.class); } diff --git a/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/rule/OneIssuePerLineSensorTest.java b/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/rule/OneIssuePerLineSensorTest.java index 091c20b42f3..e709e31831f 100644 --- a/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/rule/OneIssuePerLineSensorTest.java +++ b/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/rule/OneIssuePerLineSensorTest.java @@ -23,6 +23,8 @@ import java.io.IOException; import org.junit.Rule; import org.junit.Test; import org.junit.rules.TemporaryFolder; +import org.sonar.api.SonarProduct; +import org.sonar.api.SonarQubeSide; import org.sonar.api.batch.fs.internal.DefaultInputFile; import org.sonar.api.batch.rule.Severity; import org.sonar.api.batch.sensor.internal.DefaultSensorDescriptor; @@ -104,7 +106,7 @@ public class OneIssuePerLineSensorTest { SensorContextTester context = SensorContextTester.create(temp.newFolder()); context.fileSystem().add(inputFile); context.settings().setProperty(OneIssuePerLineSensor.EFFORT_TO_FIX_PROPERTY, "1.2"); - context.setRuntime(Version.parse("5.4"), false); + context.setRuntime(Version.parse("5.4"), SonarProduct.SONARQUBE, SonarQubeSide.SCANNER); sensor.execute(context); |