public void Index() { // Disponer HomeController controller = new HomeController(); // Actuar ViewResult result = controller.Index() as ViewResult; // Declarar Assert.AreEqual("Modifique esta plantilla para poner en marcha su aplicación ASP.NET MVC.", result.ViewBag.Message); }
public void Index() { // Arrange var controller = new HomeController(); // Act var result = controller.Index() as ViewResult; // Assert result.Should().NotBeNull(); }