NUnit下载

http://www.nunit.org/index.php?p=download
应用教程
http://www.cnblogs.com/shcity/archive/2007/02/09/645920.html


      我没用过NUnit,但后来一找工作的时候,居然有公司以这个做为招聘条件之一.
当时我马上汗,感觉自己落伍了.于是找了NUnit来看了一下.
      终于一块石头落地了,所谓的NUnit,原来是这样.
     
     
 1using System; 
 2using NUnit.Framework; 
 3  
 4namespace 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



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

原文地址:https://www.cnblogs.com/niuniu502/p/685093.html