예제 #1
0
 @Test
 public void testTimeIsUpdated() throws Exception {
   Measurement last = initialHistory.getLastMeasurement();
   processor.process(exchange);
   MeasurementHistory newHistory = processor.getMeasurementHistory(exchange);
   assertNotSame(last, newHistory.getLastMeasurement());
 }
예제 #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());
 }
예제 #3
0
 @Test
 public void testReferenceDateIsNotChanged() throws Exception {
   Date referenceDate = initialHistory.getReferenceDate();
   processor.process(exchange);
   processor.process(exchange);
   assertEquals(referenceDate, processor.getMeasurementHistory(exchange).getReferenceDate());
 }