From eaf42ea29277b81568de12012b6031fb231467c8 Mon Sep 17 00:00:00 2001 From: Bananeweizen Date: Tue, 21 May 2013 14:20:46 +0200 Subject: refactoring: avoid NPE in tests --- tests/src/cgeo/test/Compare.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tests') 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()); -- cgit v1.1