mirror of
https://codeberg.org/OpenTracksApp/OpenTracks.git
synced 2026-10-02 09:33:06 +02:00
Theorically solved last problem with tests...anything more?
This commit is contained in:
+4
-3
@@ -57,8 +57,8 @@ public class TrackPathPainterFactoryTest extends TrackPathPainterTestCase {
|
||||
DynamicSpeedTrackPathPainter.class);
|
||||
}
|
||||
|
||||
private void testTrackPathPainterFactorySpecific(Context context, SharedPreferences prefs,
|
||||
int track_color_mode, Object classtested) {
|
||||
private <T> void testTrackPathPainterFactorySpecific(Context context, SharedPreferences prefs,
|
||||
int track_color_mode, Class <? extends TrackPathPainter> classtested) {
|
||||
prefs.edit().putString(context.getString(track_color_mode),
|
||||
context.getString(R.string.track_color_mode_key)).commit();
|
||||
|
||||
@@ -68,7 +68,8 @@ public class TrackPathPainterFactoryTest extends TrackPathPainterTestCase {
|
||||
TrackPathPainter painter = TrackPathPainterFactory.getTrackPathPainter(context);
|
||||
|
||||
assertNotNull(painter);
|
||||
expect(painter instanceof classtested.getClass()); //i cant find the way to make this part work... :S
|
||||
expect(classtested.isInstance(painter));
|
||||
|
||||
painter.updatePath(myTracksOverlay.getMapProjection(mockView),
|
||||
myTracksOverlay.getMapViewRect(mockView), startLocationIdx, alwaysVisible,
|
||||
myTracksOverlay.getPoints());
|
||||
|
||||
Reference in New Issue
Block a user