use of com.srotya.sidewinder.core.functions.list.Function in project sidewinder by srotya.
the class TestTransformFunctions method testCube.
@Test
public void testCube() {
Function f = new CubeFunction();
List<SeriesOutput> series = new ArrayList<>();
SeriesOutput s = new SeriesOutput(Arrays.asList(new DataPoint(1L, 3), new DataPoint(1L, 4)));
series.add(s);
List<SeriesOutput> apply = f.apply(series);
assertEquals(2, apply.get(0).getDataPoints().size());
assertEquals(27, apply.get(0).getDataPoints().get(0).getLongValue());
assertEquals(64, apply.get(0).getDataPoints().get(1).getLongValue());
}
Aggregations