应用教程
http://www.cnblogs.com/shcity/archive/2007/02/09/645920.html
我没用过NUnit,但后来一找工作的时候,居然有公司以这个做为招聘条件之一.
当时我马上汗,感觉自己落伍了.于是找了NUnit来看了一下.
终于一块石头落地了,所谓的NUnit,原来是这样.
1
using System;
2
using NUnit.Framework;
3
4
namespace NUnitQuickStart
5
{
6
[TestFixture]
7
public class NumersFixture
8
{
9
[Test]
10
public void AddTwoNumbers()
11
{
12
int a=1;
13
int b=2;
14
int sum=a+b;
15
Assert.AreEqual(sum,3);
16
}
17
}
18
}
19

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

它实际上是让单元具备基本的,合理的存在性的测试.