|
TotT: Using Dependancy Injection to Avoid Singletons |
<<It's hard to test code that uses singletons. Typically, the code you want to test is coupled strongly with the singleton instance. You can't control the creation of the singleton object because often it is created in a static initializer or static method. As a result, you also can't mock out...>> (more...) |