public void ServiceTest() { var shows = showService.GetAllShows(); foreach (var show in shows) { var tl = showService.TicketsLeftForShow(show); Assert.IsTrue(tl >= 0 && tl <= Constants.Rows * Constants.Seats); } }
public ActionResult Details(int id) { var show = showService.GetShowById(id); if (show == null) { return(RedirectToAction("ViewShows")); } TempData["remainingSeats"] = showService.TicketsLeftForShow(show); return(View(show)); }