2

I am trying to write unit tests for RouteConfig.cs files to evaluate the routes. For example, "~/" should map to default action and default controllers, and like that.

I am using xUnit and FakeItEasy in my project. Earlier, I could achieve it using MvcContrib.TestHelpers nuget, but that depends on RhinoMocks whereas I am using FakeItEasy in my project and I don't think it will be a good idea to import RhinoMocks just for the purpose of RouteConfig unit tests.

Any idea of a better approach to achieve this?

Nirman
  • 6,715
  • 19
  • 72
  • 139
  • I've not tried it, and maybe this is completely silly, but at first glance, the Rhino involvement isn't very heavy (and seems to have been removed from the "develop" branch). Perhaps you could reverse-engineer the `RouteTestingExtensions`, which I assume you had been using. – Blair Conrad Oct 19 '15 at 17:18

1 Answers1

1

I switched to using https://github.com/AnthonySteele/MvcRouteTester after having the same issue, hope this helps.

Scott Mackay
  • 1,194
  • 10
  • 34