These two gave me very good perspectives and tools to up my unit testing game.
While the core lessons have been written about several times, I think the most important lessons are
1. Unit tests must be easy to write, read and maintain.
2. While the first test might take a while to write, the subsequent ones should take very minimal time.
3. Most important of all. The unit test must be self contained. So setting up the data (for the dependent object calls), running the code under test and verifying should be in the same unit test.
While the core lessons have been written about several times, I think the most important lessons are
1. Unit tests must be easy to write, read and maintain.
2. While the first test might take a while to write, the subsequent ones should take very minimal time.
3. Most important of all. The unit test must be self contained. So setting up the data (for the dependent object calls), running the code under test and verifying should be in the same unit test.
