Mocking TFS objects…The TFS Adapters Project on Codeplex

TFSAdapter

I just received an email from Martin Danner, Team System MVP, announcing a new project on  Codeplex ( Team Foundation Adapters ) that implements Interfaces and Adapters for the TFS API objects.  Why is this important?  Because being able to mock dependencies is a core tenet of unit testing.  This project allows us to create robust Unit Tests for apps that extend the TFS system.  Here’s the crux of the announcement:

Team Foundation Adapters make it easier to do proper unit testing of applications that utilize the Team Foundation Server SDK , by providing a simple mechanism for mocking the commonly used sealed classes in the API, which cannot otherwise be mocked.

This is not vaporware folks. This project contains a working implementation, complete with sample unit tests. The project does not cover the entire Team Foundation API just yet, But it establishes a clearly defined baseline that will grow as needed.

Please have a look at the project and let me know what you think of this approach. If you like it, be sure to tell your friends about it. “                                   – Martin Danner