use of org.sonar.server.component.ComponentFinder in project sonarqube by SonarSource.
the class IndexActionTest method setUp.
@Before
public void setUp() {
when(dbClient.componentDao()).thenReturn(componentDao);
when(dbClient.openSession(false)).thenReturn(session);
tester = new WsTester(new SourcesWs(new IndexAction(dbClient, sourceService, userSessionRule, new ComponentFinder(dbClient))));
}
use of org.sonar.server.component.ComponentFinder in project sonarqube by SonarSource.
the class RawActionTest method setUp.
@Before
public void setUp() {
when(dbClient.componentDao()).thenReturn(componentDao);
when(dbClient.openSession(false)).thenReturn(session);
tester = new WsTester(new SourcesWs(new RawAction(dbClient, sourceService, userSessionRule, new ComponentFinder(dbClient))));
}
use of org.sonar.server.component.ComponentFinder in project sonarqube by SonarSource.
the class ShowActionTest method setUp.
@Before
public void setUp() {
when(dbClient.componentDao()).thenReturn(componentDao);
when(dbClient.openSession(false)).thenReturn(session);
tester = new WsTester(new SourcesWs(new ShowAction(sourceService, dbClient, userSessionRule, new ComponentFinder(dbClient))));
}
use of org.sonar.server.component.ComponentFinder 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)));
}
Aggregations