SharePoint 2010 Unit testing with pex and moles @ Community Day (Mechelen)

SharePoint Services are known to be challenging to unit test, as it is not possible to execute the SharePoint Service without being connected to a live SharePoint site. For that reason, most of the tests written for SharePoint are actually integration tests as they need a live system to run. In order to properly unit test Sharepoint Services, we should be able to stub the dependencies out with a mocking framework, but even though the SharePoint objects in 2010 are no longer sealed, the constructors are still not public, which makes most mocking frameworks unusable. Pex contains a stubbing framework, called Moles that allows you to isolate, not only types in the SharePoint assemblies, but any assembly you want and detour any .NET method to your own delegates. Pex truly allows you to unit test Sharepoint Services.

See you there!

VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)