use of com.srotya.sidewinder.core.storage.Series in project sidewinder by srotya.
the class TestSingleValueAggregators method testFirstFunctionLong.
@Test
public void testFirstFunctionLong() {
FirstFunction f = new FirstFunction();
long[] values = { 2, 1, 3, 4 };
List<DataPoint> dps = new ArrayList<>();
long ts = System.currentTimeMillis();
for (long d : values) {
dps.add(MiscUtils.buildDataPoint(ts, d));
}
Series series = new Series();
series.setDataPoints(dps);
Series result = f.apply(series);
assertEquals(2, result.getDataPoints().get(0).getLongValue());
}
Aggregations