use of org.sonar.server.platform.Platform 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.server.platform.Platform in project sonarqube by SonarSource.
the class RequestIdFilterTest method filter_does_not_fail_when_there_is_no_RequestIdGenerator_in_container.
@Test
public void filter_does_not_fail_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);
}
Aggregations