diff options
| author | rsudev <rasch@munin-soft.de> | 2013-10-18 08:36:11 +0200 |
|---|---|---|
| committer | rsudev <rasch@munin-soft.de> | 2013-10-18 08:36:11 +0200 |
| commit | 3e80f82fec4d8148562ae125f1c1ec14f65783f0 (patch) | |
| tree | e4eb983c85bdcbc31d562d9082576dc2879a1bc0 /tests/src/cgeo/geocaching/connector/gc | |
| parent | 9e93474a419ed9e45481195df51ab50c306dcdec (diff) | |
| download | cgeo-3e80f82fec4d8148562ae125f1c1ec14f65783f0.zip cgeo-3e80f82fec4d8148562ae125f1c1ec14f65783f0.tar.gz cgeo-3e80f82fec4d8148562ae125f1c1ec14f65783f0.tar.bz2 | |
Fixes #3369, Spoiler image parsing fails
- Adapted pattern
- Manually adapted reference html
- adapted tests where necessary
- improved test failure messages
Diffstat (limited to 'tests/src/cgeo/geocaching/connector/gc')
| -rw-r--r-- | tests/src/cgeo/geocaching/connector/gc/GCParserTest.java | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/src/cgeo/geocaching/connector/gc/GCParserTest.java b/tests/src/cgeo/geocaching/connector/gc/GCParserTest.java index de52171..4420168 100644 --- a/tests/src/cgeo/geocaching/connector/gc/GCParserTest.java +++ b/tests/src/cgeo/geocaching/connector/gc/GCParserTest.java @@ -66,13 +66,13 @@ public class GCParserTest extends AbstractResourceInstrumentationTestCase { public void testOwnCache() { final Geocache cache = parseCache(R.raw.own_cache); - assertNotNull(cache); - assertTrue(CollectionUtils.isNotEmpty(cache.getSpoilers())); - assertEquals(2, cache.getSpoilers().size()); + assertNotNull("Cache not parsed!", cache); + assertTrue("No spoilers found!", CollectionUtils.isNotEmpty(cache.getSpoilers())); + assertEquals("Wrong number of spoilers", 2, cache.getSpoilers().size()); final Image spoiler = cache.getSpoilers().get(1); - assertEquals("http://img.geocaching.com/cache/large/6ddbbe82-8762-46ad-8f4c-57d03f4b0564.jpeg", spoiler.getUrl()); - assertEquals("SPOILER", spoiler.getTitle()); - assertNull(spoiler.getDescription()); + assertEquals("First spoiler image url wrong", "http://imgcdn.geocaching.com/cache/large/6ddbbe82-8762-46ad-8f4c-57d03f4b0564.jpeg", spoiler.getUrl()); + assertEquals("First spoiler image text wrong", "SPOILER", spoiler.getTitle()); + assertNull("First spoiler image description not empty", spoiler.getDescription()); } private static Geocache createCache(int index) { |
