| 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() { |