In case you missed it, about a month ago the Visual Studio team announced an emulator for SharePoint classes which is basically a way for you to do unit testing leveraging Microsoft’s mocking and testing frameworks (or someone else’s). What happens is you wrap up your test code in a SharePointEmulationScope and that will keep the SharePoint objects from running calling a live SharePoint instance. One nice aspect is they are extendable so they don’t do everything you want, just have at the tweaking yourself!
The blog post mentions they are only available for SharePoint 2010 & when you are using Visual Studio 2012… no word on if they are supported with SharePoint 2013 yet.
There’s a bit of irony here… can’t you see it? Finally we get something we’ve wanted for a very long time (I’ve heard this request going all the way back to the SharePoint 2007 release). The funny part is we finally get this right when Microsoft starts telling us to no longer write code using their SharePoint server side object model. Nice timingcomments powered by Disqus