I spent some quality time this week driving a design implemented in .NET using unit tests. It was an enlightening experience and gave me a good glimpse at the quality of the BCL design. I'm not impressed. We had issues trying to mock System.Net.WebRequest and System.Net.WebResponse and its decendents. It seems that Microsoft prefers to expose abstract base classes, instead of using interfaces for this. The aforementioned types are not interface types; they're abstract classes. We've been using MoQ, a fine mocking framework, at the client I've been working at and I tried to create mock implementations of the System.Net.WebRequest and System.Net.WebResponse types. No go--these types do not have public constructors. The non-virtual, non-abstract methods also give MoQ headaches (good write up here about why methods of these abstract class types have to be explicitly decorated with virtual if you want to mock them). Personally, I'm more fond of exposing interface types, thus alleviating the problem all together. Very frustrating. We did continue to unit test and utilized mocks for this, but it forced us to wrap these BCL types with our own types where we could control the virtual decoration. Yuck!!