public void ConfirmDeleteAction_IdFound_ViewModelIsMovie()
 {
     var movie = _documentSession.SaveNewMovieToRavenDB(new Movie().NewValid());
     var homeController = new HomeController(_documentSession);
     var result = (ViewResult)homeController.ConfirmDelete(movie.Id);
     Assert.IsInstanceOf<Movie>(result.Model);
 }
 public void ConfirmDeleteAction_IdFound_ReturnsViewByConvention()
 {
     var movie = _documentSession.SaveNewMovieToRavenDB(new Movie().NewValid());
     var homeController = new HomeController(_documentSession);
     var result = (ViewResult)homeController.ConfirmDelete(movie.Id);
     Assert.That(result.ViewName, Is.Empty);
 }
 public void ConfirmDeleteAction_IdNotFound_RedirectsToIndexActionSettingMessage()
 {
     var homeController = new HomeController(_documentSession);
     homeController.ConfirmDelete(0);
     Assert.That(homeController.TempData["Message"], Is.EqualTo(string.Format("Movie {0} not found", 0)));
 }
 public void ConfirmDeleteAction_IdNotFound_RedirectsToIndexAction()
 {
     var homeController = new HomeController(_documentSession);
     var result = (RedirectToRouteResult)homeController.ConfirmDelete(0);
     Assert.That(result.RouteValues["action"], Is.EqualTo("Index"));
 }