use of org.sonar.api.SonarRuntime in project sonar-web by SonarSource.
the class HtmlSensorTest method test_descriptor_sonarqube_9_3.
@Test
public void test_descriptor_sonarqube_9_3() {
final boolean[] called = { false };
DefaultSensorDescriptor sensorDescriptor = new DefaultSensorDescriptor() {
public SensorDescriptor processesFilesIndependently() {
called[0] = true;
return this;
}
};
SonarRuntime sonarRuntime = SonarRuntimeImpl.forSonarQube(Version.create(9, 3), SonarQubeSide.SCANNER, SonarEdition.COMMUNITY);
new HtmlSensor(sonarRuntime, null, null, new CheckFactory(new DefaultActiveRules(Collections.emptyList()))).describe(sensorDescriptor);
assertThat(sensorDescriptor.name()).isEqualTo("HTML");
assertThat(sensorDescriptor.languages()).isEmpty();
assertTrue(called[0]);
}
Aggregations