Example #1
0
 @Test
 public void testTimeIsUpdated() throws Exception {
   Measurement last = initialHistory.getLastMeasurement();
   processor.process(exchange);
   MeasurementHistory newHistory = processor.getMeasurementHistory(exchange);
   assertNotSame(last, newHistory.getLastMeasurement());
 }
Example #2
0
 @Test
 public void testUpdatedTimeIsAfterTheLastTime() throws Exception {
   Measurement initial = initialHistory.getLastMeasurement();
   processor.process(exchange);
   MeasurementHistory history = processor.getMeasurementHistory(exchange);
   Measurement last = history.getLastMeasurement();
   assertTrue(last.getTimestamp().getNanoValue() > initial.getTimestamp().getNanoValue());
 }
Example #3
0
 @Test
 public void testReferenceDateIsNotChanged() throws Exception {
   Date referenceDate = initialHistory.getReferenceDate();
   processor.process(exchange);
   processor.process(exchange);
   assertEquals(referenceDate, processor.getMeasurementHistory(exchange).getReferenceDate());
 }