Further reading
- Getting Green on Red
An article by Jeff Langr describing eight different ways a test can pass for the wrong reasons. If we’re aware of these issues, we can avoid them as we work.
https://medium.com/pragmatic-programmers/3-5-getting-green-on-red-d189240b1c87
- Refactoring: Improving the design of existing code, Martin Fowler (ISBN 978-0134757599)
The definitive guide to refactoring code. The book describes step-by-step transformations of code that preserve its behavior but improve clarity. Interestingly, most transformations come in pairs, such as the pair of techniques known as Extract Method and Inline Method. This reflects the trade-offs involved.
- AssertJ documentation for custom matchers
This chapter briefly mentioned AssertJ custom matchers. These are very useful ways of creating reusable customized assertions for your code. These assertion classes are themselves unit-testable and can be written using test-first...