Esempio n. 1
0
        private void ReserveSite(string name, int site, DateTime start, DateTime end)
        {
            SiteDAL dal = new SiteDAL(databaseConnection);
            //List<Reservation> reservations =
            int makeRes = dal.MakeReservation(name, site, start, end);

            //reservations.ForEach(res =>
            //{
            Console.WriteLine($"The reservation has been made and the confirmation id is {makeRes}");
            //});
        }
Esempio n. 2
0
        public void MakeReservationTest()
        {
            int     initialCount = reservationCount();
            SiteDAL dal          = new SiteDAL(connectionString);
            //Reservation reservations = new Reservation();
            //reservations.Name = "jones";
            //reservations.SiteId = siteId;
            DateTime StartDate = new DateTime(2016, 10, 12);
            DateTime EndDate   = new DateTime(2016, 10, 15);

            dal.MakeReservation("shaw", siteId, StartDate, EndDate);
            Assert.AreEqual(initialCount + 1, reservationCount());
        }