forked from upstream-mirrors/OpenTracks
Address comments (round #2).
This commit is contained in:
+4
-2
@@ -149,12 +149,14 @@ public class MyTracksProviderUtilsImplTest extends AndroidTestCase {
|
|||||||
|
|
||||||
// Load all inserted locations.
|
// Load all inserted locations.
|
||||||
long lastPointId = -1;
|
long lastPointId = -1;
|
||||||
|
int counter = 0;
|
||||||
LocationIterator it = providerUtils.getLocationIterator(id, -1, false,
|
LocationIterator it = providerUtils.getLocationIterator(id, -1, false,
|
||||||
MyTracksProviderUtils.DEFAULT_LOCATION_FACTORY);
|
MyTracksProviderUtils.DEFAULT_LOCATION_FACTORY);
|
||||||
try {
|
try {
|
||||||
while (it.hasNext()) {
|
while (it.hasNext()) {
|
||||||
track.addLocation(it.next());
|
it.next();
|
||||||
lastPointId = it.getLocationId();
|
lastPointId = it.getLocationId();
|
||||||
|
counter++;
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
it.close();
|
it.close();
|
||||||
@@ -162,7 +164,7 @@ public class MyTracksProviderUtilsImplTest extends AndroidTestCase {
|
|||||||
|
|
||||||
assertTrue(numPoints == 0 || lastPointId > 0);
|
assertTrue(numPoints == 0 || lastPointId > 0);
|
||||||
assertEquals(numPoints, track.getNumberOfPoints());
|
assertEquals(numPoints, track.getNumberOfPoints());
|
||||||
assertEquals(numPoints, track.getLocations().size());
|
assertEquals(numPoints, counter);
|
||||||
|
|
||||||
return lastPointId;
|
return lastPointId;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user