diff options
Diffstat (limited to 'tests/src/cgeo/geocaching/connector/gc/GCConstantsTest.java')
| -rw-r--r-- | tests/src/cgeo/geocaching/connector/gc/GCConstantsTest.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/src/cgeo/geocaching/connector/gc/GCConstantsTest.java b/tests/src/cgeo/geocaching/connector/gc/GCConstantsTest.java index c930ab5..809318a 100644 --- a/tests/src/cgeo/geocaching/connector/gc/GCConstantsTest.java +++ b/tests/src/cgeo/geocaching/connector/gc/GCConstantsTest.java @@ -1,6 +1,5 @@ package cgeo.geocaching.connector.gc; -import cgeo.geocaching.connector.gc.GCConstants; import cgeo.geocaching.test.mock.MockedCache; import cgeo.geocaching.utils.BaseUtils; @@ -31,7 +30,11 @@ public class GCConstantsTest extends AndroidTestCase { } private static void assertCacheCount(final int count, final String html) { - assertEquals(count, Integer.parseInt(BaseUtils.getMatch(html, GCConstants.PATTERN_CACHES_FOUND, true, "0").replaceAll("[,.]", ""))); + try { + assertEquals(count, Integer.parseInt(BaseUtils.getMatch(html, GCConstants.PATTERN_CACHES_FOUND, true, "0").replaceAll("[,.]", ""))); + } catch (NumberFormatException e) { + fail(); + } } public static void testConstants() { |
