eXparity / hamcrest-date

A Java library which provides a suite hamcrest matchers for matching dates, times, and moments in time
BSD 3-Clause "New" or "Revised" License
70 stars 11 forks source link

Rewrite wrapper types to use downcasting approach and cleanup duplica… #29

Closed stewbis closed 5 years ago

stewbis commented 5 years ago

Wrapper code has become muddle with multiple inline transformations with inconsistent behavior. This change throws it all away and replaces it with a consistent approach whereby there are

All matchers apply a "down-casting" approach whereby the actual type is cast to the expected type before comparing. Invalid down-casts i.e. up-casts of say LocalDate to LocalDateTime are not supported because it leads to dubious tests whereby missing information such as time needs to be made up

coveralls commented 5 years ago

Coverage Status

Coverage increased (+0.6%) to 88.262% when pulling 8d83580a0df4d9613248dbad04531f3e1e1dfa17 on rewrite_wrappers into 703234df829c7ed4d66d0e38ca2aea5c7939af0a on master.