asp.net mvc - Do you check HttpVerbs in your unit tests? -


Standard ASP. Looking at the unit tests that come with the MVC Web project template I have seen that they do not check whether or not a proper HTVPARS attribute is set to every action method.

It is easy to test this with reflection, but the question is whether it is worth the effort. Do you check HTTPVirbs in your unit test, or do you leave it for unity testing?

You can also use MvcContrib.TestHelper to test route along the route.

  [TestMethod] Public Zero ShouldConfirmRouteForNewObjectWithPost () {"~ / Object / New" .WithMethod (HttpVerbs.Post). ShouldMapTo & lt; ObjectController & gt; (X => x.New ()); }  

Comments

Popular posts from this blog

c++ - Linux and clipboard -

Visual Studio 2005: How to speed up builds when a VSMDI is open? -

booting ubuntu from usb using virtualbox -