Exemplo n.º 1
0
        public void Contact()
        {
            // Arrange
            HomeController controller = new HomeController();

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

            // Assert
            Assert.IsNotNull(result);
        }
Exemplo n.º 2
0
 public void Index()
 {
     var db = new FakeMovieDb();
     db.AddSet(TestData.Movies);
     // Arrange
     HomeController controller = new HomeController(db);
    
     controller.ControllerContext = new FakeController();
     // Act
     ViewResult result = controller.Index() as ViewResult;
     
     // Assert
     Assert.IsNotNull(result.Model);
 }