diff options
| author | Bananeweizen <bananeweizen@gmx.de> | 2013-05-21 14:20:46 +0200 |
|---|---|---|
| committer | Bananeweizen <bananeweizen@gmx.de> | 2013-05-21 14:20:46 +0200 |
| commit | eaf42ea29277b81568de12012b6031fb231467c8 (patch) | |
| tree | 1ff455208af338f619081b0f398b753289aee463 | |
| parent | f16becfdc6b90f6fdbdfd57b4525240749b5dcfe (diff) | |
| download | cgeo-eaf42ea29277b81568de12012b6031fb231467c8.zip cgeo-eaf42ea29277b81568de12012b6031fb231467c8.tar.gz cgeo-eaf42ea29277b81568de12012b6031fb231467c8.tar.bz2 | |
refactoring: avoid NPE in tests
| -rw-r--r-- | tests/src/cgeo/test/Compare.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/src/cgeo/test/Compare.java b/tests/src/cgeo/test/Compare.java index 8af1541..24ed596 100644 --- a/tests/src/cgeo/test/Compare.java +++ b/tests/src/cgeo/test/Compare.java @@ -1,15 +1,17 @@ package cgeo.test; import static junit.framework.Assert.assertEquals; +import static junit.framework.Assert.assertNotNull; import static junit.framework.Assert.assertTrue; -import cgeo.geocaching.ICache; import cgeo.geocaching.Geocache; +import cgeo.geocaching.ICache; import cgeo.geocaching.enumerations.LogType; public abstract class Compare { public static void assertCompareCaches(ICache expected, Geocache actual, boolean all) { + assertNotNull(actual); assertEquals(expected.getGeocode(), actual.getGeocode()); assertTrue(expected.getType() == actual.getType()); assertEquals(expected.getOwnerDisplayName(), actual.getOwnerDisplayName()); |
