Package org.sonar.core.qualityprofile.db

Examples of org.sonar.core.qualityprofile.db.ActiveRuleKey


  }

  @Test
  public void ignore_parameters_when_activating_custom_rule() throws Exception {
    // initial activation
    ActiveRuleKey activeRuleKey = ActiveRuleKey.of(XOO_P1_KEY, CUSTOM_RULE_KEY);
    RuleActivation activation = new RuleActivation(CUSTOM_RULE_KEY);
    activate(activation, XOO_P1_KEY);

    // update
    RuleActivation update = new RuleActivation(CUSTOM_RULE_KEY)
View Full Code Here


  }

  @Test
  public void ignore_deactivation_if_rule_not_activated() throws Exception {
    // deactivation
    ActiveRuleKey key = ActiveRuleKey.of(XOO_P1_KEY, RuleTesting.XOO_X1);
    ruleActivator.deactivate(key);

    verifyZeroActiveRules(XOO_P1_KEY);
  }
View Full Code Here

    verifyZeroActiveRules(XOO_P1_KEY);
  }

  @Test
  public void deactivation_fails_if_rule_not_found() throws Exception {
    ActiveRuleKey key = ActiveRuleKey.of(XOO_P1_KEY, RuleKey.of("xoo", "x3"));
    try {
      ruleActivator.deactivate(key);
      fail();
    } catch (BadRequestException e) {
      assertThat(e).hasMessage("Rule not found: xoo:x3");
View Full Code Here

    }
  }

  @Test
  public void deactivation_fails_if_profile_not_found() throws Exception {
    ActiveRuleKey key = ActiveRuleKey.of("unknown", RuleTesting.XOO_X1);
    try {
      ruleActivator.deactivate(key);
      fail();
    } catch (BadRequestException e) {
      assertThat(e).hasMessage("Quality profile not found: unknown");
View Full Code Here

TOP

Related Classes of org.sonar.core.qualityprofile.db.ActiveRuleKey

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.