MCPcopy Index your code
hub / github.com/OpenTSDB/opentsdb / before

Method before

test/query/expression/TestExpressionTree.java:62–81  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

60 private TreeTestExpr test_expression;
61
62 @Before
63 public void before() throws Exception {
64 view = SeekableViewsForTest.generator(START_TIME, INTERVAL,
65 NUM_POINTS, true, 1, 1);
66 data_query = mock(TSQuery.class);
67 when(data_query.startTime()).thenReturn(START_TIME);
68 when(data_query.endTime()).thenReturn(START_TIME + (INTERVAL * NUM_POINTS));
69
70 dps = PowerMockito.mock(DataPoints.class);
71 when(dps.iterator()).thenReturn(view);
72 when(dps.metricName()).thenReturn(METRIC);
73
74 group_bys = new DataPoints[] { dps };
75
76 query_results = new ArrayList<DataPoints[]>(1);
77 query_results.add(group_bys);
78
79 test_expression = new TreeTestExpr();
80 ExpressionFactory.addFunction(EXPR_NAME, test_expression);
81 }
82
83 @Test
84 public void ctorString() throws Exception {

Callers

nothing calls this directly

Calls 7

generatorMethod · 0.95
addFunctionMethod · 0.95
startTimeMethod · 0.80
endTimeMethod · 0.80
iteratorMethod · 0.65
metricNameMethod · 0.65
addMethod · 0.45

Tested by

no test coverage detected