forked from upstream-mirrors/OpenTracks
+2
-2
@@ -180,7 +180,7 @@ public class ExportImportTest {
|
||||
service.endCurrentTrack();
|
||||
|
||||
Track track = contentProviderUtils.getTrack(trackId);
|
||||
track.setIcon(TRACK_ICON);
|
||||
track.setActivityTypeId(TRACK_ICON);
|
||||
track.setActivityType(TRACK_ACTIVITY_TYPE);
|
||||
track.setDescription(TRACK_DESCRIPTION);
|
||||
contentProviderUtils.updateTrack(track);
|
||||
@@ -219,7 +219,7 @@ public class ExportImportTest {
|
||||
assertEquals(track.getActivityType(), importedTrack.getActivityType());
|
||||
assertEquals(track.getDescription(), importedTrack.getDescription());
|
||||
assertEquals(track.getName(), importedTrack.getName());
|
||||
assertEquals(track.getIcon(), importedTrack.getIcon());
|
||||
assertEquals(track.getActivityTypeId(), importedTrack.getActivityTypeId());
|
||||
|
||||
// 2. trackpoints
|
||||
TrackPointAssert a = new TrackPointAssert();
|
||||
|
||||
+3
-3
@@ -82,7 +82,7 @@ public class GPXTrackImporterTest {
|
||||
assertEquals("the category", importedTrack.getActivityType());
|
||||
assertEquals("the description", importedTrack.getDescription());
|
||||
assertEquals("2021-01-07 22:51", importedTrack.getName());
|
||||
assertEquals("UNKNOWN", importedTrack.getIcon());
|
||||
assertEquals("UNKNOWN", importedTrack.getActivityTypeId());
|
||||
|
||||
//TODO Check trackstatistics
|
||||
|
||||
@@ -136,7 +136,7 @@ public class GPXTrackImporterTest {
|
||||
assertEquals("", importedTrack.getActivityType());
|
||||
assertEquals("", importedTrack.getDescription());
|
||||
assertEquals("20210907_213924.gpx", importedTrack.getName());
|
||||
assertEquals("", importedTrack.getIcon());
|
||||
assertEquals("", importedTrack.getActivityTypeId());
|
||||
|
||||
// 3. trackstatistics
|
||||
TrackStatistics trackStatistics = importedTrack.getTrackStatistics();
|
||||
@@ -184,7 +184,7 @@ public class GPXTrackImporterTest {
|
||||
assertEquals("", importedTrack.getActivityType());
|
||||
assertEquals("", importedTrack.getDescription());
|
||||
assertEquals("20210907_213924.gpx", importedTrack.getName());
|
||||
assertEquals("", importedTrack.getIcon());
|
||||
assertEquals("", importedTrack.getActivityTypeId());
|
||||
|
||||
// 3. trackstatistics
|
||||
TrackStatistics trackStatistics = importedTrack.getTrackStatistics();
|
||||
|
||||
+3
-3
@@ -73,7 +73,7 @@ public class KMLTrackImporterTest {
|
||||
assertEquals("", importedTrack.getActivityType());
|
||||
assertEquals("", importedTrack.getDescription());
|
||||
assertEquals("", importedTrack.getName());
|
||||
assertEquals("", importedTrack.getIcon());
|
||||
assertEquals("", importedTrack.getActivityTypeId());
|
||||
|
||||
// 2. markers
|
||||
assertEquals(0, contentProviderUtils.getMarkers(importTrackId).size());
|
||||
@@ -122,7 +122,7 @@ public class KMLTrackImporterTest {
|
||||
assertEquals("", importedTrack.getActivityType());
|
||||
assertEquals("", importedTrack.getDescription());
|
||||
assertEquals("", importedTrack.getName());
|
||||
assertEquals("", importedTrack.getIcon());
|
||||
assertEquals("", importedTrack.getActivityTypeId());
|
||||
|
||||
// 2. markers
|
||||
assertEquals(0, contentProviderUtils.getMarkers(importTrackId).size());
|
||||
@@ -162,7 +162,7 @@ public class KMLTrackImporterTest {
|
||||
assertEquals("unknown", importedTrack.getActivityType());
|
||||
assertEquals("Test Track", importedTrack.getDescription());
|
||||
assertEquals("2020-11-28 18:06", importedTrack.getName());
|
||||
assertEquals("UNKNOWN", importedTrack.getIcon());
|
||||
assertEquals("UNKNOWN", importedTrack.getActivityTypeId());
|
||||
|
||||
// 2. markers
|
||||
assertEquals(0, contentProviderUtils.getMarkers(importTrackId).size());
|
||||
|
||||
+1
-1
@@ -40,7 +40,7 @@ public class AggregatedStatisticsTest {
|
||||
statistics.setMinAltitude(1200.0); // Resulting min altitude
|
||||
|
||||
Track track = new Track();
|
||||
track.setIcon(ActivityType.findByLocalizedString(context, category)
|
||||
track.setActivityTypeId(ActivityType.findByLocalizedString(context, category)
|
||||
.getId());
|
||||
track.setActivityType(category);
|
||||
track.setTrackStatistics(statistics);
|
||||
|
||||
Reference in New Issue
Block a user