From cba389dcee6ddd3d0cffd82d4c28beb87e53c58a Mon Sep 17 00:00:00 2001 From: Simon Brandhof Date: Mon, 21 Apr 2014 23:41:03 +0200 Subject: Continue move from hamcrest to fest-assert --- .../java/org/sonar/batch/phases/DecoratorsExecutorTest.java | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'sonar-batch/src') 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"); } } -- cgit v1.2.3