forked from upstream-mirrors/OpenTracks
KMLImporter: added test.
This commit is contained in:
@@ -177,4 +177,15 @@ public class KMLImportTest {
|
|||||||
// when
|
// when
|
||||||
importTrackId = importer.importFile(inputStream).get(0);
|
importTrackId = importer.importFile(inputStream).get(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@LargeTest
|
||||||
|
@Test(expected = ImportParserException.class)
|
||||||
|
public void kml_when_locations_different() throws IOException {
|
||||||
|
// given
|
||||||
|
XMLImporter importer = new XMLImporter(new KmlTrackImporter(context, trackImporter));
|
||||||
|
InputStream inputStream = InstrumentationRegistry.getInstrumentation().getContext().getResources().openRawResource(de.dennisguse.opentracks.debug.test.R.raw.kml22_when_locations_different);
|
||||||
|
|
||||||
|
// when
|
||||||
|
importTrackId = importer.importFile(inputStream).get(0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<kml xmlns:atom="http://www.w3.org/2005/Atom"
|
||||||
|
xmlns:gx="http://www.google.com/kml/ext/2.2"
|
||||||
|
xmlns="http://www.opengis.net/kml/2.2">
|
||||||
|
<Document>
|
||||||
|
<Placemark>
|
||||||
|
<gx:MultiTrack>
|
||||||
|
<altitudeMode>absolute</altitudeMode>
|
||||||
|
<gx:interpolate>1</gx:interpolate>
|
||||||
|
<gx:Track>
|
||||||
|
<when>2021-05-29T18:06:21.767Z</when>
|
||||||
|
<gx:coord />
|
||||||
|
|
||||||
|
<gx:coord>14.0 3.0 10.0</gx:coord>
|
||||||
|
</gx:Track>
|
||||||
|
</gx:MultiTrack>
|
||||||
|
</Placemark>
|
||||||
|
</Document>
|
||||||
|
</kml>
|
||||||
Reference in New Issue
Block a user