I'm unit testing someone else's ASP.Net MVC4 Controller action method. Its last line is:
return this.View("ConfirmAddress", addressModel);
This returns null
in my unit test. The Controller.View documentation says the first parameter is a view name but I can't step into this method to find out why null
is returned. A ConfirmAddress.cshtml
exists in the Views folder but there's also a ConfirmAddress(AddressModel am)
action in the controller.
Can anyone tell from this what it should be doing (e.g. perhaps use RedirectToAction
instead???) Have tried to keep this short but could provide more info if needed...