use of org.sonar.server.exceptions.BadRequestException in project sonarqube by SonarSource.
the class RuleActivatorMediumTest method deactivation_fails_if_rule_not_found.
@Test
public void deactivation_fails_if_rule_not_found() {
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");
verifyZeroActiveRules(XOO_P1_KEY);
}
}
Aggregations