Appendix A. NUnit Primer

In Chapter 1, we discussed the need for a framework to support the development, management, and execution of automated programmer tests. In this appendix, we introduce NUnit, which is a testing framework for all Microsoft .NET programming languages. Initially ported from JUnit, the current version (2.1.4) is written entirely in C# and has been completely redesigned to take advantage of many .NET language features—for example, custom attributes and other reflection-related capabilities.

To demonstrate NUnit’s capabilities, we will start with a very simple example: adding two integer numbers.

NUnit Quick Start

The initial step, if you have not taken it already, is to download NUnit from www.nunit.org. The file, NUnit.msi, is ...

Get Test-Driven Development in Microsoft® .NET 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.