@Test
public void testDateMatchers() throws ParseException {
Date a = DateFormatUtils.ISO_DATETIME_FORMAT.parse("2016-02-10T09:00:00");
Date b = DateFormatUtils.ISO_DATETIME_FORMAT.parse("2016-02-10T11:00:00");
Assert.assertThat(b, DateMatchers.before(a));
}
results in the following message:
Expected: the date is after Mi, 10 Feb 2016 09:00:00.000
but: date is Mi, 10 Feb 2016 11:00:00.000
The following assertion:
results in the following message:
It should probably read is before
Running java version 1.8.0_92 hamcrest-date 2.0.2