I want to write a unit test to ensure that the view I am returning is the correct one.
My plan is to write a test that first invokes the controller and then calls the ActionResult method I plan to test I thought I could write something like
Controller controller = new HomeController();
var actionresult = controller.Index();
Assert.False(actionresult.ToString(), String.Empty);
which would then allow me to parse the actionresult for the test value.
However I cannot directly instantiate the public ActionResult Index()
method.
How do I do this?