public void TestDetailsForViewResult() { FirstController contro1 = new FirstController(); var result1 = contro1.Details(2) as ViewResult; Assert.AreEqual("Details", result1.ViewName); }
public void TestDetailsForRedirect() { FirstController contro = new FirstController(); var result = contro.Details(-1) as RedirectToRouteResult; Assert.AreEqual("Index", result.RouteValues["Action"]); Assert.AreEqual("HomeController", result.RouteValues["Controller"]); }