Exemplo n.º 1
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);
 }
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);
        }