Gao's blog
Home
Tags
Language
English
Spanish
Chinese
Testable Design
Author: Gao
January 24, 2021
Tags:
Testable Design
Guidelines for Testable Design
Testability issues
Can’t instantiate a class
Can’t substitute a collaborator
Avoid complex private methods
Avoid final methods
Avoid static methods
Use new with care
Avoid logic in constructors
Avoid the Singleton
Favor composition over inheritance
Wrap external libraries
Reference