From d57a77eb551fa3a2b83a6fc3f94421bae164be91 Mon Sep 17 00:00:00 2001 From: Michael Keppler Date: Tue, 22 Apr 2014 13:18:30 +0200 Subject: #2414: Use assertJ assertions AssertJ is a fork of FEST. Both are signature compatible in the core assertions, so we can still switch to FEST should we see a need for it. If you have trouble compiling or running tests after pulling this change, please shout out loud. --- tests/src/cgeo/geocaching/utils/DateUtilsTest.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'tests/src') diff --git a/tests/src/cgeo/geocaching/utils/DateUtilsTest.java b/tests/src/cgeo/geocaching/utils/DateUtilsTest.java index f82225a..d0a2b4a 100644 --- a/tests/src/cgeo/geocaching/utils/DateUtilsTest.java +++ b/tests/src/cgeo/geocaching/utils/DateUtilsTest.java @@ -1,5 +1,7 @@ package cgeo.geocaching.utils; +import static org.assertj.core.api.Assertions.assertThat; + import cgeo.geocaching.Geocache; import cgeo.geocaching.enumerations.CacheType; @@ -13,7 +15,7 @@ public class DateUtilsTest extends TestCase { final Calendar start = Calendar.getInstance(); for (int hour = 0; hour < 24; hour++) { start.set(Calendar.HOUR_OF_DAY, hour); - assertEquals(0, DateUtils.daysSince(start.getTimeInMillis())); + assertThat(DateUtils.daysSince(start.getTimeInMillis())).isEqualTo(0); } } @@ -35,7 +37,7 @@ public class DateUtilsTest extends TestCase { cache.setType(CacheType.EVENT); cache.setHidden(start.getTime()); - assertEquals(expectedPast, DateUtils.isPastEvent(cache)); + assertThat(DateUtils.isPastEvent(cache)).isEqualTo(expectedPast); } } -- cgit v1.1