diff options
author | Bananeweizen <bananeweizen@gmx.de> | 2015-01-02 23:34:59 +0100 |
---|---|---|
committer | Bananeweizen <bananeweizen@gmx.de> | 2015-01-02 23:34:59 +0100 |
commit | 9a58eff9c778ff6ccead71f38c3bb530fc4a1f7f (patch) | |
tree | 5553e998ee3601de086d1710dddf9bd3bc84668f /tests | |
parent | 20c01477343609313e6df30b1c43ff4ec88e8b74 (diff) | |
download | cgeo-9a58eff9c778ff6ccead71f38c3bb530fc4a1f7f.zip cgeo-9a58eff9c778ff6ccead71f38c3bb530fc4a1f7f.tar.gz cgeo-9a58eff9c778ff6ccead71f38c3bb530fc4a1f7f.tar.bz2 |
refactoring: remove unused methods, add null annotations
Diffstat (limited to 'tests')
-rw-r--r-- | tests/src/cgeo/geocaching/test/mock/MockedCache.java | 9 | ||||
-rw-r--r-- | tests/src/cgeo/test/Compare.java | 4 |
2 files changed, 8 insertions, 5 deletions
diff --git a/tests/src/cgeo/geocaching/test/mock/MockedCache.java b/tests/src/cgeo/geocaching/test/mock/MockedCache.java index 14d8d70..1981283 100644 --- a/tests/src/cgeo/geocaching/test/mock/MockedCache.java +++ b/tests/src/cgeo/geocaching/test/mock/MockedCache.java @@ -10,16 +10,18 @@ import cgeo.geocaching.location.Geopoint; import cgeo.geocaching.utils.TextUtils; import org.apache.commons.lang3.StringUtils; +import org.eclipse.jdt.annotation.NonNull; import org.mapsforge.core.IOUtils; -import junit.framework.Assert; - import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; +import java.util.Collections; import java.util.List; +import junit.framework.Assert; + public abstract class MockedCache extends Geocache { final protected Geopoint coords; @@ -141,8 +143,9 @@ public abstract class MockedCache extends Geocache { } @Override + @NonNull public List<Image> getSpoilers() { - return null; + return Collections.emptyList(); } @Override diff --git a/tests/src/cgeo/test/Compare.java b/tests/src/cgeo/test/Compare.java index 0a2fa24..c6d38ae 100644 --- a/tests/src/cgeo/test/Compare.java +++ b/tests/src/cgeo/test/Compare.java @@ -57,8 +57,8 @@ public abstract class Compare { // The inventories can differ too often, therefore we don't compare them. Also, the personal note // cannot be expected to match with different tester accounts. - final int actualSpoilersSize = null != actual.getSpoilers() ? actual.getSpoilers().size() : 0; - final int expectedSpoilersSize = null != expected.getSpoilers() ? expected.getSpoilers().size() : 0; + final int actualSpoilersSize = actual.getSpoilers().size(); + final int expectedSpoilersSize = expected.getSpoilers().size(); assertThat(actualSpoilersSize).as(cacheStr + "spoiler count").isEqualTo(expectedSpoilersSize); } } |