I have written unit test for following action.
[HttpPost] public ActionResult/*ViewResult*/ Create(MyViewModel vm) { if (ModelState.IsValid) {
Try this code:
dynamic result=objectController.Index(); Assert.AreEqual("Index",result.ViewName);