Address comments (round #2).

This commit is contained in:
bartn
2010-12-22 14:39:04 -08:00
parent 4d88191171
commit 176062f11c
@@ -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;
} }