Fixed ContentProviderUtils tests.

Account for using a real (non-empty) database and thus non-predictable object ids.
This commit is contained in:
Dennis Guse
2019-09-03 21:28:29 +02:00
parent 57930a8d86
commit 0f311e062e
3 changed files with 67 additions and 41 deletions
@@ -294,11 +294,9 @@ public interface ContentProviderUtils {
* @param trackId the track id
* @param startTrackPointId the starting track point id. -1L to ignore
* @param maxLocations maximum number of locations to return. -1 for no limit
* @param descending true to sort the result in descending order (latest
* location first)
* @param descending true to sort the result in descending order (latest location first)
*/
Cursor getTrackPointCursor(
long trackId, long startTrackPointId, int maxLocations, boolean descending);
Cursor getTrackPointCursor(long trackId, long startTrackPointId, int maxLocations, boolean descending);
/**
* Creates a new read-only iterator over a given track's points. It provides a
@@ -317,8 +315,7 @@ public interface ContentProviderUtils {
* location first)
* @param locationFactory the location factory
*/
LocationIterator getTrackPointLocationIterator(
long trackId, long startTrackPointId, boolean descending, LocationFactory locationFactory);
LocationIterator getTrackPointLocationIterator(long trackId, long startTrackPointId, boolean descending, LocationFactory locationFactory);
/**
* Inserts a track point.
@@ -851,8 +851,7 @@ public class ContentProviderUtilsImpl implements ContentProviderUtils {
}
@Override
public Cursor getTrackPointCursor(
long trackId, long startTrackPointId, int maxLocations, boolean descending) {
public Cursor getTrackPointCursor(long trackId, long startTrackPointId, int maxLocations, boolean descending) {
if (trackId < 0) {
return null;
}