use of org.sonar.server.ws.WsTester in project sonarqube by SonarSource.
the class LanguageWsTest method setUp.
@Before
public void setUp() {
Mockito.when(languages.all()).thenReturn(new Language[] { new Ook(), new LolCode(), new Whitespace(), new ArnoldC() });
tester = new WsTester(new LanguageWs(new ListAction(languages)));
}
use of org.sonar.server.ws.WsTester 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.ws.WsTester in project sonarqube by SonarSource.
the class CreateActionTest method setUp.
@Before
public void setUp() {
ws = new WsTester(new MetricsWs(new CreateAction(dbClient, userSessionRule)));
userSessionRule.logIn().setSystemAdministrator();
}
use of org.sonar.server.ws.WsTester in project sonarqube by SonarSource.
the class DeleteActionTest method setUp.
@Before
public void setUp() {
userSessionRule.logIn().setSystemAdministrator();
ws = new WsTester(new MetricsWs(new DeleteAction(dbClient, userSessionRule)));
metricDao = dbClient.metricDao();
}
use of org.sonar.server.ws.WsTester in project sonarqube by SonarSource.
the class UpdateActionTest method setUp.
@Before
public void setUp() {
ws = new WsTester(new MetricsWs(new UpdateAction(dbClient, userSessionRule)));
userSessionRule.logIn().setSystemAdministrator();
}
Aggregations