diff options
| author | Michael Keppler <michael.keppler@gmx.de> | 2014-04-22 17:30:51 +0200 |
|---|---|---|
| committer | Michael Keppler <michael.keppler@gmx.de> | 2014-04-22 21:44:00 +0200 |
| commit | cc9aa8b1d2b9ec24f2c41e4a523c69edcf8c8ac0 (patch) | |
| tree | fca2712f72bb2759ef4e39c0235a8a5054f27013 /tests/src/cgeo/geocaching/TrackableTest.java | |
| parent | 825b779844b280ba7c1effdd4185cc856eccdf5b (diff) | |
| download | cgeo-cc9aa8b1d2b9ec24f2c41e4a523c69edcf8c8ac0.zip cgeo-cc9aa8b1d2b9ec24f2c41e4a523c69edcf8c8ac0.tar.gz cgeo-cc9aa8b1d2b9ec24f2c41e4a523c69edcf8c8ac0.tar.bz2 | |
#2414 convert junit statements to assertj
This conversion is not complete, but the remaining statements are hard
to catch with regular expressions automatically.
Diffstat (limited to 'tests/src/cgeo/geocaching/TrackableTest.java')
| -rw-r--r-- | tests/src/cgeo/geocaching/TrackableTest.java | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/tests/src/cgeo/geocaching/TrackableTest.java b/tests/src/cgeo/geocaching/TrackableTest.java index 7d3fd5c..2d9c773 100644 --- a/tests/src/cgeo/geocaching/TrackableTest.java +++ b/tests/src/cgeo/geocaching/TrackableTest.java @@ -1,33 +1,35 @@ package cgeo.geocaching; +import static org.assertj.core.api.Assertions.assertThat; + import android.test.AndroidTestCase; public class TrackableTest extends AndroidTestCase { public static void testGetGeocode() { final Trackable trackable = createTrackable("tb1234"); - assertEquals("TB1234", trackable.getGeocode()); + assertThat(trackable.getGeocode()).isEqualTo("TB1234"); } public static void testSetLogsNull() { final Trackable trackable = new Trackable(); trackable.setLogs(null); - assertNotNull("Trackable logs must not be null!", trackable.getLogs()); + assertThat(trackable.getLogs()).as("Trackable logs").isNotNull(); } public static void testTrackableUrl() { final Trackable trackable = createTrackable("TB1234"); - assertEquals("http://www.geocaching.com//track/details.aspx?tracker=TB1234", trackable.getUrl()); + assertThat(trackable.getUrl()).isEqualTo("http://www.geocaching.com//track/details.aspx?tracker=TB1234"); } public static void testGeokretUrl() { Trackable geokret = createTrackable("GK82A2"); - assertEquals("http://geokrety.org/konkret.php?id=33442", geokret.getUrl()); + assertThat(geokret.getUrl()).isEqualTo("http://geokrety.org/konkret.php?id=33442"); } public static void testLoggable() { - assertTrue(createTrackable("TB1234").isLoggable()); - assertFalse(createTrackable("GK1234").isLoggable()); + assertThat(createTrackable("TB1234").isLoggable()).isTrue(); + assertThat(createTrackable("GK1234").isLoggable()).isFalse(); } private static Trackable createTrackable(String geocode) { |
