| 56 | private DiffSeries func; |
| 57 | |
| 58 | @Before |
| 59 | public void beforeLocal() throws Exception { |
| 60 | view = SeekableViewsForTest.generator(START_TIME, INTERVAL, |
| 61 | NUM_POINTS, true, 1, 1); |
| 62 | data_query = mock(TSQuery.class); |
| 63 | when(data_query.startTime()).thenReturn(START_TIME); |
| 64 | when(data_query.endTime()).thenReturn(START_TIME + (INTERVAL * NUM_POINTS)); |
| 65 | |
| 66 | dps = PowerMockito.mock(DataPoints.class); |
| 67 | when(dps.iterator()).thenReturn(view); |
| 68 | when(dps.metricName()).thenReturn(METRIC_STRING); |
| 69 | when(dps.metricUID()).thenReturn(new byte[] {0,0,1}); |
| 70 | |
| 71 | group_bys = new DataPoints[] { dps }; |
| 72 | |
| 73 | query_results = new ArrayList<DataPoints[]>(1); |
| 74 | query_results.add(group_bys); |
| 75 | |
| 76 | params = new ArrayList<String>(1); |
| 77 | func = new DiffSeries(tsdb); |
| 78 | } |
| 79 | |
| 80 | @Test |
| 81 | public void diffOneSeriesEach() throws Exception { |