aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src
diff options
context:
space:
mode:
authorMichael Keppler <michael.keppler@gmx.de>2014-04-22 13:18:30 +0200
committerMichael Keppler <michael.keppler@gmx.de>2014-04-22 13:18:30 +0200
commitd57a77eb551fa3a2b83a6fc3f94421bae164be91 (patch)
treead27fa0498ad7e7944b665d8083b7a625fa6fcff /tests/src
parent670fef2fa8c97193057087f90e6dd83317b68973 (diff)
downloadcgeo-d57a77eb551fa3a2b83a6fc3f94421bae164be91.zip
cgeo-d57a77eb551fa3a2b83a6fc3f94421bae164be91.tar.gz
cgeo-d57a77eb551fa3a2b83a6fc3f94421bae164be91.tar.bz2
#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.
Diffstat (limited to 'tests/src')
-rw-r--r--tests/src/cgeo/geocaching/utils/DateUtilsTest.java6
1 files changed, 4 insertions, 2 deletions
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);
}
}