Closed Proximator closed 11 years ago
Rather than a flag to pass in, I'd go with sameOrAfter(date) and sameOrBefore(date) - achieves the same aim but without the flag
What about higherThan and lowerThan for strictly after and before ? higher and lower are used in NavigableMap in that sense.
After and before are obvious in their meaning when it comes to date, higher and lower don't really fit with a date test suite.I'll go with sameOrBefore(date) and sameOrAfter(date) because it follows the same expression patterns as the other same* tests.
assertThat(dateUnderTest, sameOrBefore(referenceDate)); assertThat(dateUnderTest, sameOrAfter(referenceDate));
Hi, this has been added in release 0.9.4. Regards, Stewbis
Does assertThat(date1, before(date2)) fails if date1 = date2 ? Probably, it is better to have an other method with a boolean like : after(Date : date, boolean inclusive) to have a behaviour similar to less or equals Samething for before. Any thoughts ?