-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Description
Current behavior when calling sameInstant with a null date is NullPointerException:
java.lang.NullPointerException
at org.exparity.hamcrest.date.core.wrapper.DateWrapper.<init>(DateWrapper.java:30)
at org.exparity.hamcrest.date.DateMatchers.sameInstant(DateMatchers.java:557)
It'd be nice if the matcher constructor did not have that exception, and would just return false on the matchesSafely call. That would allow a composite match like this:
assertThat(date, either(sameInstant(otherDate)).or(allOf(nullValue(), is(otherDate))));
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels