use of org.sonar.db.dialect.MySql in project sonarqube by SonarSource.
the class GlobalActionTest method test_example_response.
@Test
public void test_example_response() throws Exception {
init(createPages(), new ResourceTypeTree[] { ResourceTypeTree.builder().addType(ResourceType.builder("POL").build()).addType(ResourceType.builder("LOP").build()).addRelations("POL", "LOP").build(), ResourceTypeTree.builder().addType(ResourceType.builder("PAL").build()).addType(ResourceType.builder("LAP").build()).addRelations("PAL", "LAP").build() });
settings.setProperty("sonar.lf.logoUrl", "http://example.com/my-custom-logo.png");
settings.setProperty("sonar.lf.logoWidthPx", 135);
settings.setProperty("sonar.lf.gravatarServerUrl", "http://some-server.tld/logo.png");
settings.setProperty("sonar.lf.enableGravatar", true);
settings.setProperty("sonar.updatecenter.activate", false);
settings.setProperty("sonar.technicalDebt.ratingGrid", "0.05,0.1,0.2,0.5");
when(server.getVersion()).thenReturn("6.2");
when(dbClient.getDatabase().getDialect()).thenReturn(new MySql());
String result = call();
assertJson(ws.getDef().responseExampleAsString()).isSimilarTo(result);
}
use of org.sonar.db.dialect.MySql in project sonarqube by SonarSource.
the class GlobalActionTest method return_if_production_database_or_not.
@Test
public void return_if_production_database_or_not() throws Exception {
init();
when(dbClient.getDatabase().getDialect()).thenReturn(new MySql());
executeAndVerify("production_database.json");
}
Aggregations