This extension finally makes getting NUnit test templates into your MVC3 applications easy; something which has always been a major point of pain for developers.
There's nothing particularly elaborate that happens here, the extension is simple and effective. Your NUnit project is not created with the latest production release of the NUnit framework (at time of writing, the latest version is 2.5.10 where the template installs with 2.5.9) but this is forgiveable and one would assume that regular updates would correct this issue periodically, although perhaps more attention could be paid to the NUnit release cycle.
Project classes and references are all named correctly and the suite of AccountController classes are thorough and correct.
Overall, this makes life infinitely easier for plugging NUnit test templates into your MVC3 projects.
I'm getting the below error on brand new box. I've update VS sp1 and april '11 tools update. There is no FormsService off the AccountController. Any idea what's going on?
thx,Dan
'MvcApplication4.Controllers.AccountController' does not contain a definition for 'FormsService' and no extension method 'FormsService' accepting a first argument of type 'MvcApplication4.Controllers.AccountController' could be found (are you missing a using directive or an assembly reference?) c:\users\danieleli\documents\temp\MvcApplication4\MvcApplication4.Tests\Controllers\AccountControllerTest.cs 128 71 MvcApplication4.Tests
Hey, I am getting the same problem. The Accounts controller does not contain either FormsService or MembershipService as I believe it should based on other code I've seen for MVC3. The test utility method GetAccountController() tries to create a Account Controller with these variables, but they don't exist so the whole thing fails and none of the tests can be used.
I'm woundering if the Accounts controller code in the template is from a differenct version of MVC or something strange like that?
Just as an update I think there may have been changes to the Account Controller for security reasons (Open Redirect Attack).
http://weblogs.asp.net/jgalloway/archive/2011/01/25/preventing-open-redirection-attacks-in-asp-net-mvc.aspx?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+jongalloway+%28Jon+Galloway%29
You can also see progress on development here:
http://blog.kimpenhaus.de/asp.net-mvc-nunit-test-template-on-visual-studio-gallery
He guys,
this problem is due to Tools Update for ASP.NET MVC 3 as they changed the default project template and its controller classes. This will be fixed in vNext coming up shortly. Temporary solution could be deleting the faulted tests (as they are only a template).
Thanks for pointing out the problem.
m.
After downloading the file ASP.NET MVC Nunit.vsix from your site, I click on it to install and I get error message "This extension is not installable on any currently installed products" I have VWD Express 2010 sp1 and MVC3 and Windows 7 Pro. I want to be able to create NUnit test projects. I wasn't able to do it in VWD 2008 Express, i was hoping it would work in 2010 Express. Please help