Monday, August 3, 2009

unit testing ASP.NET MVC

So it's not necessary to have the

[HostType("ASP.NET")]
[AspNetDevelopmentServerHost()]
[UrlToTest()]

attributes to do ASP.NET MVC unit testing. I've found that adding VSTS running those sorts of ASP.NET tests causes VSTS to do strange behaviors. Like not hit breakpoints anymore. And throw random errors that ask you to remove HttpModule hostAdapter.

All that's needed is the [TestMethod] attribute.