diff options
author | Simon Brandhof <simon.brandhof@gmail.com> | 2014-04-21 23:41:03 +0200 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@gmail.com> | 2014-04-21 23:41:03 +0200 |
commit | cba389dcee6ddd3d0cffd82d4c28beb87e53c58a (patch) | |
tree | 932dcc58798d99302f64de11e63ecea5fcba8320 /sonar-deprecated | |
parent | 30ba10e719b5152c529dc6022f48fe6f5c79dcb7 (diff) | |
download | sonarqube-cba389dcee6ddd3d0cffd82d4c28beb87e53c58a.tar.gz sonarqube-cba389dcee6ddd3d0cffd82d4c28beb87e53c58a.zip |
Continue move from hamcrest to fest-assert
Diffstat (limited to 'sonar-deprecated')
-rw-r--r-- | sonar-deprecated/pom.xml | 6 | ||||
-rw-r--r-- | sonar-deprecated/src/test/java/org/sonar/api/resources/MethodTest.java | 2 | ||||
-rw-r--r-- | sonar-deprecated/src/test/java/org/sonar/api/rules/RuleUtilsTest.java | 23 |
3 files changed, 12 insertions, 19 deletions
diff --git a/sonar-deprecated/pom.xml b/sonar-deprecated/pom.xml index 6d00457ee5a..09672a84961 100644 --- a/sonar-deprecated/pom.xml +++ b/sonar-deprecated/pom.xml @@ -39,12 +39,6 @@ </dependency> <dependency> - <groupId>${project.groupId}</groupId> - <artifactId>sonar-testing-harness</artifactId> - <version>${project.version}</version> - <scope>test</scope> - </dependency> - <dependency> <groupId>org.mockito</groupId> <artifactId>mockito-all</artifactId> <scope>test</scope> diff --git a/sonar-deprecated/src/test/java/org/sonar/api/resources/MethodTest.java b/sonar-deprecated/src/test/java/org/sonar/api/resources/MethodTest.java index 8d8c7b66f80..b4155c39a72 100644 --- a/sonar-deprecated/src/test/java/org/sonar/api/resources/MethodTest.java +++ b/sonar-deprecated/src/test/java/org/sonar/api/resources/MethodTest.java @@ -21,7 +21,7 @@ package org.sonar.api.resources; import org.junit.Test; -import static org.hamcrest.Matchers.is; +import static org.hamcrest.CoreMatchers.is; import static org.junit.Assert.assertThat; public class MethodTest { diff --git a/sonar-deprecated/src/test/java/org/sonar/api/rules/RuleUtilsTest.java b/sonar-deprecated/src/test/java/org/sonar/api/rules/RuleUtilsTest.java index a58e3d4bdc1..643f673f89c 100644 --- a/sonar-deprecated/src/test/java/org/sonar/api/rules/RuleUtilsTest.java +++ b/sonar-deprecated/src/test/java/org/sonar/api/rules/RuleUtilsTest.java @@ -26,8 +26,7 @@ import org.sonar.api.CoreProperties; import java.util.Map; -import static org.hamcrest.Matchers.is; -import static org.junit.Assert.assertThat; +import static org.fest.assertions.Assertions.assertThat; import static org.mockito.Matchers.anyString; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; @@ -41,11 +40,11 @@ public class RuleUtilsTest { final Map<RulePriority, Integer> map = RuleUtils.getPriorityWeights(conf); - assertThat(map.get(RulePriority.BLOCKER), is(10)); - assertThat(map.get(RulePriority.CRITICAL), is(5)); - assertThat(map.get(RulePriority.MAJOR), is(2)); - assertThat(map.get(RulePriority.MINOR), is(1)); - assertThat(map.get(RulePriority.INFO), is(0)); + assertThat(map.get(RulePriority.BLOCKER)).isEqualTo(10); + assertThat(map.get(RulePriority.CRITICAL)).isEqualTo(5); + assertThat(map.get(RulePriority.MAJOR)).isEqualTo(2); + assertThat(map.get(RulePriority.MINOR)).isEqualTo(1); + assertThat(map.get(RulePriority.INFO)).isEqualTo(0); } @Test @@ -55,11 +54,11 @@ public class RuleUtilsTest { final Map<RulePriority, Integer> map = RuleUtils.getPriorityWeights(conf); - assertThat(map.get(RulePriority.BLOCKER), is(1)); - assertThat(map.get(RulePriority.CRITICAL), is(5)); - assertThat(map.get(RulePriority.MAJOR), is(1)); - assertThat(map.get(RulePriority.MINOR), is(1)); - assertThat(map.get(RulePriority.INFO), is(1)); + assertThat(map.get(RulePriority.BLOCKER)).isEqualTo(1); + assertThat(map.get(RulePriority.CRITICAL)).isEqualTo(5); + assertThat(map.get(RulePriority.MAJOR)).isEqualTo(1); + assertThat(map.get(RulePriority.MINOR)).isEqualTo(1); + assertThat(map.get(RulePriority.INFO)).isEqualTo(1); } } |