O'Reilly logo

ASP.NET MVC 1.0 Quickly by Maarten Balliauw

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 9. Testing an Application

One of the differences between ASP.NET MVC and ASP.NET Webforms is that the ASP.NET MVC framework is easier to test than the ASP.NET Webforms framework. This is because of the fact that ASP.NET MVC has been designed with testability in mind. But even with every feature of ASP.NET MVC designed with testability in mind, there are certain aspects of classic ASP.NET that are difficult to use in tests. For example, each object in the HttpContext is populated by the ASP.NET runtime: Request, Response, User, Cookies, Session, and so on. Because unit testing an ASP.NET MVC application is possible, it should also be possible to unit test controller actions without requiring the ASP.NET runtime to be active. Fortunately, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required