use of org.sonar.server.component.ComponentFinder in project sonarqube by SonarSource.
the class MetricsActionTest method setUp.
@Before
public void setUp() throws Exception {
es.putDocuments(UserIndexDefinition.INDEX_TYPE_USER.getIndex(), UserIndexDefinition.INDEX_TYPE_USER.getType(), new UserDoc().setLogin("login").setName("Login").setEmail("login@login.com").setActive(true));
ws = new WsTester(new CustomMeasuresWs(new MetricsAction(dbClient, userSession, new ComponentFinder(dbClient))));
defaultProject = insertDefaultProject();
userSession.logIn().addProjectUuidPermissions(UserRole.ADMIN, defaultProject.uuid());
}
use of org.sonar.server.component.ComponentFinder in project sonarqube by SonarSource.
the class RemoveActionTest method setUp.
@Before
public void setUp() {
NotificationDispatcherMetadata metadata1 = NotificationDispatcherMetadata.create(NOTIF_MY_NEW_ISSUES).setProperty(GLOBAL_NOTIFICATION, "true").setProperty(PER_PROJECT_NOTIFICATION, "true");
NotificationDispatcherMetadata metadata2 = NotificationDispatcherMetadata.create(NOTIF_NEW_ISSUES).setProperty(GLOBAL_NOTIFICATION, "true");
NotificationDispatcherMetadata metadata3 = NotificationDispatcherMetadata.create(NOTIF_NEW_QUALITY_GATE_STATUS).setProperty(GLOBAL_NOTIFICATION, "true").setProperty(PER_PROJECT_NOTIFICATION, "true");
notificationCenter = new NotificationCenter(new NotificationDispatcherMetadata[] { metadata1, metadata2, metadata3 }, new NotificationChannel[] { emailChannel, twitterChannel, defaultChannel });
notificationUpdater = new NotificationUpdater(userSession, dbClient);
underTest = new RemoveAction(notificationCenter, notificationUpdater, dbClient, new ComponentFinder(dbClient), userSession);
ws = new WsActionTester(underTest);
}
use of org.sonar.server.component.ComponentFinder in project sonarqube by SonarSource.
the class CreateActionTest method setUp.
@Before
public void setUp() {
ComponentFinder componentFinder = new ComponentFinder(dbClient);
underTest = new CreateAction(dbClient, userSession, componentFinder);
ws = new WsActionTester(underTest);
}
use of org.sonar.server.component.ComponentFinder in project sonarqube by SonarSource.
the class ProjectStatusActionTest method setUp.
@Before
public void setUp() {
dbClient = db.getDbClient();
dbSession = db.getSession();
ws = new WsActionTester(new ProjectStatusAction(dbClient, new ComponentFinder(dbClient), userSession));
}
use of org.sonar.server.component.ComponentFinder in project sonarqube by SonarSource.
the class HashActionTest method before.
@Before
public void before() {
DbClient dbClient = db.getDbClient();
tester = new WsTester(new SourcesWs(new HashAction(dbClient, userSessionRule, new ComponentFinder(dbClient))));
}
Aggregations