aboutsummaryrefslogtreecommitdiffstats
path: root/tests/src/cgeo/geocaching/connector/gc/UTFGridPositionTest.java
diff options
context:
space:
mode:
authorMichael Keppler <michael.keppler@gmx.de>2014-04-22 17:30:51 +0200
committerMichael Keppler <michael.keppler@gmx.de>2014-04-22 21:44:00 +0200
commitcc9aa8b1d2b9ec24f2c41e4a523c69edcf8c8ac0 (patch)
treefca2712f72bb2759ef4e39c0235a8a5054f27013 /tests/src/cgeo/geocaching/connector/gc/UTFGridPositionTest.java
parent825b779844b280ba7c1effdd4185cc856eccdf5b (diff)
downloadcgeo-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/connector/gc/UTFGridPositionTest.java')
-rw-r--r--tests/src/cgeo/geocaching/connector/gc/UTFGridPositionTest.java11
1 files changed, 6 insertions, 5 deletions
diff --git a/tests/src/cgeo/geocaching/connector/gc/UTFGridPositionTest.java b/tests/src/cgeo/geocaching/connector/gc/UTFGridPositionTest.java
index a742faf..8ee022b 100644
--- a/tests/src/cgeo/geocaching/connector/gc/UTFGridPositionTest.java
+++ b/tests/src/cgeo/geocaching/connector/gc/UTFGridPositionTest.java
@@ -1,21 +1,22 @@
package cgeo.geocaching.connector.gc;
+import static org.assertj.core.api.Assertions.assertThat;
import junit.framework.TestCase;
public class UTFGridPositionTest extends TestCase {
public static void testValidUTFGridPosition() {
- assertNotNull(new UTFGridPosition(0, 0));
+ assertThat(new UTFGridPosition(0, 0)).isNotNull();
}
public static void testInvalidUTFGridPosition() {
boolean valid = true;
try {
- assertNotNull(new UTFGridPosition(-1, 0));
+ assertThat(new UTFGridPosition(-1, 0)).isNotNull();
} catch (Exception e) {
valid = false;
}
- assertFalse(valid);
+ assertThat(valid).isFalse();
}
public static void testFromString() throws Exception {
@@ -27,8 +28,8 @@ public class UTFGridPositionTest extends TestCase {
private static void assertXYFromString(final String key, int x, int y) {
final UTFGridPosition pos = UTFGridPosition.fromString(key);
- assertEquals(x, pos.getX());
- assertEquals(y, pos.getY());
+ assertThat(pos.getX()).isEqualTo(x);
+ assertThat(pos.getY()).isEqualTo(y);
}
}