HTML5 Canvas
Written by: Simon Sarris
Featured Refcardz: Top Refcardz:
  1. Apache Hadoop
  2. Web Driver
  3. MVVM
  4. REST
  5. ADO.NET
  1. HTML5
  2. Ajax
  3. jQuery Selectors
  4. CSS Part 1
  5. Git

Link Details

Link 81461 thumbnail
User 111696 avatar

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.
  • 11
  • 2
  • 1784
  • 0

Comments

Add your comment
User 204573 avatar

Gene Gotimer replied ago:

0 votes Vote down Vote up Reply

Needs more explanation, as the comments there point out.

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.