示例#1
0
        public void TestEditBooking()
        {
            // Updates the dummy booking in the database, first captures the dummy bookingID from database
            //using a TestAccessor
            BookingID = TestCleanupAccessor.GetBooking();
            //Assigns one booking object to be the old record and one to be the new record
            Booking newB = myBook.RetrieveBooking(BookingID);

            //Updates the booking with new quantity
            newB.Quantity = 3;
            int rows     = myBook.EditBooking(newB);
            int expected = 3;
            //Grabs the record to test and see if the update went through
            Booking toCheck = myBook.RetrieveBooking(BookingID);

            Assert.AreEqual(expected, toCheck.Quantity);
        }