Automocking container with Moq
I realized that I never blogged about this cool feature contributed by Slava to Moq-Contrib.
Auto-mocking containers was an idea originally (IIRC) from the guys at Eleutian, later on picked up by Jeremy Miller with Rhino Mocks and StructureMap.
The
wiki document Slava put together on Automocking
is a fantastic overview. Basically, you can have an (Autofac-powered) container create your objects under test with all
its dependencies injected as mocks:...