Index() private method

private Index ( ) : System.Web.Mvc.ActionResult
return System.Web.Mvc.ActionResult
Exemplo n.º 1
0
        public void Index()
        {
            // Arrange
            HomeController controller = new HomeController(null, null);

            // Act
            ViewResult result = controller.Index() as ViewResult;

            // Assert
            ViewDataDictionary viewData = result.ViewData;
            Assert.AreEqual("Welcome to ASP.NET MVC!", viewData["Message"]);
        }