aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-plugin-api/src/test/java/org/sonar/api/checks
diff options
context:
space:
mode:
authorDavid Gageot <david@gageot.net>2012-04-24 10:12:28 +0200
committerDavid Gageot <david@gageot.net>2012-04-27 14:58:59 +0200
commit872b3923f80d9a2bcc13713f41cf801f2a7024eb (patch)
tree2ef0a5003c3becb1b0e53d5683e60ed3c9f759b5 /sonar-plugin-api/src/test/java/org/sonar/api/checks
parent4b262d15878b31c6c2c7efd8236fb5c65093ba11 (diff)
downloadsonarqube-872b3923f80d9a2bcc13713f41cf801f2a7024eb.tar.gz
sonarqube-872b3923f80d9a2bcc13713f41cf801f2a7024eb.zip
Remove warnings
Diffstat (limited to 'sonar-plugin-api/src/test/java/org/sonar/api/checks')
-rw-r--r--sonar-plugin-api/src/test/java/org/sonar/api/checks/AnnotationCheckFactoryTest.java26
1 files changed, 15 insertions, 11 deletions
diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/checks/AnnotationCheckFactoryTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/checks/AnnotationCheckFactoryTest.java
index 60670a372d3..895e37952e6 100644
--- a/sonar-plugin-api/src/test/java/org/sonar/api/checks/AnnotationCheckFactoryTest.java
+++ b/sonar-plugin-api/src/test/java/org/sonar/api/checks/AnnotationCheckFactoryTest.java
@@ -29,9 +29,13 @@ import org.sonar.api.utils.SonarException;
import java.util.Arrays;
-import static org.hamcrest.Matchers.*;
+import static org.hamcrest.Matchers.hasItems;
+import static org.hamcrest.Matchers.not;
+import static org.hamcrest.Matchers.nullValue;
import static org.hamcrest.core.Is.is;
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertSame;
+import static org.junit.Assert.assertThat;
public class AnnotationCheckFactoryTest {
@@ -42,7 +46,7 @@ public class AnnotationCheckFactoryTest {
public void createCheckWithoutProperties() {
RulesProfile profile = RulesProfile.create("repo", "java");
ActiveRule activeRule = profile.activateRule(Rule.create("repo", "org.sonar.api.checks.CheckWithoutProperties", ""), null);
- AnnotationCheckFactory factory = AnnotationCheckFactory.create(profile, "repo", Arrays.<Class>asList(CheckWithoutProperties.class));
+ AnnotationCheckFactory factory = AnnotationCheckFactory.create(profile, "repo", Arrays.<Class> asList(CheckWithoutProperties.class));
Object check = factory.getCheck(activeRule);
assertNotNull(check);
@@ -57,7 +61,7 @@ public class AnnotationCheckFactoryTest {
ActiveRule activeRule = profile.activateRule(rule, null);
activeRule.setParameter("pattern", "foo");
- AnnotationCheckFactory factory = AnnotationCheckFactory.create(profile, "repo", Arrays.<Class>asList(CheckWithStringProperty.class));
+ AnnotationCheckFactory factory = AnnotationCheckFactory.create(profile, "repo", Arrays.<Class> asList(CheckWithStringProperty.class));
Object check = factory.getCheck(activeRule);
assertNotNull(check);
@@ -75,7 +79,7 @@ public class AnnotationCheckFactoryTest {
ActiveRule activeRule = profile.activateRule(rule, null);
activeRule.setParameter("unknown", "bar");
- AnnotationCheckFactory.create(profile, "repo", Arrays.<Class>asList(CheckWithStringProperty.class));
+ AnnotationCheckFactory.create(profile, "repo", Arrays.<Class> asList(CheckWithStringProperty.class));
}
@Test
@@ -88,7 +92,7 @@ public class AnnotationCheckFactoryTest {
ActiveRule activeRule = profile.activateRule(rule, null);
activeRule.setParameter("max", "300");
activeRule.setParameter("ignore", "true");
- AnnotationCheckFactory factory = AnnotationCheckFactory.create(profile, "repo", Arrays.<Class>asList(CheckWithPrimitiveProperties.class));
+ AnnotationCheckFactory factory = AnnotationCheckFactory.create(profile, "repo", Arrays.<Class> asList(CheckWithPrimitiveProperties.class));
Object check = factory.getCheck(activeRule);
assertThat(((CheckWithPrimitiveProperties) check).getMax(), is(300));
@@ -103,7 +107,7 @@ public class AnnotationCheckFactoryTest {
ActiveRule activeRule = profile.activateRule(rule, null);
activeRule.setParameter("max", "300");
- AnnotationCheckFactory factory = AnnotationCheckFactory.create(profile, "repo", Arrays.<Class>asList(CheckWithIntegerProperty.class));
+ AnnotationCheckFactory factory = AnnotationCheckFactory.create(profile, "repo", Arrays.<Class> asList(CheckWithIntegerProperty.class));
Object check = factory.getCheck(activeRule);
assertThat(((CheckWithIntegerProperty) check).getMax(), is(300));
@@ -120,7 +124,7 @@ public class AnnotationCheckFactoryTest {
ActiveRule activeRule = profile.activateRule(rule, null);
activeRule.setParameter("max", "300");
- AnnotationCheckFactory factory = AnnotationCheckFactory.create(profile, "repo", Arrays.<Class>asList(ImplementedCheck.class));
+ AnnotationCheckFactory factory = AnnotationCheckFactory.create(profile, "repo", Arrays.<Class> asList(ImplementedCheck.class));
Object check = factory.getCheck(activeRule);
assertThat(((ImplementedCheck) check).getMax(), is(300));
@@ -136,7 +140,7 @@ public class AnnotationCheckFactoryTest {
ActiveRule activeRule = profile.activateRule(rule, null);
activeRule.setParameter("max", "300");
- AnnotationCheckFactory.create(profile, "repo", Arrays.<Class>asList(CheckWithUnsupportedPropertyType.class));
+ AnnotationCheckFactory.create(profile, "repo", Arrays.<Class> asList(CheckWithUnsupportedPropertyType.class));
}
@Test
@@ -147,7 +151,7 @@ public class AnnotationCheckFactoryTest {
ActiveRule activeRule = profile.activateRule(rule, null);
activeRule.setParameter("maximum", "300");
- AnnotationCheckFactory factory = AnnotationCheckFactory.create(profile, "repo", Arrays.<Class>asList(CheckWithOverriddenPropertyKey.class));
+ AnnotationCheckFactory factory = AnnotationCheckFactory.create(profile, "repo", Arrays.<Class> asList(CheckWithOverriddenPropertyKey.class));
Object check = factory.getCheck(activeRule);
assertThat(((CheckWithOverriddenPropertyKey) check).getMax(), is(300));
@@ -161,7 +165,7 @@ public class AnnotationCheckFactoryTest {
profile.activateRule(rule, null);
profile.activateRule(clonedRule, null);
- AnnotationCheckFactory factory = AnnotationCheckFactory.create(profile, "repo", Arrays.<Class>asList(CheckWithKey.class));
+ AnnotationCheckFactory factory = AnnotationCheckFactory.create(profile, "repo", Arrays.<Class> asList(CheckWithKey.class));
assertThat(factory.getChecks(), (Matcher) not(hasItems(nullValue())));
}