Code refactor. Remove DynamicSpeedTrackPathDescriptor's dependency on selected_track_id_key.

This commit is contained in:
Jimmy Shih
2013-05-29 11:06:23 -07:00
parent 55861ecf0e
commit aafe93b723
9 changed files with 36 additions and 45 deletions
@@ -77,18 +77,6 @@ public class DynamicSpeedTrackPathDescriptorTest extends AndroidTestCase {
assertEquals(55, dynamicSpeedTrackPathDescriptor.getNormalSpeed());
}
/**
* Tests {@link DynamicSpeedTrackPathDescriptor#updateState()} by wrong track
* id.
*/
public void testNeedsRedraw_WrongTrackId() {
PreferencesUtils.setLong(context, R.string.selected_track_id_key,
PreferencesUtils.SELECTED_TRACK_ID_DEFAULT);
DynamicSpeedTrackPathDescriptor dynamicSpeedTrackPathDescriptor = new DynamicSpeedTrackPathDescriptor(
context);
assertEquals(false, dynamicSpeedTrackPathDescriptor.updateState());
}
/**
* Tests {@link DynamicSpeedTrackPathDescriptor#updateState()} by different
* averageMovingSpeed.