Exemplo n.º 1
0
        public void Index()
        {
            // Réorganiser
            HomeController controller = new HomeController();

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

            // Déclarer
            Assert.AreEqual("Bienvenue dans ASP.NET MVC !", result.ViewBag.Message);
        }
Exemplo n.º 2
0
        public void About()
        {
            // Réorganiser
            HomeController controller = new HomeController();

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

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