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-batch/src | |
parent | 30ba10e719b5152c529dc6022f48fe6f5c79dcb7 (diff) | |
download | sonarqube-cba389dcee6ddd3d0cffd82d4c28beb87e53c58a.tar.gz sonarqube-cba389dcee6ddd3d0cffd82d4c28beb87e53c58a.zip |
Continue move from hamcrest to fest-assert
Diffstat (limited to 'sonar-batch/src')
-rw-r--r-- | sonar-batch/src/test/java/org/sonar/batch/phases/DecoratorsExecutorTest.java | 13 |
1 files changed, 5 insertions, 8 deletions
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"); } } |