Looked for a method on the MvcContrib.TestHelper.RouteTestingExtensions
class named ShouldNotMap. There is ShouldBeIgnored, but I don't want to test an IgnoreRoute
invocation. I want to test that a specific incoming route should not be mapped to any resource.
Is there a way to do this using MvcContrib TestHelper?
Update
Just tried this, and it seems to work. Is this the correct way?
"~/do/not/map/this".Route().ShouldBeNull();
I was looking for the same thing. I ended up adding the following extension methods to implement
ShouldBeNull
and the even shorterShouldNotMap
:In
RouteTestingExtensions.cs
:In
GeneralTestExtensions.cs
: