forked from upstream-mirrors/OpenTracks
Style and warning fixes.
This commit is contained in:
@@ -48,7 +48,7 @@ import org.xml.sax.SAXException;
|
||||
|
||||
/**
|
||||
* Tests for the GPX importer.
|
||||
*
|
||||
*
|
||||
* @author Steffen Horlacher
|
||||
*/
|
||||
public class GpxImporterTest extends AndroidTestCase {
|
||||
@@ -180,51 +180,45 @@ public class GpxImporterTest extends AndroidTestCase {
|
||||
/**
|
||||
* Test with invalid location - track should be deleted.
|
||||
*/
|
||||
public void testImportLocationFailure() throws ParserConfigurationException,
|
||||
SAXException, IOException {
|
||||
public void testImportLocationFailure() throws ParserConfigurationException, IOException {
|
||||
testInvalidXML(INVALID_LOCATION_TEST_GPX);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test with invalid time - track should be deleted.
|
||||
*/
|
||||
public void testImportTimeFailure() throws ParserConfigurationException,
|
||||
SAXException, IOException {
|
||||
public void testImportTimeFailure() throws ParserConfigurationException, IOException {
|
||||
testInvalidXML(INVALID_TIME_TEST_GPX);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test with invalid xml - track should be deleted.
|
||||
*/
|
||||
public void testImportXMLFailure() throws ParserConfigurationException,
|
||||
SAXException, IOException {
|
||||
public void testImportXMLFailure() throws ParserConfigurationException, IOException {
|
||||
testInvalidXML(INVALID_XML_TEST_GPX);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Test with invalid altitude - track should be deleted.
|
||||
*/
|
||||
public void testImportInvalidAltitude() throws ParserConfigurationException,
|
||||
SAXException, IOException {
|
||||
public void testImportInvalidAltitude() throws ParserConfigurationException, IOException {
|
||||
testInvalidXML(INVALID_ALTITUDE_TEST_GPX);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test with invalid latitude - track should be deleted.
|
||||
*/
|
||||
public void testImportInvalidLatitude() throws ParserConfigurationException,
|
||||
SAXException, IOException {
|
||||
public void testImportInvalidLatitude() throws ParserConfigurationException, IOException {
|
||||
testInvalidXML(INVALID_LATITUDE_TEST_GPX);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Test with invalid longitude - track should be deleted.
|
||||
*/
|
||||
public void testImportInvalidLongitude() throws ParserConfigurationException,
|
||||
SAXException, IOException {
|
||||
public void testImportInvalidLongitude() throws ParserConfigurationException, IOException {
|
||||
testInvalidXML(INVALID_LONGITUDE_TEST_GPX);
|
||||
}
|
||||
|
||||
|
||||
private void testInvalidXML(String xml) throws ParserConfigurationException,
|
||||
IOException {
|
||||
expect(providerUtils.insertTrack((Track) AndroidMock.anyObject()))
|
||||
|
||||
@@ -31,9 +31,9 @@ public class KmlTrackWriterTest extends TrackFormatWriterTest {
|
||||
}
|
||||
|
||||
@Override
|
||||
public String generateTrackDescription(Track track,
|
||||
public String generateTrackDescription(Track trackToDescribe,
|
||||
Vector<Double> distances, Vector<Double> elevations) {
|
||||
assertSame(KmlTrackWriterTest.super.track, track);
|
||||
assertSame(KmlTrackWriterTest.super.track, trackToDescribe);
|
||||
assertTrue(distances.isEmpty());
|
||||
assertTrue(elevations.isEmpty());
|
||||
return FULL_TRACK_DESCRIPTION;
|
||||
|
||||
+1
@@ -59,6 +59,7 @@ public class ResultListAdapterTest extends AndroidTestCase {
|
||||
this.urlId = urlId;
|
||||
}
|
||||
|
||||
@SuppressWarnings("hiding")
|
||||
private void saveContentView(View contentView) {
|
||||
if (this.contentView == null) {
|
||||
this.contentView = contentView;
|
||||
|
||||
+1
-1
@@ -331,7 +331,7 @@ public class TrackRecordingServiceTest
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onReceive(Context context, Intent intent) {
|
||||
public void onReceive(Context ctx, Intent intent) {
|
||||
Log.d("MyTracksTest", "Got broadcast: " + intent);
|
||||
synchronized (receivedIntents) {
|
||||
receivedIntents.add(intent);
|
||||
|
||||
+1
@@ -38,6 +38,7 @@ public class AntSensorManagerTest extends AndroidTestCase {
|
||||
super.handleMessage(rawMessage);
|
||||
}
|
||||
|
||||
@SuppressWarnings("hiding")
|
||||
@Override
|
||||
public boolean handleMessage(byte messageId, byte[] messageData) {
|
||||
this.messageId = messageId;
|
||||
|
||||
Reference in New Issue
Block a user