Search in sources :

Example 11 with WsActionTester

use of org.sonar.server.ws.WsActionTester in project sonarqube by SonarSource.

the class SearchTemplatesActionTest method setUp.

@Before
public void setUp() {
    DefaultTemplatesResolver defaultTemplatesResolverWithViews = new DefaultTemplatesResolverImpl(resourceTypesWithoutViews);
    SearchTemplatesDataLoader dataLoaderWithViews = new SearchTemplatesDataLoader(dbClient, defaultTemplatesResolverWithViews);
    underTestWithoutViews = new WsActionTester(new SearchTemplatesAction(dbClient, userSession, i18n, newPermissionWsSupport(), dataLoaderWithViews));
    i18n.setProjectPermissions();
    userSession.logIn().addPermission(ADMINISTER, db.getDefaultOrganization());
}
Also used : WsActionTester(org.sonar.server.ws.WsActionTester) Before(org.junit.Before)

Example 12 with WsActionTester

use of org.sonar.server.ws.WsActionTester 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();
}
Also used : ComponentFinder(org.sonar.server.component.ComponentFinder) WsActionTester(org.sonar.server.ws.WsActionTester) Before(org.junit.Before)

Example 13 with WsActionTester

use of org.sonar.server.ws.WsActionTester 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();
}
Also used : ComponentFinder(org.sonar.server.component.ComponentFinder) WsActionTester(org.sonar.server.ws.WsActionTester) Before(org.junit.Before)

Example 14 with WsActionTester

use of org.sonar.server.ws.WsActionTester 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);
}
Also used : ComponentFinder(org.sonar.server.component.ComponentFinder) WsActionTester(org.sonar.server.ws.WsActionTester) Before(org.junit.Before)

Example 15 with WsActionTester

use of org.sonar.server.ws.WsActionTester in project sonarqube by SonarSource.

the class DeleteActionTest method setUp.

@Before
public void setUp() {
    underTest = new DeleteAction(dbClient, userSession);
    ws = new WsActionTester(underTest);
}
Also used : WsActionTester(org.sonar.server.ws.WsActionTester) Before(org.junit.Before)

Aggregations

WsActionTester (org.sonar.server.ws.WsActionTester)27 Before (org.junit.Before)21 ComponentFinder (org.sonar.server.component.ComponentFinder)13 Page (org.sonar.api.web.page.Page)3 PluginRepository (org.sonar.core.platform.PluginRepository)3 NotificationCenter (org.sonar.server.notification.NotificationCenter)3 NotificationDispatcherMetadata (org.sonar.server.notification.NotificationDispatcherMetadata)3 NotificationUpdater (org.sonar.server.notification.NotificationUpdater)3 PageRepository (org.sonar.server.ui.PageRepository)3 Test (org.junit.Test)2 NotificationChannel (org.sonar.api.notifications.NotificationChannel)2 ComponentDto (org.sonar.db.component.ComponentDto)2 I18n (org.sonar.api.i18n.I18n)1 Languages (org.sonar.api.resources.Languages)1 ResourceTypes (org.sonar.api.resources.ResourceTypes)1 UuidFactory (org.sonar.core.util.UuidFactory)1 DbClient (org.sonar.db.DbClient)1 SnapshotDto (org.sonar.db.component.SnapshotDto)1 H2 (org.sonar.db.dialect.H2)1 IssueDto (org.sonar.db.issue.IssueDto)1