use of org.sonar.ce.task.step.ComputationStep in project sonarqube by SonarSource.
the class ReportComputationStepsTest method instances_throws_ISE_if_container_does_not_have_second_step.
@Test
public void instances_throws_ISE_if_container_does_not_have_second_step() {
ExtractReportStep reportExtractionStep = mock(ExtractReportStep.class);
SpringComponentContainer componentContainer = new SpringComponentContainer() {
{
add(reportExtractionStep);
}
}.startComponents();
TaskContainerImpl computeEngineContainer = new TaskContainerImpl(componentContainer, container -> {
// do nothing
});
computeEngineContainer.startComponents();
Iterable<ComputationStep> instances = new ReportComputationSteps(computeEngineContainer).instances();
assertThatThrownBy(() -> newArrayList(instances)).isInstanceOf(IllegalStateException.class).hasMessageContaining("org.sonar.ce.task.projectanalysis.step.PersistScannerContextStep");
}
use of org.sonar.ce.task.step.ComputationStep in project sonarqube by SonarSource.
the class ReportComputationStepsTest method instances_throws_ISE_if_container_does_not_have_any_step.
@Test
public void instances_throws_ISE_if_container_does_not_have_any_step() {
TaskContainerImpl computeEngineContainer = new TaskContainerImpl(new SpringComponentContainer(), container -> {
// do nothing
});
Iterable<ComputationStep> instances = new ReportComputationSteps(computeEngineContainer).instances();
assertThatThrownBy(() -> newArrayList(instances)).isInstanceOf(IllegalStateException.class).hasMessageContaining(ExtractReportStep.class.getName());
}
use of org.sonar.ce.task.step.ComputationStep in project sonarqube by SonarSource.
the class IssueSyncTaskProcessorTest method orderedStepClasses.
@Test
public void orderedStepClasses() {
SyncComputationSteps syncComputationSteps = new SyncComputationSteps(null);
List<Class<? extends ComputationStep>> steps = syncComputationSteps.orderedStepClasses();
Assertions.assertThat(steps).containsExactly(IgnoreOrphanBranchStep.class, IndexIssuesStep.class);
}
use of org.sonar.ce.task.step.ComputationStep in project sonarqube by SonarSource.
the class ProjectExportComputationStepsTest method instances_throws_ISE_if_container_does_not_have_second_step.
@Test
public void instances_throws_ISE_if_container_does_not_have_second_step() {
ComplexityMeasuresStep reportExtractionStep = mock(ComplexityMeasuresStep.class);
SpringComponentContainer componentContainer = new SpringComponentContainer() {
{
add(reportExtractionStep);
}
}.startComponents();
TaskContainerImpl computeEngineContainer = new TaskContainerImpl(componentContainer, container -> {
// do nothing
});
computeEngineContainer.startComponents();
Iterable<ComputationStep> instances = new ProjectExportComputationSteps(computeEngineContainer).instances();
assertThatThrownBy(() -> Lists.newArrayList(instances)).isInstanceOf(IllegalStateException.class).hasMessageContaining("class org.sonar.ce.task.projectexport.steps.LoadProjectStep");
}
use of org.sonar.ce.task.step.ComputationStep in project sonarqube by SonarSource.
the class AuditPurgeTaskProcessorTest method orderedStepClasses.
@Test
public void orderedStepClasses() {
AuditPurgeComputationSteps auditPurgeComputationSteps = new AuditPurgeComputationSteps(null);
List<Class<? extends ComputationStep>> steps = auditPurgeComputationSteps.orderedStepClasses();
Assertions.assertThat(steps).containsExactly(AuditPurgeStep.class);
}
Aggregations