A good article to read about ways to update your code to make it more testable
It is about ways to change your coding so that your code is more testable but it is also a good reminder about good design. I really liked the article, nice work Justin.
- Use Interfaces
- Define a base test class
- As much as feasible, make everything return a value
- Separate data access from business logic
- Make use of configuration
- Make Your Classes Do Only One Thing
- Have Domain Object Factories
- Think carefully about packaging, assemblies and namespaces
- Pick a logging strategy early
Did I miss one or it is just 9 and not 10 like in the title of the article: 10 Ways to Make Your Code More Testable.