Esempio n. 1
0
        public void InsertNewBookingTest()
        {
            Reservation reservation = new Reservation()
            {
                from_date        = dateStart,
                to_date          = dateEnd,
                reservation_name = "Test",
                site_id          = 1
            };

            int id = resDAO.InsertNewBooking(reservation);

            Assert.AreNotEqual(0, id);

            Reservation getReservation = resDAO.FindReservation(id);

            Assert.AreEqual(reservation.from_date, getReservation.from_date);
            Assert.AreEqual(reservation.to_date, getReservation.to_date);
            Assert.AreEqual(reservation.reservation_name, getReservation.reservation_name);
            Assert.AreEqual(reservation.site_id, getReservation.site_id);
        }