public void Index() { HomeController controller = new HomeController(); ViewResult result = controller.Index() as ViewResult; Assert.IsNotNull(result); Assert.IsInstanceOfType(result, typeof(ViewResult)); }
public void Contact() { HomeController controller = new HomeController(); ViewResult result = controller.Contact() as ViewResult; Assert.AreEqual("Your contact page.", result.ViewBag.Message); Assert.IsNotNull(result); Assert.IsInstanceOfType(result, typeof(ViewResult)); }
public void About() { HomeController controller = new HomeController(); ViewResult result = controller.About() as ViewResult; Assert.AreEqual("Your application description page.", result.ViewBag.Message); Assert.IsNotNull(result); Assert.IsInstanceOfType(result, typeof(ViewResult)); }