org.sonar.api.SonarEdition Java Examples

The following examples show how to use org.sonar.api.SonarEdition. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ClojurePluginTest.java    From sonar-clojure with MIT License 5 votes vote down vote up
@Before
public void setUp() {
    SonarRuntime runtime = SonarRuntimeImpl
            .forSonarQube(Version.create(7, 9, 3), SonarQubeSide.SERVER, SonarEdition.COMMUNITY);
    context = new Plugin.Context(runtime);
    new ClojurePlugin().define(context);
}
 
Example #2
Source File: AemRulesSonarPluginTest.java    From AEM-Rules-for-SonarQube with Apache License 2.0 5 votes vote down vote up
@Test
public void webPluginTester() {
    Plugin.Context context = new Plugin.Context(SonarRuntimeImpl.forSonarQube(Version.create(6, 7), SonarQubeSide.SERVER, SonarEdition.COMMUNITY));

    new AemRulesSonarPlugin().define(context);
    assertThat(context.getExtensions()).hasSize(7);
}
 
Example #3
Source File: EsqlPluginTest.java    From sonar-esql-plugin with Apache License 2.0 5 votes vote down vote up
private List<PropertyDefinition> properties() {
  List<PropertyDefinition> propertiesList = new ArrayList<>();
  List extensions = setupContext(SonarRuntimeImpl.forSonarQube(Version.create(7, 9), SonarQubeSide.SERVER, SonarEdition.COMMUNITY)).getExtensions();

  for (Object extension : extensions) {
    if (extension instanceof PropertyDefinition) {
      propertiesList.add((PropertyDefinition) extension);
    }
  }

  return propertiesList;
}
 
Example #4
Source File: EsqlPluginTest.java    From sonar-esql-plugin with Apache License 2.0 4 votes vote down vote up
@Test
public void count_extensions() throws Exception {
  Plugin.Context context = setupContext(SonarRuntimeImpl.forSonarQube(Version.create(7, 9), SonarQubeSide.SERVER, SonarEdition.COMMUNITY));

  assertThat(context.getExtensions()).hasSize(10);
}