Search in sources :

Example 1 with QProfileTreeImpl

use of org.sonar.server.qualityprofile.QProfileTreeImpl in project sonarqube by SonarSource.

the class ChangeParentActionTest method setUp.

@Before
public void setUp() {
    dbClient = db.getDbClient();
    dbSession = db.getSession();
    EsClient esClient = es.client();
    ruleIndex = new RuleIndex(esClient, System2.INSTANCE);
    ruleIndexer = new RuleIndexer(esClient, dbClient);
    activeRuleIndexer = new ActiveRuleIndexer(dbClient, esClient);
    TypeValidations typeValidations = new TypeValidations(Collections.emptyList());
    RuleActivator ruleActivator = new RuleActivator(System2.INSTANCE, dbClient, typeValidations, userSession);
    qProfileTree = new QProfileTreeImpl(dbClient, ruleActivator, System2.INSTANCE, activeRuleIndexer, mock(QualityProfileChangeEventService.class));
    ChangeParentAction underTest = new ChangeParentAction(dbClient, qProfileTree, new Languages(), new QProfileWsSupport(dbClient, userSession), userSession);
    ws = new WsActionTester(underTest);
    userSession.logIn().addPermission(ADMINISTER_QUALITY_PROFILES);
}
Also used : ActiveRuleIndexer(org.sonar.server.qualityprofile.index.ActiveRuleIndexer) RuleIndex(org.sonar.server.rule.index.RuleIndex) ActiveRuleIndexer(org.sonar.server.qualityprofile.index.ActiveRuleIndexer) RuleIndexer(org.sonar.server.rule.index.RuleIndexer) TypeValidations(org.sonar.server.util.TypeValidations) RuleActivator(org.sonar.server.qualityprofile.builtin.RuleActivator) QProfileTreeImpl(org.sonar.server.qualityprofile.QProfileTreeImpl) Languages(org.sonar.api.resources.Languages) EsClient(org.sonar.server.es.EsClient) WsActionTester(org.sonar.server.ws.WsActionTester) Before(org.junit.Before)

Aggregations

Before (org.junit.Before)1 Languages (org.sonar.api.resources.Languages)1 EsClient (org.sonar.server.es.EsClient)1 QProfileTreeImpl (org.sonar.server.qualityprofile.QProfileTreeImpl)1 RuleActivator (org.sonar.server.qualityprofile.builtin.RuleActivator)1 ActiveRuleIndexer (org.sonar.server.qualityprofile.index.ActiveRuleIndexer)1 RuleIndex (org.sonar.server.rule.index.RuleIndex)1 RuleIndexer (org.sonar.server.rule.index.RuleIndexer)1 TypeValidations (org.sonar.server.util.TypeValidations)1 WsActionTester (org.sonar.server.ws.WsActionTester)1