July 5, 2009 20:17
This post is a walk-through for using Stubs, an interesting approach to mocking from Microsoft Research.
Typically, while mocking something you set up expectations via expression trees or string based APIs. The framework would then, at runtime, dynamically generate the code you need.
Stubs guys took a different route: they generate the code statically. Right click on the method you want to test, click a button and a separate project with the stubs you need gets created. Just go and use them.