This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I'm wondering; are there pre-made matchers in jUnit or hamcrest (or other libs) that allow to do an assertEquals while ignoring a Date or Timestamp object within the matched object?
I can't find any and it is hard to believe that people would not want to use such matchers...
After thinking about this more and talking with my smarter co-worker, I realized that this isn't a junit problem, it is a problem with how you implemented equals on your value object. If you want two objects to be equal in spite of the date, then the equals (and hashcode) method must be overridden.