aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-plugin-api/src/test/java/org
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@gmail.com>2012-03-15 11:00:57 +0100
committerSimon Brandhof <simon.brandhof@gmail.com>2012-03-15 11:00:57 +0100
commitf16ec1f6717175089639d8c4348369bcb8c04b5e (patch)
tree8dc8add2560e8a9c04133a52ea87d9354f640849 /sonar-plugin-api/src/test/java/org
parent0da9800cf24987bb9118af3b553c3fd34d735d82 (diff)
downloadsonarqube-f16ec1f6717175089639d8c4348369bcb8c04b5e.tar.gz
sonarqube-f16ec1f6717175089639d8c4348369bcb8c04b5e.zip
Do not use deprecated rule categories (column MEASURES.RULES_CATEGORY_ID, table RULES_CATEGORY_ID), but keep them in API for backward-compatibility
Diffstat (limited to 'sonar-plugin-api/src/test/java/org')
-rw-r--r--sonar-plugin-api/src/test/java/org/sonar/api/rules/RuleTest.java7
1 files changed, 2 insertions, 5 deletions
diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/rules/RuleTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/rules/RuleTest.java
index aebea90a313..3cc984f6bb2 100644
--- a/sonar-plugin-api/src/test/java/org/sonar/api/rules/RuleTest.java
+++ b/sonar-plugin-api/src/test/java/org/sonar/api/rules/RuleTest.java
@@ -55,7 +55,7 @@ public class RuleTest {
public void shouldRemoveNewLineCharactersInNameWithfirstConstructor() {
Rule rule;
for (String example : getExamplesContainingNewLineCharacter()) {
- rule = new Rule(null, null, example, (RulesCategory) null, null);
+ rule = new Rule(null, null).setName(example);
assertThat(rule.getName(), is("test"));
}
}
@@ -64,7 +64,7 @@ public class RuleTest {
public void shouldRemoveNewLineCharactersInNameWithSecondConstructor() {
Rule rule;
for (String example : getExamplesContainingNewLineCharacter()) {
- rule = new Rule(null, null, example, null, null);
+ rule = new Rule(null, null).setName(example);
assertThat(rule.getName(), is("test"));
}
}
@@ -77,9 +77,6 @@ public class RuleTest {
rule = new Rule("name", "key");
assertThat(rule.getSeverity(), Is.is(RulePriority.MAJOR));
- rule = new Rule("pkey", "key", "name", Iso9126RulesCategories.EFFICIENCY, null, null);
- assertThat(rule.getSeverity(), Is.is(RulePriority.MAJOR));
-
rule.setSeverity(RulePriority.BLOCKER);
assertThat(rule.getSeverity(), Is.is(RulePriority.BLOCKER));