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

Method testReset

test/core/TestMutableDataPoint.java:56–72  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

54 }
55
56 @Test
57 public void testReset() {
58 MutableDataPoint dp_foo = new MutableDataPoint();
59 dp_foo.reset(19L, 1717171L);
60 MutableDataPoint dp = new MutableDataPoint();
61 dp.reset(dp_foo);
62 assertTrue(dp.isInteger());
63 assertEquals(1717171L, dp.longValue());
64 assertEquals(19L, dp.timestamp());
65 assertEquals(1717171L, dp.toDouble(), 0);
66 dp_foo.reset(17L, 0.1717);
67 dp.reset(dp_foo);
68 assertFalse(dp.isInteger());
69 assertEquals(0.1717, dp.doubleValue(), 0);
70 assertEquals(17L, dp.timestamp());
71 assertEquals(0.1717, dp.toDouble(), 0);
72 }
73
74 @Test
75 public void testOfDoubleValue() {

Callers

nothing calls this directly

Calls 6

resetMethod · 0.95
isIntegerMethod · 0.95
longValueMethod · 0.95
timestampMethod · 0.95
toDoubleMethod · 0.95
doubleValueMethod · 0.95

Tested by

no test coverage detected