Search in sources :

Example 1 with QualityGateFinder

use of org.sonar.server.qualitygate.QualityGateFinder in project sonarqube by SonarSource.

the class ComponentActionTest method init.

private void init(Page... pages) {
    PluginRepository pluginRepository = mock(PluginRepository.class);
    when(pluginRepository.hasPlugin(anyString())).thenReturn(true);
    PageRepository pageRepository = new PageRepository(pluginRepository, new PageDefinition[] { context -> {
        for (Page page : pages) {
            context.addPage(page);
        }
    } });
    pageRepository.start();
    ws = new WsActionTester(new ComponentAction(dbClient, pageRepository, resourceTypes, userSession, new ComponentFinder(dbClient), new QualityGateFinder(dbClient)));
}
Also used : ComponentFinder(org.sonar.server.component.ComponentFinder) PluginRepository(org.sonar.core.platform.PluginRepository) PageRepository(org.sonar.server.ui.PageRepository) Page(org.sonar.api.web.page.Page) QualityGateFinder(org.sonar.server.qualitygate.QualityGateFinder) WsActionTester(org.sonar.server.ws.WsActionTester)

Aggregations

Page (org.sonar.api.web.page.Page)1 PluginRepository (org.sonar.core.platform.PluginRepository)1 ComponentFinder (org.sonar.server.component.ComponentFinder)1 QualityGateFinder (org.sonar.server.qualitygate.QualityGateFinder)1 PageRepository (org.sonar.server.ui.PageRepository)1 WsActionTester (org.sonar.server.ws.WsActionTester)1