摘要: 目前nunit的老版本不支持.net framework 4.0程序的测试。运行4.0程序集需要下载nunit的新版本http://www.nunit.org/ 目前我使用的版本是nunit 2.5.5,但是发现下断点了以后不能调试。于是gogole了一下,发现这篇文章http://frater.wordpress.com/2010/05/04/debugging-nunit-tests-under-visual-studio-2010/ 其中,有两个配置nunit.exe.config 步骤: 1. 在 <configuration> 下 加...<startup>& 阅读全文
posted @ 2012-02-04 12:22 不要理我 阅读(488) 评论(0) 推荐(0) 编辑
摘要: 1.环境搭建从http://www.nunit.org/index.php?p=download处下载windows版本的安装文件(.msi)。安装后,安装目录下有C:\ProgramFiles\NUnit2.6\bin\framework\nunit.framework.dll在项目中引用。2.断言2.1AreEqualsAssert.AreEquals(期望值,实际值)比较内容是否相等(非引用)2.2IsNullAssert.IsNull(object)验证是否为空2.3AreSameAssert.AreSame(期望值,实际值)比较引用是否相同(即对象是否相同)2.4IsTrueIsFa 阅读全文
posted @ 2012-02-04 11:36 不要理我 阅读(1330) 评论(0) 推荐(2) 编辑