forked from upstream-mirrors/OpenTracks
ChartFragmentTest: added test for small changes.
This commit is contained in:
@@ -44,7 +44,7 @@ public class ChartValueSeriesTest {
|
|||||||
ApplicationProvider.getApplicationContext(),
|
ApplicationProvider.getApplicationContext(),
|
||||||
Integer.MIN_VALUE,
|
Integer.MIN_VALUE,
|
||||||
Integer.MAX_VALUE,
|
Integer.MAX_VALUE,
|
||||||
new int[]{100, 1000},
|
new int[]{1, 100, 1000},
|
||||||
R.string.description_altitude_metric,
|
R.string.description_altitude_metric,
|
||||||
R.string.description_altitude_imperial,
|
R.string.description_altitude_imperial,
|
||||||
R.color.chart_altitude_fill,
|
R.color.chart_altitude_fill,
|
||||||
@@ -77,6 +77,17 @@ public class ChartValueSeriesTest {
|
|||||||
assertFalse(series.isEnabled());
|
assertFalse(series.isEnabled());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testVerySmallUpdates() {
|
||||||
|
series.update(new ChartPoint(1f));
|
||||||
|
series.update(new ChartPoint(2f));
|
||||||
|
series.update(new ChartPoint(3f));
|
||||||
|
series.updateDimension();
|
||||||
|
assertEquals(1, series.getInterval());
|
||||||
|
assertEquals(1, series.getMinMarkerValue());
|
||||||
|
assertEquals(6, series.getMaxMarkerValue());
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testSmallUpdates() {
|
public void testSmallUpdates() {
|
||||||
series.update(new ChartPoint(0));
|
series.update(new ChartPoint(0));
|
||||||
|
|||||||
Reference in New Issue
Block a user