Professional ASP.NET MVC 4
by Jon Galloway, Phil Haack, Brad Wilson, K. Scott Allen, Scott Hanselman
Creating a Unit Test Project
The MS Test unit-testing framework is included with all paid editions of Visual Studio 2010 (it is not included in Visual Web Developer Express 2010); if you're using Visual Studio 2012, unit testing is even included in the free editions and contains a much-improved unit test runner. Although you can create unit test projects directly inside of Visual Studio, it can be a lot of work getting started with unit testing your MVC application. The ASP.NET MVC team included unit-testing capability in the New Project dialog for MVC applications, as shown in Figure 13.1.
By selecting the Create a Unit Test Project checkbox, you're telling the ASP.NET MVC New Project Wizard not only to create an associated unit test project, but also to populate it with a set of default unit tests. These default unit tests can help new users understand how to write tests against an MVC application.
Examining the Default Unit Tests ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access