Monthly Archives: June 2016

How to compare Java objects in tests

If you followed my blog or looked at any of my projects, you probably noticed that I am a big fan of Shazamcrest. I have introduced this library in every project I worked on, whether it’s personal or at work. Recently I came across AssertJ‘s isEqualToComparingFieldByField(...) which tries to achieve something similar. All of these frameworks have certain problems that I would like to show you. I would also like to show you how easy it is to implement a good assertion method yourself.

Read the rest of this entry