diff options
author | Julien Lancelot <julien.lancelot@sonarsource.com> | 2014-06-12 12:22:16 +0200 |
---|---|---|
committer | Julien Lancelot <julien.lancelot@sonarsource.com> | 2014-06-12 12:22:16 +0200 |
commit | 71ecd444fd3221d9d3547e879f606af12abe2de7 (patch) | |
tree | f472cf593d655cd54e10e30f4d6ee8d9a077886c /sonar-deprecated | |
parent | 5105c84b6310750a73e5ad46ac0fda03e35b0720 (diff) | |
download | sonarqube-71ecd444fd3221d9d3547e879f606af12abe2de7.tar.gz sonarqube-71ecd444fd3221d9d3547e879f606af12abe2de7.zip |
Fix unit test compilation failure
Diffstat (limited to 'sonar-deprecated')
-rw-r--r-- | sonar-deprecated/src/test/java/org/sonar/api/checks/AnnotationCheckFactoryTest.java | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/sonar-deprecated/src/test/java/org/sonar/api/checks/AnnotationCheckFactoryTest.java b/sonar-deprecated/src/test/java/org/sonar/api/checks/AnnotationCheckFactoryTest.java index eb4ac6354ae..d0a14fd17ea 100644 --- a/sonar-deprecated/src/test/java/org/sonar/api/checks/AnnotationCheckFactoryTest.java +++ b/sonar-deprecated/src/test/java/org/sonar/api/checks/AnnotationCheckFactoryTest.java @@ -29,8 +29,8 @@ import org.sonar.api.utils.SonarException; import java.util.Arrays; import static org.fest.assertions.Assertions.assertThat; -import static org.hamcrest.core.Is.is; -import static org.junit.Assert.*; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertSame; public class AnnotationCheckFactoryTest { @@ -45,7 +45,7 @@ public class AnnotationCheckFactoryTest { Object check = factory.getCheck(activeRule); assertNotNull(check); - assertThat(check, is(CheckWithoutProperties.class)); + assertThat(check).isInstanceOf(CheckWithoutProperties.class); } @Test @@ -60,8 +60,8 @@ public class AnnotationCheckFactoryTest { Object check = factory.getCheck(activeRule); assertNotNull(check); - assertThat(check, is(CheckWithStringProperty.class)); - assertThat(((CheckWithStringProperty) check).getPattern(), is("foo")); + assertThat(check).isInstanceOf(CheckWithStringProperty.class); + assertThat(((CheckWithStringProperty) check).getPattern()).isEqualTo("foo"); } @Test @@ -90,8 +90,8 @@ public class AnnotationCheckFactoryTest { AnnotationCheckFactory factory = AnnotationCheckFactory.create(profile, "repo", Arrays.<Class> asList(CheckWithPrimitiveProperties.class)); Object check = factory.getCheck(activeRule); - assertThat(((CheckWithPrimitiveProperties) check).getMax(), is(300)); - assertThat(((CheckWithPrimitiveProperties) check).isIgnore(), is(true)); + assertThat(((CheckWithPrimitiveProperties) check).getMax()).isEqualTo(300); + assertThat(((CheckWithPrimitiveProperties) check).isIgnore()).isTrue(); } @Test @@ -105,7 +105,7 @@ public class AnnotationCheckFactoryTest { AnnotationCheckFactory factory = AnnotationCheckFactory.create(profile, "repo", Arrays.<Class> asList(CheckWithIntegerProperty.class)); Object check = factory.getCheck(activeRule); - assertThat(((CheckWithIntegerProperty) check).getMax(), is(300)); + assertThat(((CheckWithIntegerProperty) check).getMax()).isEqualTo(300); } /** @@ -122,7 +122,7 @@ public class AnnotationCheckFactoryTest { AnnotationCheckFactory factory = AnnotationCheckFactory.create(profile, "repo", Arrays.<Class> asList(ImplementedCheck.class)); Object check = factory.getCheck(activeRule); - assertThat(((ImplementedCheck) check).getMax(), is(300)); + assertThat(((ImplementedCheck) check).getMax()).isEqualTo(300); } @Test @@ -149,7 +149,7 @@ public class AnnotationCheckFactoryTest { AnnotationCheckFactory factory = AnnotationCheckFactory.create(profile, "repo", Arrays.<Class> asList(CheckWithOverriddenPropertyKey.class)); Object check = factory.getCheck(activeRule); - assertThat(((CheckWithOverriddenPropertyKey) check).getMax(), is(300)); + assertThat(((CheckWithOverriddenPropertyKey) check).getMax()).isEqualTo(300); } @Test @@ -194,6 +194,6 @@ public class AnnotationCheckFactoryTest { Object check = factory.getCheck(activeRule); assertNotNull(check); assertSame(check, checkInstance); - assertThat(checkInstance.getPattern(), is("foo")); + assertThat(checkInstance.getPattern()).isEqualTo("foo"); } } |