@Test public void testRateInPastAfterUpdateShouldBeDefaultRate() { double newRate = new Random().nextDouble(); hourlyRate.updateCurrentRate(newRate); assertEquals(DEFAULT_RATE, hourlyRate.rateAt(LocalDate.now().minusWeeks(3)), DELTA_VALUE); }
@Test public void testRateInFutureAfterUpdateShouldBeNewRate() { double newRate = new Random().nextDouble(); hourlyRate.updateCurrentRate(newRate); assertEquals(newRate, hourlyRate.rateAt(LocalDate.now().plusWeeks(3)), DELTA_VALUE); }