Skip to content

Using unit tests to explore and understand parts of ASP.NET MVC's url routing engine

Notifications You must be signed in to change notification settings

scichelli/Learning-MVCRouting

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Exploring MVC's routing engine via unit tests

This solution has two purposes, and so has two sections. The UI project and the Routing.Tests project make up one section. These give an example of a boilerplate MVC project, showing how routes are configured in Global.asax.cs, and its attendant unit test project. I kept these in here, separate from the other test project, because I wanted an example of how the routes registration would really work in the wild, and which assembly references would be needed (and which ones not needed) in the test project.

The second section is the ExploringRoutesWithTests project, organized by one-test-fixture-per-theme, where I'm using unit tests to play what-if games with routing.

The Home/Index page plays with the HtmlHelper methods that use the routing engine to emit URLs, links, and action results. The page shows the method that was called in the view markup, followed by the output of that method.

With thanks to

About

Using unit tests to explore and understand parts of ASP.NET MVC's url routing engine

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages