- Tags:: 📚Books , Coding best practices, TDD
- Author:: Michael C. Feathers
- Liked:: 6
- Link:: Working Effectively with Legacy Code [Book]
- Source date:: 2004-09-22
- Finished date:: 2017-01-01
- Cover::
Why did I want to read it?
I first picked up this book when I started to work on Braintec, to deal with a large legacy project in Odoo.
What did I get out of it?
What Is Unit Testing?
In the industry, people often go back and forth about whether particular tests are unit tests. Is a test really a unit test if it uses another production class? I go back to the two qualities: Does the test run fast? Can it help us localize errors quickly? (p. 13)
A test is not a unit test if:
- It talks to a database.
- It communicates across a network.
- It touches the file system.
- You have to do special things to your environment (such as editing configuration files) to run it. (p. 14)