use of org.sonar.core.platform.ComponentContainer in project sonarqube by SonarSource.
the class MeasuresWsModuleTest method verify_count_of_added_components.
@Test
public void verify_count_of_added_components() {
ComponentContainer container = new ComponentContainer();
new MeasuresWsModule().configure(container);
assertThat(container.size()).isEqualTo(6 + 2);
}
use of org.sonar.core.platform.ComponentContainer in project sonarqube by SonarSource.
the class RequestIdFilterTest method setUp.
@Before
public void setUp() throws Exception {
ComponentContainer container = new ComponentContainer();
container.add(requestIdGenerator);
when(platform.getContainer()).thenReturn(container);
}
use of org.sonar.core.platform.ComponentContainer in project sonarqube by SonarSource.
the class RequestIdFilterTest method filter_does_not_add_requestId_to_request_passed_on_to_chain_when_there_is_no_RequestIdGenerator_in_container.
@Test
public void filter_does_not_add_requestId_to_request_passed_on_to_chain_when_there_is_no_RequestIdGenerator_in_container() throws IOException, ServletException {
Platform platform = mock(Platform.class);
when(platform.getContainer()).thenReturn(new ComponentContainer());
RequestIdFilter underTest = new RequestIdFilter(platform);
underTest.doFilter(servletRequest, servletResponse, filterChain);
verify(servletRequest, times(0)).setAttribute(anyString(), anyString());
}
use of org.sonar.core.platform.ComponentContainer in project sonarqube by SonarSource.
the class ProjectAnalysisModuleTest method verify_count_of_added_components.
@Test
public void verify_count_of_added_components() {
ComponentContainer container = new ComponentContainer();
new ProjectAnalysisModule().configure(container);
assertThat(container.size()).isEqualTo(2 + 6);
}
use of org.sonar.core.platform.ComponentContainer in project sonarqube by SonarSource.
the class ProjectTagsWsModuleTest method verify_count_of_added_components.
@Test
public void verify_count_of_added_components() {
ComponentContainer container = new ComponentContainer();
new ProjectTagsWsModule().configure(container);
assertThat(container.size()).isEqualTo(COMPONENTS_IN_EMPTY_COMPONENT_CONTAINER + 3);
}
Aggregations