diff options
| author | Michael Keppler <michael.keppler@gmx.de> | 2014-04-25 14:23:03 +0200 |
|---|---|---|
| committer | Michael Keppler <michael.keppler@gmx.de> | 2014-04-25 14:23:15 +0200 |
| commit | 530440bbb9ce55f96395055abe86dcdcac3ca2a6 (patch) | |
| tree | bbcfc8fee5872a8fccece03b2b3d76ecb2025679 /tests | |
| parent | 31ea44fe5261808f827741296029384ca517df4f (diff) | |
| download | cgeo-530440bbb9ce55f96395055abe86dcdcac3ca2a6.zip cgeo-530440bbb9ce55f96395055abe86dcdcac3ca2a6.tar.gz cgeo-530440bbb9ce55f96395055abe86dcdcac3ca2a6.tar.bz2 | |
fix #3791: have logs separated from caches
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/src/cgeo/geocaching/export/ExportTest.java | 3 | ||||
| -rw-r--r-- | tests/src/cgeo/geocaching/files/GPXParserTest.java | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/tests/src/cgeo/geocaching/export/ExportTest.java b/tests/src/cgeo/geocaching/export/ExportTest.java index aeab90e..a9fceec 100644 --- a/tests/src/cgeo/geocaching/export/ExportTest.java +++ b/tests/src/cgeo/geocaching/export/ExportTest.java @@ -13,6 +13,7 @@ import cgeo.geocaching.utils.FileUtils; import java.io.File; import java.util.ArrayList; +import java.util.Collections; import java.util.List; import java.util.concurrent.ExecutionException; @@ -32,8 +33,8 @@ public class ExportTest extends CGeoTestCase { cache.setGeocode("GCX1234"); cache.setCoords(new Geopoint("N 49 44.000 E 8 37.000")); final LogEntry log = new LogEntry(1353244820000L, LogType.FOUND_IT, "Smile: \ud83d\ude0a"); - cache.getLogs().add(log); DataStore.saveCache(cache, LoadFlags.SAVE_ALL); + DataStore.saveLogsWithoutTransaction(cache.getGeocode(), Collections.singletonList(log)); ArrayList<Geocache> exportList = new ArrayList<Geocache>(); exportList.add(cache); GpxExportTester gpxExport = new GpxExportTester(); diff --git a/tests/src/cgeo/geocaching/files/GPXParserTest.java b/tests/src/cgeo/geocaching/files/GPXParserTest.java index 4cd0b6f..e1f3417 100644 --- a/tests/src/cgeo/geocaching/files/GPXParserTest.java +++ b/tests/src/cgeo/geocaching/files/GPXParserTest.java @@ -265,8 +265,8 @@ public class GPXParserTest extends AbstractResourceInstrumentationTestCase { final Geocache minimalCache = DataStore.loadCache(geocode, EnumSet.of(LoadFlag.LOAD_DB_MINIMAL)); // now check that we load lazy members on demand - assertThat(minimalCache.getAttributes().isEmpty()).isFalse(); - assertThat(minimalCache.getLogs().isEmpty()).isFalse(); + assertThat(minimalCache.getAttributes()).isNotEmpty(); + assertThat(minimalCache.getLogs()).isNotEmpty(); removeCacheCompletely(geocode); } |
