Closed Proximator closed 11 years ago
In this instance I think the existing assertThat(date, before(new Date())) is fine and IMHO reads cleaner than assertThat(date, beforeToday()), Part of the library could provide static factories for commonly used date constructs e.g Dates.today(), Dates.tomorow(), etc. This would allow assertThat(date, before(today()));
Added Moments static factory to allow syntax of:
assertThat(date, DateMatchers.before(Moments.today()));
Hi stewbis,
I think it would be useful to have a matchers based on the current date (CurrentDateMatchers) containing for example beforeCurrentDate // assertThat(date1, beforeCurrentDate() ) means date1 is before new Date() beforeCurrentHour beforeCurrentMinute...etc beforeCurrentTime afterCurrentDate afterCurrentHour...etc
What do you think ?
Regards