Пример #1
0
        public void GetReservedSeatsTest()
        {
            List <Ticket> tickets = purchaseDAO.GetReservedSeats(1, "2020-04-15", "10:00");
            int           actual  = tickets.Count;

            Assert.AreEqual(4, actual);
        }
Пример #2
0
        public IActionResult GetReservedSeats(int movieId, string date, string startTime)
        {
            List <Ticket> tickets = purchaseDAO.GetReservedSeats(movieId, date, startTime);
            List <string> seats   = new List <string>();

            foreach (var t in tickets)
            {
                seats.Add(t.SeatName);
            }
            return(new JsonResult(seats));
        }