TrackPoint has Location as delegate instead of inheritance.

This commit is contained in:
Dennis Guse
2020-03-29 12:30:16 +02:00
parent 901cffee97
commit 194379295d
25 changed files with 288 additions and 184 deletions
@@ -1,5 +1,7 @@
package de.dennisguse.opentracks.content.data;
import android.location.Location;
public class TestDataUtil {
public static final double INITIAL_LATITUDE = 37.0;
@@ -30,12 +32,12 @@ public class TestDataUtil {
* @return created location
*/
public static TrackPoint createTrackPoint(int i) {
TrackPoint trackpoint = new TrackPoint("test");
trackpoint.setLatitude(INITIAL_LATITUDE + (double) i / 10000.0);
trackpoint.setLongitude(INITIAL_LONGITUDE - (double) i / 10000.0);
trackpoint.setAccuracy((float) i / 100.0f);
trackpoint.setAltitude(i * ALTITUDE_INTERVAL);
trackpoint.setTime(i + 1);
return trackpoint;
Location location = new Location("test");
location.setLatitude(INITIAL_LATITUDE + (double) i / 10000.0);
location.setLongitude(INITIAL_LONGITUDE - (double) i / 10000.0);
location.setAccuracy((float) i / 100.0f);
location.setAltitude(i * ALTITUDE_INTERVAL);
location.setTime(i + 1);
return new TrackPoint(location);
}
}