MVC Route Unit Tester provides convenient, easy to use methods that let you unit test the route table in your ASP.NET MVC application, including Area routes. Unlike many libraries, this lets you test routes both ways -- both incoming and outgoing. You can specify an incoming request and make one of several assertions about the outcome; such that the request matches a given route, matches no routes, or that it is ignored by the routing system. You can also specify route data and assert that a given URL will be generated by your application. Works with any unit testing library you choose, such as MSTest, NUnit, xUnit, mbUnit, and others. See the Project site for usage details.
See the version list below for details.
Install-Package MvcRouteUnitTester -Version 0.9.1
dotnet add package MvcRouteUnitTester --version 0.9.1
<PackageReference Include="MvcRouteUnitTester" Version="0.9.1" />
paket add MvcRouteUnitTester --version 0.9.1
0.9.0.0: Several new methods were added to allow direct assertions in test methods.
0.8.5.0: the MatchesRoute method no longer returns true for partial matches.
0.8.3.0: Support for Area routes was added.
- Moq (>= 4.0.10827)