By bloid
via googletesting.blogspot.com
Published: May 19 2008 / 10:16
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 the behavior of that Singleton instance.



Comments
Gene Gotimer replied ago:
Needs more explanation, as the comments there point out.
Voters For This Link (11)
Voters Against This Link (2)