use of org.sonar.core.platform.ComponentContainer in project sonarqube by SonarSource.
the class ComputeEngineContainerImpl method startupTasks.
private void startupTasks() {
ComponentContainer startupLevel = this.level4.createChild();
startupLevel.add(startupComponents());
startupLevel.startComponents();
// done in PlatformLevelStartup
ServerLifecycleNotifier serverLifecycleNotifier = startupLevel.getComponentByType(ServerLifecycleNotifier.class);
if (serverLifecycleNotifier != null) {
serverLifecycleNotifier.notifyStart();
}
startupLevel.stopComponents();
}
use of org.sonar.core.platform.ComponentContainer in project sonarqube by SonarSource.
the class MigrationEngineModuleTest method verify_component_count.
@Test
public void verify_component_count() {
ComponentContainer container = new ComponentContainer();
underTest.configure(container);
assertThat(container.getPicoContainer().getComponentAdapters()).hasSize(COMPONENTS_IN_EMPTY_COMPONENT_CONTAINER + 2);
}
use of org.sonar.core.platform.ComponentContainer in project sonarqube by SonarSource.
the class AuthenticationModuleTest method verify_count_of_added_components.
@Test
public void verify_count_of_added_components() {
ComponentContainer container = new ComponentContainer();
new AuthenticationModule().configure(container);
assertThat(container.size()).isEqualTo(2 + 20);
}
use of org.sonar.core.platform.ComponentContainer 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() throws Exception {
expectedException.expect(IllegalStateException.class);
expectedException.expectMessage("Component not found: class org.sonar.server.computation.task.projectanalysis.step.PersistScannerContextStep");
final ExtractReportStep reportExtractionStep = mock(ExtractReportStep.class);
ComponentContainer componentContainer = new ComponentContainer() {
{
addSingleton(reportExtractionStep);
}
};
TaskContainerImpl computeEngineContainer = new TaskContainerImpl(componentContainer, new ContainerPopulator<TaskContainer>() {
@Override
public void populateContainer(TaskContainer container) {
// do nothing
}
});
Lists.newArrayList(new ReportComputationSteps(computeEngineContainer).instances());
}
use of org.sonar.core.platform.ComponentContainer in project sonarqube by SonarSource.
the class WebhookModuleTest method verify_count_of_added_components.
@Test
public void verify_count_of_added_components() {
ComponentContainer container = new ComponentContainer();
underTest.configure(container);
assertThat(container.size()).isEqualTo(4 + COMPONENTS_IN_EMPTY_COMPONENT_CONTAINER);
}
Aggregations