forked from upstream-mirrors/OpenTracks
Remove useless method in TrackDataHub.
This commit is contained in:
@@ -815,16 +815,6 @@ public class TrackDataHub implements DataSourceListener {
|
|||||||
return reportSpeed;
|
return reportSpeed;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the status of started.
|
|
||||||
*
|
|
||||||
* @param startStatus status of started
|
|
||||||
*/
|
|
||||||
@VisibleForTesting
|
|
||||||
void setStarted(boolean startStatus) {
|
|
||||||
started = startStatus;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the value of lastSeenLocation.
|
* Sets the value of lastSeenLocation.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -814,7 +814,7 @@ public class TrackDataHubTest extends AndroidTestCase {
|
|||||||
dataSource.registerContentObserver(eq(TracksColumns.CONTENT_URI), capture(observerCapture));
|
dataSource.registerContentObserver(eq(TracksColumns.CONTENT_URI), capture(observerCapture));
|
||||||
Track track = TrackStubUtils.createTrack(1);
|
Track track = TrackStubUtils.createTrack(1);
|
||||||
expect(myTracksProviderUtils.getTrack(capture(new Capture<Long>()))).andReturn(track);
|
expect(myTracksProviderUtils.getTrack(capture(new Capture<Long>()))).andReturn(track);
|
||||||
// Make the recording track id is not euqal with selected track id.
|
// Make the track id is unique.
|
||||||
PreferencesUtils.setLong(context, R.string.recording_track_id_key, System.currentTimeMillis());
|
PreferencesUtils.setLong(context, R.string.recording_track_id_key, System.currentTimeMillis());
|
||||||
trackDataListener1.onTrackUpdated(track);
|
trackDataListener1.onTrackUpdated(track);
|
||||||
replay();
|
replay();
|
||||||
@@ -913,7 +913,7 @@ public class TrackDataHubTest extends AndroidTestCase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests the method {@link TrackDataHub#notifyPreferenceChanged(String)} when
|
* Tests the method {@link TrackDataHub#notifyPreferenceChanged(String)} when
|
||||||
* the key is R.string.metric_units_key and started status is false.
|
* the key is R.string.metric_units_key.
|
||||||
*/
|
*/
|
||||||
public void testNotifyPreferenceChanged_metricUnitsNoNotify() {
|
public void testNotifyPreferenceChanged_metricUnitsNoNotify() {
|
||||||
boolean value = false;
|
boolean value = false;
|
||||||
@@ -930,7 +930,7 @@ public class TrackDataHubTest extends AndroidTestCase {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests the method {@link TrackDataHub#notifyPreferenceChanged(String)} when
|
* Tests the method {@link TrackDataHub#notifyPreferenceChanged(String)} when
|
||||||
* the key is R.string.metric_units_key and started status is false.
|
* the key is R.string.metric_units_key.
|
||||||
*/
|
*/
|
||||||
public void testNotifyPreferenceChanged_reportSpeedNoNotify() {
|
public void testNotifyPreferenceChanged_reportSpeedNoNotify() {
|
||||||
boolean value = false;
|
boolean value = false;
|
||||||
@@ -958,7 +958,5 @@ public class TrackDataHubTest extends AndroidTestCase {
|
|||||||
trackDataHub.notifyPreferenceChanged(PreferencesUtils
|
trackDataHub.notifyPreferenceChanged(PreferencesUtils
|
||||||
.getKey(context, R.string.selected_track_id_key));
|
.getKey(context, R.string.selected_track_id_key));
|
||||||
assertEquals(value + 1, trackDataHub.getSelectedTrackId());
|
assertEquals(value + 1, trackDataHub.getSelectedTrackId());
|
||||||
// Avoid the stop() call in tearDown().
|
|
||||||
trackDataHub.setStarted(false);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user