I use a custom version of AutoMockingContainer based on the class used in this blog. The standard approach does not work for object that depends on some interface in the constructor, but actually uses that interface in the constructor and you need to set expectation on it. Basically you need a way to intercept the [...]
Continue reading about AutoMockingContainer and mock used in the constructor
One of the reason why people do not write tests, is that some code is difficult to test, and one of the main reason for this difficulty is coupling. The obvious solution is to write loosely coupled code from the beginning, but if you are working with legacy code this option is not applicable. The [...]





