views:

145

answers:

1

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 project for an ASP.NET MVC web application?

A: 
  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.

Todd Smith
Thanks. After a bit more research I think I'll use Nunit as it now contains the row test features I was after and can be integrated with VWD easily to allow the auto creation of a test project at the same time as an ASP.NET MVC project is created.
James