Updated templates for xUnit.net in ASP.NET MVC RTM
Sunday, 3 May 2009 by alexandrulEnvironment:
- Visual Studio 2008 Pro
- xUnit.net v1.5 (build 1.5.0.1479)
xUnit.net has very few tests by default, so I have adapted the standard Visual Studio tests generated for ASP.NET MVC web applications. This resulted in two files: AccountControllerTests.cs and HomeControllerTests.cs (the last one is similar with HomeControllerFacts.cs)
The xUnit.net template for ASP.NET MVC unit testing can be found on the following location:
%VS2008%\Common7\IDE\ProjectTemplates\CSharp\Test\XunitMvcTestProjectTemplate.cs.zip
After unpacking the content of the template to a temp folder, we must place the new files in the Controllers folder, and update the content of MvcTemplate.csproj and MyTemplate.vstemplate:
[Read More…]

