forked from upstream-mirrors/OpenTracks
fix eclipse warnings
This commit is contained in:
+3
-8
@@ -637,11 +637,8 @@ public class MyTracksProviderUtilsImplTest extends AndroidTestCase {
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests the method
|
||||
* {@link MyTracksProviderUtilsImpl#bulkInsertTrackPoint(Location[], int, long)}
|
||||
* . This test also covers the method
|
||||
* {@link MyTracksProviderUtilsImpl#createContentValues(Location, long)} and
|
||||
* the inner class {@link MyTracksProviderUtilsImpl.CachedTrackPointsIndexes}.
|
||||
* Tests the method {@link MyTracksProviderUtilsImpl#bulkInsertTrackPoint(Location[],
|
||||
* int, long)}.
|
||||
*/
|
||||
public void testBulkInsertTrackPoint() {
|
||||
// Insert track, point at first.
|
||||
@@ -730,9 +727,7 @@ public class MyTracksProviderUtilsImplTest extends AndroidTestCase {
|
||||
|
||||
/**
|
||||
* Tests the method
|
||||
* {@link MyTracksProviderUtilsImpl#insertTrackPoint(Location, long)}. This
|
||||
* test also covers the method
|
||||
* {@link MyTracksProviderUtilsImpl#createContentValues(Location, long)}.
|
||||
* {@link MyTracksProviderUtilsImpl#insertTrackPoint(Location, long)}.
|
||||
*/
|
||||
public void testInsertTrackPoint() {
|
||||
// Insert track, point at first.
|
||||
|
||||
@@ -794,9 +794,7 @@ public class TrackDataHubTest extends AndroidTestCase {
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests the method {@link TrackDataHub#start()}. This method would also cover
|
||||
* some logic of {@link TrackDataHub#loadDataForAll()} and
|
||||
* {@link TrackDataHub#notifySelectedTrackChanged(Set)}.
|
||||
* Tests the method {@link TrackDataHub#start()}.
|
||||
*/
|
||||
public void testRegisterSelectedTrackListener() {
|
||||
dataSource.registerOnSharedPreferenceChangeListener(capture(preferenceChangeListenerCapture));
|
||||
@@ -807,14 +805,13 @@ public class TrackDataHubTest extends AndroidTestCase {
|
||||
trackDataListener1.onSelectedTrackChanged(track);
|
||||
replay();
|
||||
trackDataHub.start();
|
||||
trackDataHub.registerTrackDataListener(trackDataListener1, EnumSet.of(TrackDataType.SELECTED_TRACK));
|
||||
trackDataHub.registerTrackDataListener(
|
||||
trackDataListener1, EnumSet.of(TrackDataType.SELECTED_TRACK));
|
||||
verifyAndReset();
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests the method {@link TrackDataHub#start()}. This method would also cover
|
||||
* some logic of PreferencesUtils and
|
||||
* {@link TrackDataHub#notifyTracksTableUpdate(Set)}.
|
||||
* Tests the method {@link TrackDataHub#start()}.
|
||||
*/
|
||||
public void testRegisterTracksTableListener() {
|
||||
dataSource.registerOnSharedPreferenceChangeListener(capture(preferenceChangeListenerCapture));
|
||||
@@ -827,38 +824,37 @@ public class TrackDataHubTest extends AndroidTestCase {
|
||||
trackDataListener1.onTrackUpdated(track);
|
||||
replay();
|
||||
trackDataHub.start();
|
||||
trackDataHub.registerTrackDataListener(trackDataListener1, EnumSet.of(TrackDataType.TRACKS_TABLE));
|
||||
trackDataHub.registerTrackDataListener(
|
||||
trackDataListener1, EnumSet.of(TrackDataType.TRACKS_TABLE));
|
||||
verifyAndReset();
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests the method {@link TrackDataHub#start()}. This method would also cover
|
||||
* some logic of {@link TrackDataHub#loadDataForAll()} and
|
||||
* {@link TrackDataHub#notifyWaypointsTableUpdate(Set)}.
|
||||
* Tests the method {@link TrackDataHub#start()}.
|
||||
*/
|
||||
public void testRegisterWaypointsTableListener() {
|
||||
dataSource.registerOnSharedPreferenceChangeListener(capture(preferenceChangeListenerCapture));
|
||||
Capture<ContentObserver> observerCapture = new Capture<ContentObserver>();
|
||||
dataSource.registerContentObserver(eq(WaypointsColumns.CONTENT_URI), capture(observerCapture));
|
||||
expect(myTracksProviderUtils.getWaypointCursor(capture(new Capture<Long>()), capture(new Capture<Long>()),
|
||||
expect(myTracksProviderUtils.getWaypointCursor(
|
||||
capture(new Capture<Long>()), capture(new Capture<Long>()),
|
||||
capture(new Capture<Integer>()))).andReturn(null);
|
||||
trackDataListener1.clearWaypoints();
|
||||
trackDataListener1.onNewWaypointsDone();
|
||||
replay();
|
||||
trackDataHub.start();
|
||||
trackDataHub.registerTrackDataListener(trackDataListener1, EnumSet.of(TrackDataType.WAYPOINTS_TABLE));
|
||||
trackDataHub.registerTrackDataListener(
|
||||
trackDataListener1, EnumSet.of(TrackDataType.WAYPOINTS_TABLE));
|
||||
verifyAndReset();
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests the method {@link TrackDataHub#start()}. This method would also cover
|
||||
* some logic of {@link TrackDataHub#loadDataForAll()} and
|
||||
* {@link TrackDataHub#notifyLocationStateChanged(Set)} when no last seen
|
||||
* location.
|
||||
* Tests the method {@link TrackDataHub#start()} when no last seen location.
|
||||
*/
|
||||
public void testRegisterLocationListener_noLastSeenLocation() {
|
||||
dataSource.registerOnSharedPreferenceChangeListener(capture(preferenceChangeListenerCapture));
|
||||
Capture<CurrentLocationListener> currentLocationListener = new Capture<CurrentLocationListener>();
|
||||
Capture<CurrentLocationListener> currentLocationListener = new Capture<
|
||||
CurrentLocationListener>();
|
||||
dataSource.registerLocationListener(capture(currentLocationListener));
|
||||
trackDataListener1.onLocationStateChanged(capture(new Capture<LocationState>()));
|
||||
replay();
|
||||
@@ -869,14 +865,12 @@ public class TrackDataHubTest extends AndroidTestCase {
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests the method {@link TrackDataHub#start()}. This method would also cover
|
||||
* some logic of {@link TrackDataHub#loadDataForAll()} and
|
||||
* {@link TrackDataHub#notifyLocationChanged(Location, boolean, Set)} when has
|
||||
* last seen location.
|
||||
* Tests the method {@link TrackDataHub#start()} when has last seen location.
|
||||
*/
|
||||
public void testRegisterLocationListener_hasLastSeenLocation() {
|
||||
dataSource.registerOnSharedPreferenceChangeListener(capture(preferenceChangeListenerCapture));
|
||||
Capture<CurrentLocationListener> currentLocationListener = new Capture<CurrentLocationListener>();
|
||||
Capture<CurrentLocationListener> currentLocationListener = new Capture<
|
||||
CurrentLocationListener>();
|
||||
dataSource.registerLocationListener(capture(currentLocationListener));
|
||||
trackDataListener1.onLocationStateChanged(capture(new Capture<LocationState>()));
|
||||
trackDataListener1.onLocationChanged(capture(new Capture<Location>()));
|
||||
|
||||
Reference in New Issue
Block a user