Index() 개인적인 메소드

private Index ( ) : System.Web.Mvc.ActionResult
리턴 System.Web.Mvc.ActionResult
예제 #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"]);
        }