Cleanup: export/import renaming.

This commit is contained in:
Dennis Guse
2025-03-28 18:21:15 +01:00
parent ed163b2083
commit 681b987927
13 changed files with 51 additions and 56 deletions
@@ -312,7 +312,7 @@ public class ExportImportTest {
contentProviderUtils.deleteTrack(context, trackId);
// 2. import
KmzTrackImporter importer = new KmzTrackImporter(context, trackImporter);
KMZTrackImporter importer = new KMZTrackImporter(context, trackImporter);
importTrackId = importer.importFile(tmpFileUri).get(0);
// then
@@ -358,7 +358,7 @@ public class ExportImportTest {
// 2. import
InputStream inputStream = context.getContentResolver().openInputStream(tmpFileUri);
XMLImporter importer = new XMLImporter(new KmlTrackImporter(context, trackImporter));
XMLImporter importer = new XMLImporter(new KMLTrackImporter(context, trackImporter));
importTrackId = importer.importFile(inputStream).get(0);
// then
@@ -383,7 +383,7 @@ public class ExportImportTest {
// 2. import
InputStream inputStream = context.getContentResolver().openInputStream(tmpFileUri);
XMLImporter importer = new XMLImporter(new GpxTrackImporter(context, trackImporter));
XMLImporter importer = new XMLImporter(new GPXTrackImporter(context, trackImporter));
importTrackId = importer.importFile(inputStream).get(0);
// then
@@ -503,7 +503,7 @@ public class ExportImportTest {
// 2. import
InputStream inputStream = context.getContentResolver().openInputStream(tmpFileUri);
XMLImporter importer = new XMLImporter(new GpxTrackImporter(context, trackImporter));
XMLImporter importer = new XMLImporter(new GPXTrackImporter(context, trackImporter));
importTrackId = importer.importFile(inputStream).get(0);
// then
@@ -68,7 +68,7 @@ public class GPXTrackImporterTest {
@Test
public void gpx_with_pause_resume() throws IOException {
// given
XMLImporter importer = new XMLImporter(new GpxTrackImporter(context, trackImporter));
XMLImporter importer = new XMLImporter(new GPXTrackImporter(context, trackImporter));
InputStream inputStream = InstrumentationRegistry.getInstrumentation().getContext().getResources().openRawResource(de.dennisguse.opentracks.test.R.raw.legacy_gpx_pause_resume);
// when
@@ -132,7 +132,7 @@ public class GPXTrackImporterTest {
@Test
public void gpx_without_speed() throws IOException {
// given
XMLImporter importer = new XMLImporter(new GpxTrackImporter(context, trackImporter));
XMLImporter importer = new XMLImporter(new GPXTrackImporter(context, trackImporter));
InputStream inputStream = InstrumentationRegistry.getInstrumentation().getContext().getResources().openRawResource(de.dennisguse.opentracks.test.R.raw.gpx11_without_speed);
// when
@@ -187,7 +187,7 @@ public class GPXTrackImporterTest {
@Test
public void gpx_speed_no_namespace() throws IOException {
// given
XMLImporter importer = new XMLImporter(new GpxTrackImporter(context, trackImporter));
XMLImporter importer = new XMLImporter(new GPXTrackImporter(context, trackImporter));
InputStream inputStream = InstrumentationRegistry.getInstrumentation().getContext().getResources().openRawResource(de.dennisguse.opentracks.test.R.raw.gpx11_with_speed_no_namespace);
// when
@@ -246,7 +246,7 @@ public class GPXTrackImporterTest {
@Test
public void gpx_legacy_trackpointextension() throws IOException {
// given
XMLImporter importer = new XMLImporter(new GpxTrackImporter(context, trackImporter));
XMLImporter importer = new XMLImporter(new GPXTrackImporter(context, trackImporter));
InputStream inputStream = InstrumentationRegistry.getInstrumentation().getContext().getResources().openRawResource(de.dennisguse.opentracks.test.R.raw.legacy_gpx_trackpointextensions_incorrect);
// when
@@ -317,7 +317,7 @@ public class GPXTrackImporterTest {
@Test
public void importExportTest_timezone() throws IOException {
// given
XMLImporter importer = new XMLImporter(new GpxTrackImporter(context, trackImporter));
XMLImporter importer = new XMLImporter(new GPXTrackImporter(context, trackImporter));
InputStream inputStream = InstrumentationRegistry.getInstrumentation().getContext().getResources().openRawResource(de.dennisguse.opentracks.test.R.raw.gpx_timezone);
InputStream inputStreamExpected = InstrumentationRegistry.getInstrumentation().getContext().getResources().openRawResource(de.dennisguse.opentracks.test.R.raw.gpx_timezone);
@@ -62,7 +62,7 @@ public class KMLTrackImporterTest {
@Test
public void kml22_order_location_and_when() throws IOException {
// given
XMLImporter importer = new XMLImporter(new KmlTrackImporter(context, trackImporter));
XMLImporter importer = new XMLImporter(new KMLTrackImporter(context, trackImporter));
InputStream inputStream = InstrumentationRegistry.getInstrumentation().getContext().getResources().openRawResource(de.dennisguse.opentracks.test.R.raw.kml22_order_location_and_when);
// when
@@ -118,7 +118,7 @@ public class KMLTrackImporterTest {
@Test
public void kml22_time_decreases() throws IOException {
// given
XMLImporter importer = new XMLImporter(new KmlTrackImporter(context, trackImporter));
XMLImporter importer = new XMLImporter(new KMLTrackImporter(context, trackImporter));
InputStream inputStream = InstrumentationRegistry.getInstrumentation().getContext().getResources().openRawResource(de.dennisguse.opentracks.test.R.raw.kml22_time_decreases);
// when
@@ -159,7 +159,7 @@ public class KMLTrackImporterTest {
@Test
public void kml22_with_statistics_marker() throws IOException {
// given
XMLImporter importer = new XMLImporter(new KmlTrackImporter(context, trackImporter));
XMLImporter importer = new XMLImporter(new KMLTrackImporter(context, trackImporter));
InputStream inputStream = InstrumentationRegistry.getInstrumentation().getContext().getResources().openRawResource(de.dennisguse.opentracks.test.R.raw.legacy_kml22_statistics_marker);
// when
@@ -243,7 +243,7 @@ public class KMLTrackImporterTest {
@Test(expected = ImportParserException.class)
public void kml_without_locations() throws IOException {
// given
XMLImporter importer = new XMLImporter(new KmlTrackImporter(context, trackImporter));
XMLImporter importer = new XMLImporter(new KMLTrackImporter(context, trackImporter));
InputStream inputStream = InstrumentationRegistry.getInstrumentation().getContext().getResources().openRawResource(de.dennisguse.opentracks.test.R.raw.kml22_without_locations);
// when
@@ -254,7 +254,7 @@ public class KMLTrackImporterTest {
@Test(expected = ImportParserException.class)
public void kml_when_locations_different() throws IOException {
// given
XMLImporter importer = new XMLImporter(new KmlTrackImporter(context, trackImporter));
XMLImporter importer = new XMLImporter(new KMLTrackImporter(context, trackImporter));
InputStream inputStream = InstrumentationRegistry.getInstrumentation().getContext().getResources().openRawResource(de.dennisguse.opentracks.test.R.raw.kml22_when_locations_different);
// when