use of org.sonar.server.component.ComponentFinder in project sonarqube by SonarSource.
the class IssuesActionTest method before.
@Before
public void before() {
IssueIndex issueIndex = new IssueIndex(es.client(), system2, userSessionRule, new AuthorizationTypeSupport(userSessionRule));
IssuesAction issuesAction = new IssuesAction(db.getDbClient(), issueIndex, userSessionRule, new ComponentFinder(db.getDbClient()));
tester = new WsTester(new BatchWs(issuesAction));
}
use of org.sonar.server.component.ComponentFinder in project sonarqube by SonarSource.
the class AppActionTest method setUp.
@Before
public void setUp() {
insertMetrics();
wsTester = new WsTester(new ComponentsWs(new AppAction(dbTester.getDbClient(), userSessionRule, new ComponentFinder(dbTester.getDbClient())), mock(SuggestionsAction.class)));
}
use of org.sonar.server.component.ComponentFinder in project sonarqube by SonarSource.
the class TreeActionTest method setUp.
@Before
public void setUp() {
ws = new WsActionTester(new TreeAction(dbClient, new ComponentFinder(dbClient), resourceTypes, userSession, Mockito.mock(I18n.class)));
resourceTypes.setChildrenQualifiers(Qualifiers.MODULE, Qualifiers.FILE, Qualifiers.DIRECTORY);
resourceTypes.setLeavesQualifiers(Qualifiers.FILE, Qualifiers.UNIT_TEST_FILE);
}
use of org.sonar.server.component.ComponentFinder in project sonarqube by SonarSource.
the class ShowActionTest method setUp.
@Before
public void setUp() {
tester = new WsTester(new DuplicationsWs(new ShowAction(db.getDbClient(), parser, duplicationsJsonWriter, userSessionRule, new ComponentFinder(db.getDbClient()))));
db.getDbClient().metricDao().insert(db.getSession(), dataMetric);
db.commit();
}
use of org.sonar.server.component.ComponentFinder in project sonarqube by SonarSource.
the class SearchActionTest method setUp.
@Before
public void setUp() {
CustomMeasureJsonWriter customMeasureJsonWriter = new CustomMeasureJsonWriter(new UserJsonWriter(userSessionRule));
ws = new WsTester(new CustomMeasuresWs(new SearchAction(dbClient, customMeasureJsonWriter, userSessionRule, new ComponentFinder(dbClient))));
defaultProject = insertDefaultProject();
userSessionRule.logIn().addProjectUuidPermissions(UserRole.ADMIN, defaultProject.uuid());
db.getDbClient().userDao().insert(dbSession, new UserDto().setLogin("login").setName("Login").setEmail("login@login.com").setActive(true));
dbSession.commit();
}
Aggregations