Creating a Test Project

Your developer test must exist inside a test project. This is a project that has the right references to the unit testing framework and the configuration required to be run via the test tool built inside of Visual Studio. There are two primary ways you can initiate the creation of a unit test project. You can create a test project from within the IDE, or you can automatically generate unit tests into a new test project for existing code. We start with the first option.

The Test Project Template

You create a new test project in Visual Studio through the New Project dialog box (File, New, Project). Inside this dialog box you navigate to the Test Projects node in the Installed Templates tree. Figure 9.1 shows an example. ...

Get Microsoft® Visual Studio® 2010 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.