© Adam Freeman 2016

ADAM FREEMAN, Pro ASP.NET Core MVC , 10.1007/978-1-4842-0397-2_7

7. Unit Testing MVC Applications

Adam Freeman

(1)Milton Keynes MK6 3PA, UK

In this chapter, I demonstrate how to unit test MVC applications. Unit testing is a form of testing in which individual components are isolated from the rest of the application so their behavior can be thoroughly validated. ASP.NET Core MVC has been designed to make it easy to create unit tests, and Visual Studio provides support for a wide range of unit testing frameworks. I show you how to set up a unit test project, explain how to install one of the most popular testing frameworks, and describe the process for writing and running tests. Table 7-1 summarizes the chapter.

Table 7-1. Chapter ...

Get Pro ASP.NET Core MVC, Sixth Edition 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.