Roy Osherove

View Original

[Article] Issues in breaking dependencies for unit testing

One of the most important issues I've come to realize is the various ways of dealing with legacy code, mainly - how to deal with breaking multiple dependencies on an existing class or method that needs to be tested.

There are two basic ways to break dependencies, with various "dialects"  for each one. They both have their pros and cons and I won't explain in detail how to do them, but mainly, which of them you should choose and when.

 

Go read Issues in breaking dependencies for unit testing