Fix warnings in test project.

This commit is contained in:
youtaol
2012-09-05 14:22:27 +08:00
parent 9a10675441
commit c5c5620b79
5 changed files with 15 additions and 13 deletions
@@ -81,7 +81,7 @@ public class DescriptionGeneratorImplTest extends AndroidTestCase {
} }
/** /**
* Tests {@link DescriptionGeneratorImpl#generateWaypointDescription(Waypoint)}. * Tests {@link DescriptionGeneratorImpl#generateWaypointDescription(TripStatistics)}.
*/ */
public void testGenerateWaypointDescription() { public void testGenerateWaypointDescription() {
Waypoint waypoint = new Waypoint(); Waypoint waypoint = new Waypoint();
@@ -643,7 +643,6 @@ public class MyTracksProviderUtilsImplTest extends AndroidTestCase {
* {@link MyTracksProviderUtilsImpl#createContentValues(Location, long)} and * {@link MyTracksProviderUtilsImpl#createContentValues(Location, long)} and
* the inner class {@link MyTracksProviderUtilsImpl.CachedTrackPointsIndexes}. * the inner class {@link MyTracksProviderUtilsImpl.CachedTrackPointsIndexes}.
*/ */
@SuppressWarnings("javadoc")
public void testBulkInsertTrackPoint() { public void testBulkInsertTrackPoint() {
// Insert track, point at first. // Insert track, point at first.
long trackId = System.currentTimeMillis(); long trackId = System.currentTimeMillis();
@@ -735,7 +734,6 @@ public class MyTracksProviderUtilsImplTest extends AndroidTestCase {
* test also covers the method * test also covers the method
* {@link MyTracksProviderUtilsImpl#createContentValues(Location, long)}. * {@link MyTracksProviderUtilsImpl#createContentValues(Location, long)}.
*/ */
@SuppressWarnings("javadoc")
public void testInsertTrackPoint() { public void testInsertTrackPoint() {
// Insert track, point at first. // Insert track, point at first.
long trackId = System.currentTimeMillis(); long trackId = System.currentTimeMillis();
@@ -889,8 +889,7 @@ public class TrackDataHubTest extends AndroidTestCase {
/** /**
* Tests the method {@link TrackDataHub#start()}. This method would also cover * Tests the method {@link TrackDataHub#start()}. This method would also cover
* some logic of {@link TrackDataHub#loadDataForAllListeners()} and * some logic of {@link TrackDataHub#notifyHeadingChanged(float)}.
* {@link TrackDataHub#notifyHeadingChanged(float)}.
*/ */
public void testRegisterHeadingListener() { public void testRegisterHeadingListener() {
dataSource.registerOnSharedPreferenceChangeListener(capture(preferenceChangeListenerCapture)); dataSource.registerOnSharedPreferenceChangeListener(capture(preferenceChangeListenerCapture));
@@ -18,10 +18,13 @@ package com.google.android.apps.mytracks.maps;
import com.google.android.apps.mytracks.ColoredPath; import com.google.android.apps.mytracks.ColoredPath;
import com.google.android.apps.mytracks.MapOverlay.CachedLocation; import com.google.android.apps.mytracks.MapOverlay.CachedLocation;
import com.google.android.apps.mytracks.TrackStubUtils; import com.google.android.apps.mytracks.TrackStubUtils;
import com.google.android.maps.Projection;
import com.google.android.maps.mytracks.R; import com.google.android.maps.mytracks.R;
import com.google.android.testing.mocking.AndroidMock; import com.google.android.testing.mocking.AndroidMock;
import com.google.android.testing.mocking.UsesMocks; import com.google.android.testing.mocking.UsesMocks;
import android.graphics.Rect;
import java.util.List; import java.util.List;
/** /**
@@ -56,7 +59,7 @@ public class DynamicSpeedTrackPathPainterTest extends TrackPathPainterTestCase {
/** /**
* Tests the method * Tests the method
* {@link DynamicSpeedTrackPathPainter#updatePath(com.google.android.maps.Projection, android.graphics.Rect, int, Boolean, java.util.List)} * {@link DynamicSpeedTrackPathPainter#updatePath(Projection, Rect, int, List)}
* when all locations are invalid. * when all locations are invalid.
*/ */
public void testUpdatePath_AllInvalidLocation() { public void testUpdatePath_AllInvalidLocation() {
@@ -70,7 +73,7 @@ public class DynamicSpeedTrackPathPainterTest extends TrackPathPainterTestCase {
/** /**
* Tests the * Tests the
* {@link DynamicSpeedTrackPathPainter#updatePath(com.google.android.maps.Projection, android.graphics.Rect, int, Boolean, java.util.List)} * {@link DynamicSpeedTrackPathPainter#updatePath(Projection, Rect, int, List)}
* when all locations are valid. * when all locations are valid.
*/ */
public void testUpdatePath_AllValidLocation() { public void testUpdatePath_AllValidLocation() {
@@ -89,7 +92,7 @@ public class DynamicSpeedTrackPathPainterTest extends TrackPathPainterTestCase {
/** /**
* Tests the * Tests the
* {@link DynamicSpeedTrackPathPainter#updatePath(com.google.android.maps.Projection, android.graphics.Rect, int, Boolean, java.util.List)} * {@link DynamicSpeedTrackPathPainter#updatePath(Projection, Rect, int, List)}
* when all locations are valid. This test setups 4 segments with 25 points * when all locations are valid. This test setups 4 segments with 25 points
* each. The first segment has slow speed, the second segment has normal * each. The first segment has slow speed, the second segment has normal
* speed, the third segment has fast speed, and the fourth segment has slow * speed, the third segment has fast speed, and the fourth segment has slow
@@ -17,10 +17,12 @@ package com.google.android.apps.mytracks.maps;
import com.google.android.apps.mytracks.MapOverlay.CachedLocation; import com.google.android.apps.mytracks.MapOverlay.CachedLocation;
import com.google.android.apps.mytracks.TrackStubUtils; import com.google.android.apps.mytracks.TrackStubUtils;
import com.google.android.maps.Projection;
import com.google.android.testing.mocking.AndroidMock; import com.google.android.testing.mocking.AndroidMock;
import com.google.android.testing.mocking.UsesMocks; import com.google.android.testing.mocking.UsesMocks;
import android.graphics.Path; import android.graphics.Path;
import android.graphics.Rect;
import java.util.List; import java.util.List;
@@ -51,7 +53,7 @@ public class SingleColorTrackPathPainterTest extends TrackPathPainterTestCase {
/** /**
* Tests the * Tests the
* {@link SingleColorTrackPathPainter#updatePath(com.google.android.maps.Projection, android.graphics.Rect, int, Boolean, List, Path)} * {@link SingleColorTrackPathPainter#updatePath(Projection, Rect, int, List)}
* method when all locations are valid. * method when all locations are valid.
*/ */
public void testUpdatePath_AllValidLocation() { public void testUpdatePath_AllValidLocation() {
@@ -74,7 +76,7 @@ public class SingleColorTrackPathPainterTest extends TrackPathPainterTestCase {
/** /**
* Tests the * Tests the
* {@link SingleColorTrackPathPainter#updatePath(com.google.android.maps.Projection, android.graphics.Rect, int, Boolean, List, Path)} * {@link SingleColorTrackPathPainter#updatePath(Projection, Rect, int, List)}
* method when all locations are invalid. * method when all locations are invalid.
*/ */
public void testUpdatePath_AllInvalidLocation() { public void testUpdatePath_AllInvalidLocation() {
@@ -89,9 +91,9 @@ public class SingleColorTrackPathPainterTest extends TrackPathPainterTestCase {
} }
/** /**
* Tests the {@link SingleColorTrackPathPainter#updatePath(com.google.android.maps.Projection, * Tests the
* android.graphics.Rect, int, Boolean, List, Path)} method when there are * {@link SingleColorTrackPathPainter#updatePath(Projection, Rect, int, List)}
* three segments. * method when there are three segments.
*/ */
public void testUpdatePath_ThreeSegments() { public void testUpdatePath_ThreeSegments() {
// First segment. // First segment.