use of org.sonar.server.component.ComponentFinder in project sonarqube by SonarSource.
the class CreateActionTest method setUp.
@Before
public void setUp() {
ws = new WsTester(new CustomMeasuresWs(new CreateAction(dbClient, userSession, System2.INSTANCE, new CustomMeasureValidator(newFullTypeValidations()), new CustomMeasureJsonWriter(new UserJsonWriter(userSession)), new ComponentFinder(dbClient))));
db.getDbClient().userDao().insert(dbSession, new UserDto().setLogin("login").setName("Login").setEmail("login@login.com").setActive(true));
dbSession.commit();
userSession.logIn("login").addProjectUuidPermissions(UserRole.ADMIN, DEFAULT_PROJECT_UUID);
}
use of org.sonar.server.component.ComponentFinder in project sonarqube by SonarSource.
the class AddActionTest 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 });
underTest = new AddAction(notificationCenter, new NotificationUpdater(userSession, dbClient), dbClient, new ComponentFinder(dbClient), userSession);
ws = new WsActionTester(underTest);
}
use of org.sonar.server.component.ComponentFinder in project sonarqube by SonarSource.
the class DeleteTemplateActionTest method setUp.
@Before
public void setUp() throws Exception {
GroupWsSupport groupWsSupport = new GroupWsSupport(dbClient, TestDefaultOrganizationProvider.from(db));
this.underTestWithoutViews = new WsActionTester(new DeleteTemplateAction(dbClient, userSession, new PermissionWsSupport(dbClient, new ComponentFinder(dbClient), groupWsSupport, resourceTypes), defaultTemplatesResolver));
this.underTestWithViews = new WsActionTester(new DeleteTemplateAction(dbClient, userSession, new PermissionWsSupport(dbClient, new ComponentFinder(dbClient), groupWsSupport, resourceTypesWithViews), defaultTemplatesResolverWithViews));
}
use of org.sonar.server.component.ComponentFinder in project sonarqube by SonarSource.
the class SelectActionTest method setUp.
@Before
public void setUp() {
ComponentFinder componentFinder = new ComponentFinder(dbClient);
underTest = new SelectAction(dbClient, userSession, componentFinder);
ws = new WsActionTester(underTest);
project = db.components().insertProject();
gate = insertQualityGate();
}
use of org.sonar.server.component.ComponentFinder in project sonarqube by SonarSource.
the class DeselectActionTest method setUp.
@Before
public void setUp() {
ComponentFinder componentFinder = new ComponentFinder(dbClient);
underTest = new DeselectAction(qualityGates, dbClient, componentFinder);
ws = new WsActionTester(underTest);
project = db.components().insertProject();
gate = insertQualityGate();
}
Aggregations