MCPcopy Create free account
hub / github.com/OpenTSDB/opentsdb / before

Method before

test/query/expression/TestMovingAverage.java:60–79  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

58 private MovingAverage func;
59
60 @Before
61 public void before() throws Exception {
62 view = SeekableViewsForTest.generator(START_TIME, INTERVAL,
63 NUM_POINTS, true, 1, 1);
64 data_query = mock(TSQuery.class);
65 when(data_query.startTime()).thenReturn(START_TIME);
66 when(data_query.endTime()).thenReturn(START_TIME + (INTERVAL * NUM_POINTS));
67
68 dps = PowerMockito.mock(DataPoints.class);
69 when(dps.iterator()).thenReturn(view);
70 when(dps.metricNameAsync()).thenReturn(Deferred.fromResult(METRIC));
71
72 group_bys = new DataPoints[] { dps };
73
74 query_results = new ArrayList<DataPoints[]>(1);
75 query_results.add(group_bys);
76
77 params = new ArrayList<String>(1);
78 func = new MovingAverage();
79 }
80
81 @Test
82 public void evaluateWindow1dps() throws Exception {

Callers

nothing calls this directly

Calls 6

generatorMethod · 0.95
startTimeMethod · 0.80
endTimeMethod · 0.80
iteratorMethod · 0.65
metricNameAsyncMethod · 0.65
addMethod · 0.45

Tested by

no test coverage detected