When it comes to mocking objects for SharePoint, you now have a few options available to you:
- Microsoft Moles
- TypeMock Isolator
- Telerik JustMock
This free isolation framework from Microsoft was first introduced shortly after the release of Visual Studio 2010 as an add-in/extension to assist developers in creating their Unit Tests. One of the unusual characteristics of this mocking library was its ability to mock SharePoint objects amongst other various pieces of functionality. Unfortunately, however, this isolation library is no longer being actively developed with the release of Visual Studio 2012. The replacement to it will be called "Fakes" and is currently targeted to only ship with Visual Studio 2012 Ultimate Edition.
This framework has long been known for its ability to mock SharePoint objects, however, its relatively high price tag ($799) has dissuaded many SharePoint developers looking for cheaper alternatives. Even though TypeMock Isolator offers a licensed version of Isolator for SharePoint at a significantly cheaper price ($249/yr), it requires developers to then adopt additional mocking libraries as part of their Unit Testing Development Strategy to support the features not available in the Isolator for SharePoint mocking library.
Telerik JustMock is a relatively new contender in the playing field for mocking libraries for SharePoint. JustMock also offers a free version called JustMock Lite which offers many of the same features as the licensed version that may be suitable for smaller development shops. It is a particularly appealing alternative to TypeMock Isolator because of its much smaller price tag (currently only $399) as well as its backing from a company such as Telerik which makes an impressive suite of other tools such as Telerik RadControls and Telerik JustDecompile. For development shops that have already been using Telerik development tools, JustMock is already bundled with the Premium and DevCraft Ultimate development suites.