[Fix] Fixed broken test
This commit is contained in:
parent
2697f5947c
commit
2269ffdd81
|
@ -74,7 +74,7 @@ public class PeriodHelperTest {
|
||||||
PeriodDuration periodDuration = PeriodDuration.parse("P1M");
|
PeriodDuration periodDuration = PeriodDuration.parse("P1M");
|
||||||
ZonedDateTime shiftedDate = shiftByMultipleOfPeriod(past, now, periodDuration);
|
ZonedDateTime shiftedDate = shiftByMultipleOfPeriod(past, now, periodDuration);
|
||||||
|
|
||||||
assertTrue(shiftedDate.isAfter(now.minusDays(29)));
|
assertTrue(shiftedDate.isAfter(now.minusDays(10)));
|
||||||
assertTrue(shiftedDate.isBefore(now));
|
assertTrue(shiftedDate.isBefore(now));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -86,9 +86,11 @@ public class PeriodHelperTest {
|
||||||
PeriodDuration periodDuration = PeriodDuration.parse("P1M");
|
PeriodDuration periodDuration = PeriodDuration.parse("P1M");
|
||||||
ZonedDateTime shiftedDate = shiftByMultipleOfPeriod(past, now, periodDuration);
|
ZonedDateTime shiftedDate = shiftByMultipleOfPeriod(past, now, periodDuration);
|
||||||
|
|
||||||
// since P1M ist = 28 days, we have a rather inexact match, but it must certainly be before now() - P1M
|
// since P1M ist = 30 days, we have a rather inexact match, but it must certainly be
|
||||||
assertTrue(shiftedDate.isAfter(now.minusDays(56)));
|
// after now() - P1M + 5
|
||||||
assertTrue(shiftedDate.isBefore(now.minusDays(28)));
|
// before now()
|
||||||
|
assertTrue(shiftedDate.isAfter(now.minusDays(35)));
|
||||||
|
assertTrue(shiftedDate.isBefore(now));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
Loading…
Reference in New Issue