Chapter 1. NUnit Pocket Reference

Introduction

I was inspired to write NUnit Pocket Reference because I was frustrated with the lack of documentation for NUnit—an excellent, indispensable tool for unit testing software. My aim was to write a book that my colleagues and I would find useful—a short, concise reference for installing, using, and extending NUnit.

Unit testing software started with xUnit—a testing framework developed by Kent Beck and Erich Gamma to test SmallTalk code. Test frameworks now exist for most programming languages—for example, JUnit for Java, CppUnit for C++, and NUnit for .NET.

NUnit is a port from JUnit. NUnit is similar to JUnit but is for the .NET Framework development. Unlike JUnit, NUnit is language independent, and can be used to test C#, VB.NET, and J# programs as well as most other programs developed using the .NET Framework. You can write a test in a different language from the code being tested and use NUnit to test projects that use multiple languages.

NUnit Version 2.2 supports Microsoft .NET Framework Versions 1.0 and 1.1, and Mono—an open source version of the Microsoft .NET development platform that runs on Unix, Windows, and Mac OS X. This book has been written with the .NET Framework version in mind; however, most of the information applies equally to the Mono version. For details about Mono, see http://www.mono-project.com/.

The examples in this book are written in C#, but NUnit can be used with any .NET language—I just happen to prefer C#. Regardless ...

Get NUnit Pocket Reference 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.