diff options
author | Julien Lancelot <julien.lancelot@sonarsource.com> | 2014-02-26 15:01:17 +0100 |
---|---|---|
committer | Julien Lancelot <julien.lancelot@sonarsource.com> | 2014-02-26 16:57:00 +0100 |
commit | 064228c277e5ffd6c2d976959a6a9c07369fbbc3 (patch) | |
tree | 568830815a68e534e5657586729fd18749159895 /sonar-plugin-api/src/test/java/org/sonar/api/profiles/RulesProfileTest.java | |
parent | 4205a335512d0a4b17766693f925b6343704ec9d (diff) | |
download | sonarqube-064228c277e5ffd6c2d976959a6a9c07369fbbc3.tar.gz sonarqube-064228c277e5ffd6c2d976959a6a9c07369fbbc3.zip |
SONAR-5067 Use a MessageException when activating already activated rules on a profile
Diffstat (limited to 'sonar-plugin-api/src/test/java/org/sonar/api/profiles/RulesProfileTest.java')
-rw-r--r-- | sonar-plugin-api/src/test/java/org/sonar/api/profiles/RulesProfileTest.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/profiles/RulesProfileTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/profiles/RulesProfileTest.java index 79275aa2422..b13a38226da 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/profiles/RulesProfileTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/profiles/RulesProfileTest.java @@ -22,6 +22,7 @@ package org.sonar.api.profiles; import org.junit.Test; import org.sonar.api.rules.Rule; import org.sonar.api.rules.RulePriority; +import org.sonar.api.utils.MessageException; import static org.fest.assertions.Assertions.assertThat; import static org.fest.assertions.Fail.fail; @@ -71,7 +72,7 @@ public class RulesProfileTest { profile.activateRule(rule, null); fail(); } catch (Exception e) { - assertThat(e).isInstanceOf(IllegalStateException.class) + assertThat(e).isInstanceOf(MessageException.class) .hasMessage("The definition of the profile 'Default' (language 'java') contains multiple occurrences of the 'repo:key1' rule. The plugin which declares this profile should fix this."); } } |