aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/sonar-core-plugin
diff options
context:
space:
mode:
authorGodin <mandrikov@gmail.com>2010-12-07 17:42:40 +0000
committerGodin <mandrikov@gmail.com>2010-12-07 17:42:40 +0000
commit7fc9f662522fdd85f71b13e307f38a087a86f1ac (patch)
treec045e45badb9f0790bdfdf184b1d46c7ad1f5845 /plugins/sonar-core-plugin
parent7b14f36d5afc4b1a1730307d2dd2b62700b16b59 (diff)
downloadsonarqube-7fc9f662522fdd85f71b13e307f38a087a86f1ac.tar.gz
sonarqube-7fc9f662522fdd85f71b13e307f38a087a86f1ac.zip
SONAR-1829: Use severity instead of priority
Diffstat (limited to 'plugins/sonar-core-plugin')
-rw-r--r--plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/ViolationsDecoratorTest.java8
-rw-r--r--plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/timemachine/NewViolationsDecoratorTest.java16
2 files changed, 12 insertions, 12 deletions
diff --git a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/ViolationsDecoratorTest.java b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/ViolationsDecoratorTest.java
index 866d02d4d19..1abffdfb8f3 100644
--- a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/ViolationsDecoratorTest.java
+++ b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/sensors/ViolationsDecoratorTest.java
@@ -135,10 +135,10 @@ public class ViolationsDecoratorTest {
private List<Violation> createViolations() {
List<Violation> violations = new ArrayList<Violation>();
- violations.add(Violation.create(ruleA1, resource).setPriority(RulePriority.CRITICAL));
- violations.add(Violation.create(ruleA1, resource).setPriority(RulePriority.CRITICAL));
- violations.add(Violation.create(ruleA2, resource).setPriority(RulePriority.MAJOR));
- violations.add(Violation.create(ruleB1, resource).setPriority(RulePriority.MINOR));
+ violations.add(Violation.create(ruleA1, resource).setSeverity(RulePriority.CRITICAL));
+ violations.add(Violation.create(ruleA1, resource).setSeverity(RulePriority.CRITICAL));
+ violations.add(Violation.create(ruleA2, resource).setSeverity(RulePriority.MAJOR));
+ violations.add(Violation.create(ruleB1, resource).setSeverity(RulePriority.MINOR));
return violations;
}
}
diff --git a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/timemachine/NewViolationsDecoratorTest.java b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/timemachine/NewViolationsDecoratorTest.java
index dca4168ca45..2fd987589aa 100644
--- a/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/timemachine/NewViolationsDecoratorTest.java
+++ b/plugins/sonar-core-plugin/src/test/java/org/sonar/plugins/core/timemachine/NewViolationsDecoratorTest.java
@@ -125,8 +125,8 @@ public class NewViolationsDecoratorTest {
@Test
public void shouldClearCacheAfterExecution() {
- Violation violation1 = Violation.create(rule1, resource).setPriority(RulePriority.CRITICAL).setCreatedAt(rightNow);
- Violation violation2 = Violation.create(rule2, resource).setPriority(RulePriority.CRITICAL).setCreatedAt(rightNow);
+ Violation violation1 = Violation.create(rule1, resource).setSeverity(RulePriority.CRITICAL).setCreatedAt(rightNow);
+ Violation violation2 = Violation.create(rule2, resource).setSeverity(RulePriority.CRITICAL).setCreatedAt(rightNow);
when(context.getViolations()).thenReturn(Arrays.asList(violation1)).thenReturn(Arrays.asList(violation2));
decorator.decorate(resource, context);
@@ -162,12 +162,12 @@ public class NewViolationsDecoratorTest {
private List<Violation> createViolations() {
List<Violation> violations = new ArrayList<Violation>();
- violations.add(Violation.create(rule1, resource).setPriority(RulePriority.CRITICAL).setCreatedAt(rightNow));
- violations.add(Violation.create(rule1, resource).setPriority(RulePriority.CRITICAL).setCreatedAt(tenDaysAgo));
- violations.add(Violation.create(rule2, resource).setPriority(RulePriority.MAJOR).setCreatedAt(fiveDaysAgo));
- violations.add(Violation.create(rule2, resource).setPriority(RulePriority.MAJOR).setCreatedAt(tenDaysAgo));
- violations.add(Violation.create(rule3, resource).setPriority(RulePriority.MINOR).setCreatedAt(fiveDaysAgo));
- violations.add(Violation.create(rule3, resource).setPriority(RulePriority.MINOR).setCreatedAt(tenDaysAgo));
+ violations.add(Violation.create(rule1, resource).setSeverity(RulePriority.CRITICAL).setCreatedAt(rightNow));
+ violations.add(Violation.create(rule1, resource).setSeverity(RulePriority.CRITICAL).setCreatedAt(tenDaysAgo));
+ violations.add(Violation.create(rule2, resource).setSeverity(RulePriority.MAJOR).setCreatedAt(fiveDaysAgo));
+ violations.add(Violation.create(rule2, resource).setSeverity(RulePriority.MAJOR).setCreatedAt(tenDaysAgo));
+ violations.add(Violation.create(rule3, resource).setSeverity(RulePriority.MINOR).setCreatedAt(fiveDaysAgo));
+ violations.add(Violation.create(rule3, resource).setSeverity(RulePriority.MINOR).setCreatedAt(tenDaysAgo));
return violations;
}