Should I never use static methods and classes and singletons when following the Test Driven Development paradigm
I've been reading that static methods, static classes, and singletons are evil when you try to implement unit testing in your project. When following the TDD paradigm, should I just forget that they ever existed and never use them again or is it ok to use them sometimes? Phil Sandler Never say never--static classes and methods have their place in your toolbox. That said, if the class you are trying to isolate and test (subject under test or SUT) depends on a static class or method, you will be unable to write a test that isolates the SUT from that static dependency--when your test code runs it