DotNet下NUnit的使用(1)—- NUnit入门
- 什么是Nunit
NUnit 是一个单元测试框架,可以用于所有的.Net语言,与JUnit类似,可以用来很方便的进行单元测试,NUnit是完全用C#语言编写而成,使用NUnit,您可以只需在您的代码上加上简单的’Attribute’就可以进行单元测试,目前NUnit的最新稳定版本是 2.4.8 (下载 ), 下面是来自就NUnit官方的介绍:
NUnit is a unit-testing framework for all .Net languages. Initially ported from JUnit, the current production release, version 2.4, is the fifth major release of this xUnit based unit testing tool for Microsoft .NET. It 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. NUnit brings xUnit to all .NET languages.
- 准备工作
1. 下载NUnit (最新稳定版本 2.4.8)
2. 安装NUnit
实际上,我们需要NUnit的几个核心文件(nunit.framework.dll, nunit.core.dll, nunit.fixtures.dll)就可以了,当然,为了能够使用NUnit运行unit-tests, 建议完全安装。

我来说两句