Search in sources :

Example 1 with RegisterServletFilters

use of org.sonar.server.platform.web.RegisterServletFilters in project sonarqube by SonarSource.

the class RegisterServletFiltersTest method should_not_fail_if_master_filter_is_not_up.

@Test
public void should_not_fail_if_master_filter_is_not_up() throws ServletException {
    MasterServletFilter.INSTANCE = null;
    new RegisterServletFilters(new ServletFilter[2]).start();
}
Also used : MasterServletFilter(org.sonar.server.platform.web.MasterServletFilter) ServletFilter(org.sonar.api.web.ServletFilter) RegisterServletFilters(org.sonar.server.platform.web.RegisterServletFilters) Test(org.junit.Test)

Example 2 with RegisterServletFilters

use of org.sonar.server.platform.web.RegisterServletFilters in project sonarqube by SonarSource.

the class RegisterServletFiltersTest method filters_should_be_optional.

@Test
public void filters_should_be_optional() throws ServletException {
    MasterServletFilter.INSTANCE = mock(MasterServletFilter.class);
    new RegisterServletFilters().start();
    // do not fail
    verify(MasterServletFilter.INSTANCE).initFilters(anyListOf(ServletFilter.class));
}
Also used : MasterServletFilter(org.sonar.server.platform.web.MasterServletFilter) MasterServletFilter(org.sonar.server.platform.web.MasterServletFilter) ServletFilter(org.sonar.api.web.ServletFilter) RegisterServletFilters(org.sonar.server.platform.web.RegisterServletFilters) Test(org.junit.Test)

Example 3 with RegisterServletFilters

use of org.sonar.server.platform.web.RegisterServletFilters in project sonarqube by SonarSource.

the class RegisterServletFiltersTest method should_register_filters_if_master_filter_is_up.

@Test
public void should_register_filters_if_master_filter_is_up() throws ServletException {
    MasterServletFilter.INSTANCE = mock(MasterServletFilter.class);
    new RegisterServletFilters(new ServletFilter[2]).start();
    verify(MasterServletFilter.INSTANCE).initFilters(anyListOf(ServletFilter.class));
}
Also used : MasterServletFilter(org.sonar.server.platform.web.MasterServletFilter) MasterServletFilter(org.sonar.server.platform.web.MasterServletFilter) ServletFilter(org.sonar.api.web.ServletFilter) RegisterServletFilters(org.sonar.server.platform.web.RegisterServletFilters) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)3 ServletFilter (org.sonar.api.web.ServletFilter)3 MasterServletFilter (org.sonar.server.platform.web.MasterServletFilter)3 RegisterServletFilters (org.sonar.server.platform.web.RegisterServletFilters)3