示例#1
0
        public void can_add_reservation()
        {
            //arrange
            NewReservationItem newRes = new NewReservationItem
            {
                From = DateTime.Now,
                To   = DateTime.Now.AddDays(10),
                LectureHallNumber = 101,
                LecturerId        = 1
            };
            IReservationsService service = new ReservationsService(_database);

            //add a new reservation
            service.SaveReservation(newRes);
            var reservations = _database.Reservations;

            //assert
            Assert.IsTrue(reservations.Count == 2);
        }