Open awj100 opened 8 years ago
For several reasons I have shelved this project: 1) There are lots of corner cases, like this, and lots of code to handle them, indicting that I was duplicating the routing engine (poorly) and a different approach would be better. 2) it used the internals of ASP MVC libraries, which broke on almost every minor release. keeping track of the route tester branches and packages was a pain. 3) All this is moot, everything has changed in ASP.NET MVC 5, I mean in ASP.Net Core 1.0 which will hopefully allow other approaches to this problem, such as this one
Thus far MvcRouteTester has worked well for verifying my WebAPI routes, but it appears to fall short in one situation.
I have the following method:
As you can see, the
duplicateOverride
param is optional.The following test passes:
But this test fails:
The
AssertionException
saysThe only way I can think of testing the route without the
duplicateOverride
parameter is to refactor the method into two separate (chained) methods, with and without the parameter.Or is there a better way?