Hamcrest is a framework for writing matcher objects allowing ‘match’ rules to be defined declaratively. There are a number of situations where matchers are invaluable, such as UI validation or data filtering, but it is in the area of writing flexible tests that matchers are most commonly used. This tutorial shows you how to use Hamcrest for unit testing.
- Official website
http://hamcrest.org/JavaHamcrest/
- On github
https://github.com/hamcrest/JavaHamcrest