use of org.sonar.server.computation.task.step.ComputationStep in project sonarqube by SonarSource.
the class LoadMeasureComputersStepTest method fail_with_ISE_when_no_metrics_are_defined_by_plugin_but_measure_computer_use_a_new_metric.
@Test
public void fail_with_ISE_when_no_metrics_are_defined_by_plugin_but_measure_computer_use_a_new_metric() throws Exception {
thrown.expect(IllegalStateException.class);
thrown.expectMessage("Metric 'metric1' cannot be used as an output metric as no plugin declare this metric");
MeasureComputer[] computers = new MeasureComputer[] { newMeasureComputer(array(NCLOC_KEY), array(NEW_METRIC_1)) };
ComputationStep underTest = new LoadMeasureComputersStep(holder, computers);
underTest.execute();
}
use of org.sonar.server.computation.task.step.ComputationStep in project sonarqube by SonarSource.
the class LoadMeasureComputersStepTest method return_empty_list_when_no_measure_computers.
@Test
public void return_empty_list_when_no_measure_computers() throws Exception {
ComputationStep underTest = new LoadMeasureComputersStep(holder, array(new TestMetrics()));
underTest.execute();
assertThat(holder.getMeasureComputers()).isEmpty();
}
Aggregations