Search in sources :

Example 36 with WsTester

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

the class ResourcesWsTest method setUp.

@Before
public void setUp() {
    WsTester tester = new WsTester(new ResourcesWs());
    controller = tester.controller("api/resources");
}
Also used : WsTester(org.sonar.server.ws.WsTester) Before(org.junit.Before)

Example 37 with WsTester

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

Example 38 with WsTester

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

the class IssueTagsActionTest method setUp.

@Before
public void setUp() {
    tagsAction = new TagsAction(service);
    tester = new WsTester(new IssuesWs(tagsAction));
}
Also used : WsTester(org.sonar.server.ws.WsTester) Before(org.junit.Before)

Example 39 with WsTester

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

the class SetTagsActionTest method setUp.

@Before
public void setUp() {
    sut = new SetTagsAction(service);
    tester = new WsTester(new IssuesWs(sut));
}
Also used : WsTester(org.sonar.server.ws.WsTester) Before(org.junit.Before)

Example 40 with WsTester

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

the class AuthorsActionTest method setUp.

@Before
public void setUp() {
    tester = new WsTester(new IssuesWs(new AuthorsAction(service)));
    controller = tester.controller("api/issues");
}
Also used : WsTester(org.sonar.server.ws.WsTester) Before(org.junit.Before)

Aggregations

WsTester (org.sonar.server.ws.WsTester)71 Before (org.junit.Before)50 Test (org.junit.Test)21 DbClient (org.sonar.db.DbClient)18 ComponentFinder (org.sonar.server.component.ComponentFinder)15 WebService (org.sonar.api.server.ws.WebService)12 UserSession (org.sonar.server.user.UserSession)5 Languages (org.sonar.api.resources.Languages)4 QProfileFactory (org.sonar.server.qualityprofile.QProfileFactory)4 UserDto (org.sonar.db.user.UserDto)3 DefaultOrganizationProvider (org.sonar.server.organization.DefaultOrganizationProvider)3 UserJsonWriter (org.sonar.server.user.ws.UserJsonWriter)3 I18n (org.sonar.api.i18n.I18n)2 System2 (org.sonar.api.utils.System2)2 OrganizationDao (org.sonar.db.organization.OrganizationDao)2 RuleRepositoryDto (org.sonar.db.rule.RuleRepositoryDto)2 DefaultOrganization (org.sonar.server.organization.DefaultOrganization)2 UserUpdater (org.sonar.server.user.UserUpdater)2 UserIndex (org.sonar.server.user.index.UserIndex)2 Locale (java.util.Locale)1