コード例 #1
0
        public void CheckAvailability_Test()
        {
            // ARRANGE
            int      venue_id       = 267;
            int      numOfAttendees = 80;
            DateTime start_date     = new DateTime(2020, 10, 25);
            int      numOfDays      = 2;

            IReserveDAO reservation = new ReservationDAO(connectionString);
            bool        found       = false;

            // ACT
            IList <Reservation> reservations = reservation.CheckAvailability(venue_id, numOfAttendees, start_date, numOfDays);

            foreach (Reservation reserve in reservations)
            {
                if (reserve.space_id == 999)
                {
                    found = true;
                    break;
                }
            }

            // ASSERT
            Assert.IsTrue(found);
        }