At <...>, we practice Test Driven Development. We expect you to write a test before you start working on a piece of functionality. We want at least one test for every small piece of functionality that you write.
- Do not write tests for functions or methods, write tests for functionality
- In a unit test you should be testing one unit of functionality, not a class or function. If you need 3 classes or functions to write a meaningful test for the functionality, then that's your unit.
- Use the lowest class of test you can, and the highest you have to: Unit → Integration → E2E. High test classes (for example E2E) help you test functionality instead of writing coverage tests. (high mock count, duplicated implementation, has to be adapted every time you change the functionality)