Skip to Content
Beginning ASP.NET MVC 1.0
book

Beginning ASP.NET MVC 1.0

by Simone Chiaretta, Keyvan Nayyeri
August 2009
Beginner to intermediate content levelBeginner to intermediate
575 pages
13h 16m
English
Wrox
Content preview from Beginning ASP.NET MVC 1.0

Chapter 8. Unit Testing Concepts

One of the main differences between the ASP.NET MVC framework and the classic WebForm paradigm is that the first has been designed and implemented with testability in mind. Adopting the MVC pattern is a big step toward testability, but it's not enough; the MVC framework includes a lot of other features and requires API design decisions to make sure that it will support any kind of unit testing.

In Chapter 9 you learn how to test a Web application developed with the ASP.NET MVC framework and what all these test-facilitating features are. To help you fully understand them, this chapter covers the basic concepts of unit testing.

In this chapter you learn:

  • What unit testing is and why it is important

  • How to write tests

  • What patterns enable unit testing in complex applications

What Is Unit Testing?

Unit testing is a vast topic and probably even a whole book would not be enough to cover all the aspects of this important practice. In this section, you learn the basic concepts and why you should start testing your applications right now.

Unit testing is a practice used in software development to verify that individual units of code are working the way they were originally supposed to. What a unit is depends on the kind of programming language you are using, but in object-oriented programming, the smallest testable unit is a method.

The main reason why you might want to use a unit test to validate that a single piece of your source code is working properly is that ...

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.
Start your free trial

You might also like

Beginning ASP.NET MVC 4

Beginning ASP.NET MVC 4

José Rolando Guay Paz
Programming ASP.NET MVC 4

Programming ASP.NET MVC 4

Jess Chadwick, Todd Snyder, Hrusikesh Panda
Professional ASP.NET MVC 2

Professional ASP.NET MVC 2

Jon Galloway, Phil Haack, Scott Hanselman, Scott Guthrie, Rob Conery

Publisher Resources

ISBN: 9780470433997Purchase book