コード例 #1
0
 public void ListAction_Always_ViewModelIsAListOfMovies()
 {
     var homeController = new HomeController(_documentSession);
     var result = (ViewResult)homeController.List(null);
     Assert.IsInstanceOf<List<Movie>>(result.Model);
 }
コード例 #2
0
 public void ListAction_SuppliedNullMessage_MessageIsAddedToViewBagNoErrorIsThrown()
 {
     var homeController = new HomeController(_documentSession);
     var result = (ViewResult)homeController.List(null);
     Assert.That((string)result.ViewBag.Message, Is.Null);
 }
コード例 #3
0
 public void ListAction_Always_ReturnsViewByConvention()
 {
     var homeController = new HomeController(_documentSession);
     var result = (ViewResult)homeController.List(null);
     Assert.That(result.ViewName, Is.Empty);
 }