示例#1
0
        public void SaveBookingTest()
        {
            var testUnitOfWork = new TestUnitOfWork();
            var service        = new BookingService(new TestBookingRepository(GetBookings()), testUnitOfWork);

            service.SaveBooking();
            Assert.IsTrue(testUnitOfWork.Commited);
        }
示例#2
0
        public void GetSaveAirportTest()
        {
            var testUnitOfWork = new TestUnitOfWork {
                Commited = false
            };

            AirportService service = new AirportService(new TestAirportRepository(null), testUnitOfWork);

            service.SaveAirport();

            Assert.IsTrue(testUnitOfWork.Commited);
        }