The Auto Mocking Container
Several months ago the guys from Eleutian released the Auto Mocking Container, a combination of Rhino Mocks and Windsor container. I looked at it at the time, and I liked it, but I didn't really get a chance to work with it until recently.
You can see how a non trivial controller may look like on the left. It has a fair number of collaborators, for data access, logging, notifications, etc.
This approach make building the controller very easy:
The controller is merely coordinating the work of services in the application, which is what I think it should do. But how do I test such a thing? Setting up seven collaborators per tests is a PITA, and it gets worse if you consider additional dependencies that may be required by the base class.
Enter the Auto Mocking Container, which makes all of this a real pleasure, check this out:
There are a lot of interesting options on the Auto Mocking Container that I suggest that you will check out. I really like it.