How to unit test this simple ASP.NET MVC controller
- by Frank Schwieterman
Lets say I have a simple controller for ASP.NET MVC I want to test. I want to test that a controller action (Foo, in this case) simply returns a link to another action (Bar, in this case).
How would you test this? (either the first or second link)
My implementation has the same link twice. One passes the url throw ViewData[]. This seems more…