aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-batch
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@gmail.com>2014-04-21 23:41:03 +0200
committerSimon Brandhof <simon.brandhof@gmail.com>2014-04-21 23:41:03 +0200
commitcba389dcee6ddd3d0cffd82d4c28beb87e53c58a (patch)
tree932dcc58798d99302f64de11e63ecea5fcba8320 /sonar-batch
parent30ba10e719b5152c529dc6022f48fe6f5c79dcb7 (diff)
downloadsonarqube-cba389dcee6ddd3d0cffd82d4c28beb87e53c58a.tar.gz
sonarqube-cba389dcee6ddd3d0cffd82d4c28beb87e53c58a.zip
Continue move from hamcrest to fest-assert
Diffstat (limited to 'sonar-batch')
-rw-r--r--sonar-batch/pom.xml14
-rw-r--r--sonar-batch/src/test/java/org/sonar/batch/phases/DecoratorsExecutorTest.java13
2 files changed, 17 insertions, 10 deletions
diff --git a/sonar-batch/pom.xml b/sonar-batch/pom.xml
index 3d268b2f939..8e527478c01 100644
--- a/sonar-batch/pom.xml
+++ b/sonar-batch/pom.xml
@@ -111,8 +111,8 @@
<scope>test</scope>
</dependency>
<dependency>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-all</artifactId>
+ <groupId>org.easytesting</groupId>
+ <artifactId>fest-assert</artifactId>
<scope>test</scope>
</dependency>
<dependency>
@@ -121,6 +121,16 @@
<scope>test</scope>
</dependency>
<dependency>
+ <groupId>org.hamcrest</groupId>
+ <artifactId>hamcrest-all</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.mockito</groupId>
+ <artifactId>mockito-all</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-server</artifactId>
<scope>test</scope>
diff --git a/sonar-batch/src/test/java/org/sonar/batch/phases/DecoratorsExecutorTest.java b/sonar-batch/src/test/java/org/sonar/batch/phases/DecoratorsExecutorTest.java
index a1118d316d7..3534236e503 100644
--- a/sonar-batch/src/test/java/org/sonar/batch/phases/DecoratorsExecutorTest.java
+++ b/sonar-batch/src/test/java/org/sonar/batch/phases/DecoratorsExecutorTest.java
@@ -32,11 +32,8 @@ import org.sonar.batch.DefaultDecoratorContext;
import org.sonar.batch.events.EventBus;
import org.sonar.core.measure.MeasurementFilters;
-import static org.hamcrest.number.OrderingComparisons.greaterThanOrEqualTo;
-import static org.hamcrest.number.OrderingComparisons.lessThan;
-import static org.junit.Assert.assertThat;
+import static org.fest.assertions.Assertions.assertThat;
import static org.junit.Assert.fail;
-import static org.junit.matchers.JUnitMatchers.containsString;
import static org.mockito.Matchers.any;
import static org.mockito.Mockito.doThrow;
import static org.mockito.Mockito.mock;
@@ -54,11 +51,11 @@ public class DecoratorsExecutorTest {
profiler.start(decorator2);
profiler.stop();
- assertThat(profiler.getMessage().indexOf("Decorator1"), greaterThanOrEqualTo(0));
- assertThat(profiler.getMessage().indexOf("Decorator2"), greaterThanOrEqualTo(0));
+ assertThat(profiler.getMessage().indexOf("Decorator1")).isGreaterThanOrEqualTo(0);
+ assertThat(profiler.getMessage().indexOf("Decorator2")).isGreaterThanOrEqualTo(0);
// sequence of execution
- assertThat(profiler.getMessage().indexOf("Decorator1"), lessThan(profiler.getMessage().indexOf("Decorator2")));
+ assertThat(profiler.getMessage().indexOf("Decorator1")).isLessThan(profiler.getMessage().indexOf("Decorator2"));
}
@Test
@@ -73,7 +70,7 @@ public class DecoratorsExecutorTest {
fail("Exception has not been thrown");
} catch (SonarException e) {
- assertThat(e.getMessage(), containsString("src/org/foo/Bar.java"));
+ assertThat(e.getMessage()).contains("src/org/foo/Bar.java");
}
}