单元测试介绍
希望能不落熟套,在这里记录单元测试使用中的一些技巧
1.刚从英文博客上摘录下来的一个单元测试的小技巧,用于测试单个方法
Now, I haven't played with Testdriven.net yet; but I have CTRL + ALT + R as a shortcut to test "this one". Works like a charm ;-)
MbUnit 是稳定版本是2.4,一个国外作者开发了这个版本和ReSharp4的集成插件,你可以在这里找到( 还是这个2.4版本的好,那个3.x的版本由于捆绑了Gallio测试一个方法的速度让人受不了,我现在又改用这个版本 ) http://code.google.com/p/mbunit-resharper/ ,MbUnit的文档非常丰富,相信你可以非常快的入门,你可以查看它在线的文档中心 http://docs.mbunit.com/
MbUnit的最新版本是v3 alpha 2,它捆绑了一个Gallio alpha 2的测试平台。在此 http://www.gallio.org/ ,你可以找到Gallio的详细信息,下面是官网的一段原话,希望对你认识Gallio有帮助
At present Gallio can run tests from MbUnit versions 2 and 3, MSTest , NBehave , NUnit , and xUnit.Net . Gallio provides tool support and integration with CCNet , MSBuild , NAnt , NCover , Pex , Powershell , Resharper , TestDriven.Net , TypeMock , and Visual Studio Team System .
下载了TestDriven.net 2.14的最新版本,提供了对Gallio的支持