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

Method parseParam

test/query/expression/TestTimeShift.java:47–70  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

45 }
46
47 @Test
48 public void parseParam() throws Exception {
49 assertEquals(TimeUnit.DAYS.toMillis(7), this.timeshift.parseParam("+1week "));
50 assertEquals(TimeUnit.DAYS.toMillis(1), this.timeshift.parseParam("+1days "));
51 assertEquals(TimeUnit.HOURS.toMillis(1), this.timeshift.parseParam("+1hr "));
52 assertEquals(TimeUnit.MINUTES.toMillis(1), this.timeshift.parseParam("+1min "));
53 assertEquals(TimeUnit.SECONDS.toMillis(1), this.timeshift.parseParam("+1sec "));
54 assertEquals(TimeUnit.DAYS.toMillis(7), this.timeshift.parseParam("+1 week "));
55 assertEquals(TimeUnit.DAYS.toMillis(1), this.timeshift.parseParam("+1 days "));
56 assertEquals(TimeUnit.HOURS.toMillis(1), this.timeshift.parseParam("+1 hr "));
57 assertEquals(TimeUnit.MINUTES.toMillis(1), this.timeshift.parseParam("+1 min "));
58 assertEquals(TimeUnit.SECONDS.toMillis(1), this.timeshift.parseParam("+1 sec "));
59 assertEquals(TimeUnit.DAYS.toMillis(7), this.timeshift.parseParam("+1week"));
60 assertEquals(TimeUnit.DAYS.toMillis(1), this.timeshift.parseParam("+1days"));
61 assertEquals(TimeUnit.HOURS.toMillis(1), this.timeshift.parseParam("+1hr"));
62 assertEquals(TimeUnit.MINUTES.toMillis(1), this.timeshift.parseParam("+1min"));
63 assertEquals(TimeUnit.SECONDS.toMillis(1), this.timeshift.parseParam("+1sec"));
64 assertEquals(TimeUnit.DAYS.toMillis(7), this.timeshift.parseParam("+1 week"));
65 assertEquals(TimeUnit.DAYS.toMillis(1), this.timeshift.parseParam("+1 days"));
66 assertEquals(TimeUnit.HOURS.toMillis(1), this.timeshift.parseParam("+1 hr"));
67 assertEquals(TimeUnit.MINUTES.toMillis(1), this.timeshift.parseParam("+1 min"));
68 assertEquals(TimeUnit.SECONDS.toMillis(1), this.timeshift.parseParam("+1 sec"));
69 assertEquals(60000L, this.timeshift.parseParam("+1min"));
70 }
71
72 @Test
73 public void shiftDataPoint() throws Exception {

Callers 1

shiftDataPointMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected