Geeks With Blogs
Swiss Coder .net and stuff...

Global state (and singletons) is a big problem for testing because the global state cannot be controlled by the tests.

Dependency injection enforces the order of initialization at compile time. No magic behind the scene, that singletons get initialized and method talk to each other without the programmer knowing it. Posted on Wednesday, July 17, 2013 9:36 PM unit testing , tdd , Unit Test , dependency injection , clean code | Back to top

Comments on this post: Clean code talks by Misko Hevery - Part 4: Global State and Singletons

No comments posted yet.
Your comment:
 (will show your gravatar)

Copyright © huwyss | Powered by: | Join free