public About ( ) : System.Web.Mvc.ActionResult | ||
Результат | System.Web.Mvc.ActionResult |
public void About() { // Arrange HomeController controller = new HomeController(); // Act ViewResult result = controller.About() as ViewResult; // Assert Assert.IsNotNull(result); }
public void ReturnTheAboutView() { var homeController = new HomeController(); ViewResult viewResult = (ViewResult)homeController.About(); Assert.AreEqual("About", viewResult.ViewName); }