Пример #1
0
        public void Index()
        {
            // Réorganiser
            HomeController controller = new HomeController();

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

            // Déclarer
            Assert.AreEqual("Modifiez ce modèle pour dynamiser votre application ASP.NET MVC.", result.ViewBag.Message);
        }
Пример #2
0
        public void Contact()
        {
            // Réorganiser
            HomeController controller = new HomeController();

            // Agir
            ViewResult result = controller.Contact() as ViewResult;

            // Déclarer
            Assert.IsNotNull(result);
        }