diff options
author | Godin <mandrikov@gmail.com> | 2010-12-07 16:12:03 +0000 |
---|---|---|
committer | Godin <mandrikov@gmail.com> | 2010-12-07 16:12:03 +0000 |
commit | c1cfffea2098a53ab078deb9bebe47b627c389cf (patch) | |
tree | 7333070e02e4504ed48e8d550a6ae8de86b5de6a /sonar-plugin-api/src/test/java/org/sonar/api/profiles | |
parent | b09f170fa5cd8980019d6cf91251ab11970b1cc6 (diff) | |
download | sonarqube-c1cfffea2098a53ab078deb9bebe47b627c389cf.tar.gz sonarqube-c1cfffea2098a53ab078deb9bebe47b627c389cf.zip |
SONAR-1829: Use severity instead of priority
Diffstat (limited to 'sonar-plugin-api/src/test/java/org/sonar/api/profiles')
-rw-r--r-- | sonar-plugin-api/src/test/java/org/sonar/api/profiles/AnnotationProfileParserTest.java | 10 | ||||
-rw-r--r-- | sonar-plugin-api/src/test/java/org/sonar/api/profiles/XMLProfileParserTest.java | 4 |
2 files changed, 8 insertions, 6 deletions
diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/profiles/AnnotationProfileParserTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/profiles/AnnotationProfileParserTest.java index c30131645f2..f80beac42c7 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/profiles/AnnotationProfileParserTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/profiles/AnnotationProfileParserTest.java @@ -31,7 +31,9 @@ import org.sonar.check.BelongsToProfile; import org.sonar.check.Priority; import static org.hamcrest.Matchers.is; -import static org.junit.Assert.*; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertThat; import static org.mockito.Matchers.anyString; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; @@ -48,11 +50,11 @@ public class AnnotationProfileParserTest { }); ValidationMessages messages = ValidationMessages.create(); - RulesProfile profile = new AnnotationProfileParser(ruleFinder).parse("squid", "Foo way", "java", Lists.<Class>newArrayList(FakeRule.class), messages); + RulesProfile profile = new AnnotationProfileParser(ruleFinder).parse("squid", "Foo way", "java", Lists.<Class> newArrayList(FakeRule.class), messages); assertThat(profile.getName(), is("Foo way")); assertThat(profile.getLanguage(), is("java")); - assertThat(profile.getActiveRule("squid", "fake").getPriority(), is(RulePriority.BLOCKER)); + assertThat(profile.getActiveRule("squid", "fake").getSeverity(), is(RulePriority.BLOCKER)); assertThat(messages.hasErrors(), is(false)); } @@ -66,7 +68,7 @@ public class AnnotationProfileParserTest { }); ValidationMessages messages = ValidationMessages.create(); - RulesProfile profile = new AnnotationProfileParser(ruleFinder).parse("squid", "Foo way", "java", Lists.<Class>newArrayList(FakeRule.class, RuleOnOtherProfile.class), messages); + RulesProfile profile = new AnnotationProfileParser(ruleFinder).parse("squid", "Foo way", "java", Lists.<Class> newArrayList(FakeRule.class, RuleOnOtherProfile.class), messages); assertNotNull(profile.getActiveRule("squid", "fake")); assertNull(profile.getActiveRule("squid", "other")); diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/profiles/XMLProfileParserTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/profiles/XMLProfileParserTest.java index 3167cb941b4..6c31b9d2688 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/profiles/XMLProfileParserTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/profiles/XMLProfileParserTest.java @@ -51,7 +51,7 @@ public class XMLProfileParserTest { assertThat(profile.getName(), is("sonar way")); assertThat(validation.hasErrors(), is(false)); assertNotNull(profile); - assertThat(profile.getActiveRule("checkstyle", "IllegalRegexp").getPriority(), is(RulePriority.CRITICAL)); + assertThat(profile.getActiveRule("checkstyle", "IllegalRegexp").getSeverity(), is(RulePriority.CRITICAL)); } @Test @@ -101,4 +101,4 @@ public class XMLProfileParserTest { }); return ruleFinder; } -}
\ No newline at end of file +} |