Closed barracuda317 closed 4 years ago
Hi, that's just a bug with the latest version. If you'd like to raise a PR to fix then please do - if not I can fix the bug. The newer versions only added support for Java 8 data types; if you don't need support for these dates you can stay on version 1.10.
Hi, don;t worry about a PR - I'll code a fix up and cut a new release. The option to go back to version 1.1.0 is still open though if you don't need support for Java 8 dates
java.sql.Date is now supported via the DateMatchers and also have their own specialized matchers in SqlDateMatchers e.g.
assertThat(new java.sql.Date(), SqlDateMatchers.isMonday())
In DateWrapper you are using toInstant, but toInstant throws an UnsupportedOperationException if Date is a instance of java.sql.Date.
I was using an old version of hamcrest-date (1.1.0) and that was not a problem.
Is there a way to circumvent the toInstant-call for java.sql.Date?