use of edu.snu.mist.common.windows.WindowData in project mist by snuspl.
the class OperatorTestUtils method checkWindowData.
/**
* Checks the windowed result is equal to the expected result.
*/
public static void checkWindowData(final MistEvent result, final Collection<Integer> expectedResult, final long expectedWindowStartMoment, final long expectedWindowSize, final long expectedWindowTimestamp) {
Assert.assertTrue(result.isData());
Assert.assertTrue(((MistDataEvent) result).getValue() instanceof WindowData);
final WindowData windowData = (WindowData) ((MistDataEvent) result).getValue();
Assert.assertEquals(expectedResult, windowData.getDataCollection());
Assert.assertEquals(expectedWindowStartMoment, windowData.getStart());
Assert.assertEquals(expectedWindowSize, windowData.getEnd() - windowData.getStart() + 1);
Assert.assertEquals(expectedWindowTimestamp, result.getTimestamp());
}
Aggregations