Unit Testing with NUnit


Jump to: navigation, search
Visual C# Tutorials
Visual Studio .NET Tutorials

Unit Testing with NUnit

© 2004 O'Reilly & Assoc., Inc.
This article—Unit Testing with NUnit—is from NUnit Pocket Reference, by Bill Hamilton. Copyright © 2004 O'Reilly & Associates. All rights reserved. Reproduced by permission. This article has been edited especially for C# Online.NET.


Unit Testing with NUnit

This section discusses the different elements of the NUnit framework and how to use them to create unit tests and test structures. Figure 2 shows the relationship between the NUnit elements.

Image:NUPRfig-2.jpg
Figure 2. NUnit test elements

In the simplest case, NUnit requires only test cases and one or more test fixtures. Each test must contain at least one assertion. A description of these elements follows.


Previous_Page_.gif Next_Page_.gif

Share this page
  • del.icio.us
  • Facebook
  • Google+
  • StumbleUpon