diff options
| author | blafoo <github@blafoo.de> | 2012-05-10 12:17:11 +0200 |
|---|---|---|
| committer | blafoo <github@blafoo.de> | 2012-05-10 20:30:53 +0200 |
| commit | 57eeb6214fb178c45685f7bd5f4cdb2706326994 (patch) | |
| tree | 6dc05f5afe9c224701b326a2f21a4c370332c5f9 /tests | |
| parent | 0b43cdc54f10dd0a7a57ac2cf8f67e26c3ddc7d1 (diff) | |
| download | cgeo-57eeb6214fb178c45685f7bd5f4cdb2706326994.zip cgeo-57eeb6214fb178c45685f7bd5f4cdb2706326994.tar.gz cgeo-57eeb6214fb178c45685f7bd5f4cdb2706326994.tar.bz2 | |
Drop caches created during GPX import test
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/src/cgeo/geocaching/files/GPXImporterTest.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/src/cgeo/geocaching/files/GPXImporterTest.java b/tests/src/cgeo/geocaching/files/GPXImporterTest.java index 66334d7..6c28a07 100644 --- a/tests/src/cgeo/geocaching/files/GPXImporterTest.java +++ b/tests/src/cgeo/geocaching/files/GPXImporterTest.java @@ -4,6 +4,7 @@ import cgeo.geocaching.SearchResult; import cgeo.geocaching.Settings; import cgeo.geocaching.cgCache; import cgeo.geocaching.cgeoapplication; +import cgeo.geocaching.enumerations.CacheType; import cgeo.geocaching.enumerations.LoadFlags; import cgeo.geocaching.test.AbstractResourceInstrumentationTestCase; import cgeo.geocaching.test.R; @@ -273,6 +274,10 @@ public class GPXImporterTest extends AbstractResourceInstrumentationTestCase { @Override protected void tearDown() throws Exception { + SearchResult search = cgeoapplication.getInstance().getBatchOfStoredCaches(false, null, CacheType.ALL, listId); + List<cgCache> cachesInList = new ArrayList<cgCache>(); + cachesInList.addAll(search.getCachesFromSearchResult(LoadFlags.LOAD_CACHE_OR_DB)); + cgeoapplication.getInstance().markDropped(cachesInList); cgeoapplication.getInstance().removeList(listId); deleteDirectory(tempDir); Settings.setStoreOfflineMaps(importCacheStaticMaps); |
