Its great to see today that the Visual Studio team have launched the SharePoint Emulators add-on for Visual Studio 2012 that works with SharePoint 2010 server-side .NET object model. I was lucky enough to get an early glimpse of this stuff when I was in Redmond for the Build conference and am really impressed with what they’ve managed to do.
Joshua Weber does a great job of explaining the benefits of this for Unit Testing SharePoint server-side .NET code in SharePoint 2010. To date it’s involved a lot of PEX/Moles or TypeMock Isolator type approaches. This approach in my opinion is a lot cleaner and a lot more extensible for your own projects.
The good news its available right now via a NuGet package so download it and give it a whirl. Yes it’s only available in Visual Studio Ultimate, which I think will hurt some development teams who don’t have this.
The framework leverages the Fakes (no not Thakes ) aspects of the Visual Studio 2012 suite and .NET Framework. Essentially they’ve coded an implementation of some of the major Microsoft.SharePoint.* dll’s and whatever is missing you can in fact actually extend yourself. The team are encourage the community to help to build out the missing shims to help with adoption of this tool.
There was a Build session on this which is available to download also here http://channel9.msdn.com/Events/Build/2012/3-015
Love to hear feedback from community on this one. I for one will be evaluating this in our internal testing here at AvePoint against our existing unit testing approaches.