Search in sources :

Example 6 with ServerTester

use of org.sonar.server.tester.ServerTester in project sonarqube by SonarSource.

the class RegisterQualityProfilesMediumTest method do_not_register_profile_if_missing_language.

@Test
public void do_not_register_profile_if_missing_language() {
    // xoo language is not installed
    tester = new ServerTester().withEsIndexes().addComponents(XooRulesDefinition.class, XooProfileDefinition.class);
    tester.start();
    dbSession = dbClient().openSession(false);
    // Check Profile in DB
    QualityProfileDao qualityProfileDao = dbClient().qualityProfileDao();
    assertThat(qualityProfileDao.selectAll(dbSession)).hasSize(0);
}
Also used : QualityProfileDao(org.sonar.db.qualityprofile.QualityProfileDao) ServerTester(org.sonar.server.tester.ServerTester) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)6 ServerTester (org.sonar.server.tester.ServerTester)6 QualityProfileDao (org.sonar.db.qualityprofile.QualityProfileDao)4 QualityProfileDto (org.sonar.db.qualityprofile.QualityProfileDto)3 RuleKey (org.sonar.api.rule.RuleKey)2 ActiveRuleDao (org.sonar.db.qualityprofile.ActiveRuleDao)2 ActiveRuleDto (org.sonar.db.qualityprofile.ActiveRuleDto)2 ActiveRuleKey (org.sonar.db.qualityprofile.ActiveRuleKey)2 ActiveRuleParamDto (org.sonar.db.qualityprofile.ActiveRuleParamDto)2 Platform (org.sonar.server.platform.Platform)2 SearchOptions (org.sonar.server.es.SearchOptions)1 RuleQuery (org.sonar.server.rule.index.RuleQuery)1