Example #1
0
        public void Contact()
        {
            // 排列
            HomeController controller = new HomeController();

            // 作用
            ViewResult result = controller.Contact() as ViewResult;

            // 判斷提示
            Assert.IsNotNull(result);
        }
Example #2
0
        public void Index()
        {
            // 排列
            HomeController controller = new HomeController();

            // 作用
            ViewResult result = controller.Index() as ViewResult;

            // 判斷提示
            Assert.AreEqual("修改此範本即可開始著手進行您的 ASP.NET MVC 應用程式。", result.ViewBag.Message);
        }