use of org.sonar.server.component.ComponentFinder in project sonarqube by SonarSource.
the class SearchActionTest method setUp.
@Before
public void setUp() {
ComponentFinder componentFinder = new ComponentFinder(dbClient);
underTest = new SearchAction(dbClient, userSession, componentFinder);
ws = new WsActionTester(underTest);
}
use of org.sonar.server.component.ComponentFinder in project sonarqube by SonarSource.
the class SearchActionTest method setUp.
@Before
public void setUp() {
xoo1 = LanguageTesting.newLanguage("xoo1");
xoo2 = LanguageTesting.newLanguage("xoo2");
Languages languages = new Languages(xoo1, xoo2);
ws = new WsActionTester(new SearchAction(new SearchDataLoader(languages, new QProfileLookup(dbClient), new QProfileFactory(dbClient, defaultOrganizationProvider), dbClient, new ComponentFinder(dbClient), activeRuleIndex), languages));
}
use of org.sonar.server.component.ComponentFinder in project sonarqube by SonarSource.
the class LinesActionTest method setUp.
@Before
public void setUp() {
htmlSourceDecorator = mock(HtmlSourceDecorator.class);
when(htmlSourceDecorator.getDecoratedSourceAsHtml(anyString(), anyString(), anyString())).then(new Answer<String>() {
@Override
public String answer(InvocationOnMock invocationOnMock) throws Throwable {
return "<p>" + invocationOnMock.getArguments()[0] + "</p>";
}
});
sourceService = new SourceService(dbTester.getDbClient(), htmlSourceDecorator);
componentDao = new ComponentDao();
wsTester = new WsTester(new SourcesWs(new LinesAction(new ComponentFinder(dbTester.getDbClient()), dbTester.getDbClient(), sourceService, htmlSourceDecorator, userSessionRule)));
}
use of org.sonar.server.component.ComponentFinder in project sonarqube by SonarSource.
the class WebhookDeliveriesActionTest method setUp.
@Before
public void setUp() {
ComponentFinder componentFinder = new ComponentFinder(dbClient);
WebhookDeliveriesAction underTest = new WebhookDeliveriesAction(dbClient, userSession, componentFinder);
ws = new WsActionTester(underTest);
project = db.components().insertComponent(newProjectDto(db.organizations().insert()).setKey("my-project"));
}
use of org.sonar.server.component.ComponentFinder in project sonarqube by SonarSource.
the class WebhookDeliveryActionTest method setUp.
@Before
public void setUp() {
ComponentFinder componentFinder = new ComponentFinder(dbClient);
WebhookDeliveryAction underTest = new WebhookDeliveryAction(dbClient, userSession, componentFinder);
ws = new WsActionTester(underTest);
project = db.components().insertComponent(newProjectDto(db.organizations().insert()).setKey("my-project"));
}
Aggregations