ScheduleConfigTest: Extend tests for schedule interval
Test that start time works as expected when the interval is specified with "hour", "day" and "week" in addition to "h", "d" and "w". Change-Id: If09324b1f32fd5858362afe0762c6f9b4247ff1e
This commit is contained in:
parent
6159adddeb
commit
d7a91bc30e
@ -40,15 +40,18 @@ public class ScheduleConfigTest {
|
||||
@Test
|
||||
public void initialDelay() throws Exception {
|
||||
assertThat(initialDelay("11:00", "1h")).isEqualTo(ms(1, HOURS));
|
||||
assertThat(initialDelay("11:00", "1 hour")).isEqualTo(ms(1, HOURS));
|
||||
assertThat(initialDelay("05:30", "1h")).isEqualTo(ms(30, MINUTES));
|
||||
assertThat(initialDelay("09:30", "1h")).isEqualTo(ms(30, MINUTES));
|
||||
assertThat(initialDelay("13:30", "1h")).isEqualTo(ms(30, MINUTES));
|
||||
assertThat(initialDelay("13:59", "1h")).isEqualTo(ms(59, MINUTES));
|
||||
|
||||
assertThat(initialDelay("11:00", "1d")).isEqualTo(ms(1, HOURS));
|
||||
assertThat(initialDelay("11:00", "1 day")).isEqualTo(ms(1, HOURS));
|
||||
assertThat(initialDelay("05:30", "1d")).isEqualTo(ms(19, HOURS) + ms(30, MINUTES));
|
||||
|
||||
assertThat(initialDelay("11:00", "1w")).isEqualTo(ms(1, HOURS));
|
||||
assertThat(initialDelay("11:00", "1 week")).isEqualTo(ms(1, HOURS));
|
||||
assertThat(initialDelay("05:30", "1w")).isEqualTo(ms(7, DAYS) - ms(4, HOURS) - ms(30, MINUTES));
|
||||
|
||||
assertThat(initialDelay("Mon 11:00", "1w")).isEqualTo(ms(3, DAYS) + ms(1, HOURS));
|
||||
|
Loading…
x
Reference in New Issue
Block a user