diff --git a/MyTracks/AndroidManifest.xml b/MyTracks/AndroidManifest.xml index 7e98edd39..4ad6f92cc 100755 --- a/MyTracks/AndroidManifest.xml +++ b/MyTracks/AndroidManifest.xml @@ -109,10 +109,12 @@ + + diff --git a/MyTracks/res/layout/mytracks_layout.xml b/MyTracks/res/layout/mytracks_layout.xml index 1e4c30873..cdc3ae2a3 100644 --- a/MyTracks/res/layout/mytracks_layout.xml +++ b/MyTracks/res/layout/mytracks_layout.xml @@ -26,8 +26,8 @@ limitations under the License. android:enabled="true" android:focusable="true" android:focusableInTouchMode="true" - android:apiKey="0TXoRmxTinrZKQ9JSazj-9A34XX6_lXsRvTpXWA"/> - + android:apiKey="0y_T_wDlbgovCQMZX7ZClDeveHLLhczEyiUblvw"/> + " + " trackParam = new Capture(); @@ -171,7 +177,7 @@ public class GpxImporterTest extends AndroidTestCase { } /** - * Test with invalid location - track should be deleted + * Test with invalid location - track should be deleted. */ public void testImportLocationFailure() throws ParserConfigurationException, SAXException, IOException { @@ -179,7 +185,7 @@ public class GpxImporterTest extends AndroidTestCase { } /** - * Test with invalid time - track should be deleted + * Test with invalid time - track should be deleted. */ public void testImportTimeFailure() throws ParserConfigurationException, SAXException, IOException { @@ -187,13 +193,37 @@ public class GpxImporterTest extends AndroidTestCase { } /** - * Test with invalid xml - track should be deleted + * Test with invalid xml - track should be deleted. */ public void testImportXMLFailure() throws ParserConfigurationException, SAXException, IOException { testInvalidXML(INVALID_XML_TEST_GPX); } + + /** + * Test with invalid altitude - track should be deleted. + */ + public void testImportInvalidAltitude() throws ParserConfigurationException, + SAXException, IOException { + testInvalidXML(INVALID_ALTITUDE_TEST_GPX); + } + /** + * Test with invalid latitude - track should be deleted. + */ + public void testImportInvalidLatitude() throws ParserConfigurationException, + SAXException, IOException { + testInvalidXML(INVALID_LATITUDE_TEST_GPX); + } + + /** + * Test with invalid longitude - track should be deleted. + */ + public void testImportInvalidLongitude() throws ParserConfigurationException, + SAXException, IOException { + testInvalidXML(INVALID_LONGITUDE_TEST_GPX); + } + private void testInvalidXML(String xml) throws ParserConfigurationException, IOException { expect(providerUtils.insertTrack((Track) AndroidMock.anyObject()))