Simplify TrackExporter interface.

This commit is contained in:
Dennis Guse
2023-05-24 20:12:04 +02:00
parent 3aadf6d5d8
commit f48c4806b5
7 changed files with 6 additions and 30 deletions
@@ -208,7 +208,7 @@ public class ExportImportTest {
// when
// 1. export
trackExporter.writeTrack(track, context.getContentResolver().openOutputStream(tmpFileUri));
trackExporter.writeTrack(List.of(track), context.getContentResolver().openOutputStream(tmpFileUri));
contentProviderUtils.deleteTrack(context, trackId);
// 2. import
@@ -290,7 +290,7 @@ public class ExportImportTest {
TrackExporter trackExporter = TrackFileFormat.KML_WITH_TRACKDETAIL_AND_SENSORDATA.createTrackExporter(context, contentProviderUtils);
// when
trackExporter.writeTrack(track, context.getContentResolver().openOutputStream(tmpFileUri));
trackExporter.writeTrack(List.of(track), context.getContentResolver().openOutputStream(tmpFileUri));
// 2. import
InputStream inputStream = context.getContentResolver().openInputStream(tmpFileUri);
@@ -314,7 +314,7 @@ public class ExportImportTest {
// when
// 1. export
trackExporter.writeTrack(track, context.getContentResolver().openOutputStream(tmpFileUri));
trackExporter.writeTrack(List.of(track), context.getContentResolver().openOutputStream(tmpFileUri));
contentProviderUtils.deleteTrack(context, trackId);
// 2. import
@@ -432,7 +432,7 @@ public class ExportImportTest {
// when
// 1. export
trackExporter.writeTrack(track, context.getContentResolver().openOutputStream(tmpFileUri));
trackExporter.writeTrack(List.of(track), context.getContentResolver().openOutputStream(tmpFileUri));
// 2. import
InputStream inputStream = context.getContentResolver().openInputStream(tmpFileUri);
@@ -457,7 +457,7 @@ public class ExportImportTest {
// when
// 1. export
trackExporter.writeTrack(track, context.getContentResolver().openOutputStream(tmpFileUri));
trackExporter.writeTrack(List.of(track), context.getContentResolver().openOutputStream(tmpFileUri));
contentProviderUtils.deleteTrack(context, trackId);
// then
@@ -232,7 +232,7 @@ public class GPXTrackImporterTest {
Track importedTrack = contentProviderUtils.getTrack(importTrackId);
TrackExporter trackExporter = TrackFileFormat.GPX.createTrackExporter(context, contentProviderUtils);
trackExporter.writeTrack(importedTrack, outputStream);
trackExporter.writeTrack(List.of(importedTrack), outputStream);
// then
String expected = new BufferedReader(