开发者

Setting up MbUnit for ASP.NET MVC

开发者 https://www.devze.com 2022-12-18 06:09 出处:网络
I am using Visual Web Developer 2008 Express with ASP.NET MVC 1.0. I would like to use MbUnit as a test framework so how would I set this up as a unit test projec开发者_如何学运维t for an ASP.NET MVC

I am using Visual Web Developer 2008 Express with ASP.NET MVC 1.0.

I would like to use MbUnit as a test framework so how would I set this up as a unit test projec开发者_如何学运维t for an ASP.NET MVC web application?


  1. File -> New -> Project -> Windows -> Class Library
  2. Add a reference to MbUnit.dll (or whatever the name of their library is)
  3. Add a reference to your ASP.NET MVC project
  4. Add a new class file and your test code

The only problem you'll run into now is running the tests. For that you might try something like TestDriven.net or ReSharper.

FYI The latest nUnit includes the features that MbUnit set out to add to unit testing. nUnit also has better integration with VS and various add-ons I believe.

0

精彩评论

暂无评论...
验证码 换一张
取 消