public void TestRudyManagerGetReservations()
        {
            UnitOfWork             uow          = new UnitOfWork(new VIPServicesRudyTestContext(true));
            VIPServicesRudyManager m            = new VIPServicesRudyManager(uow);
            List <Reservation>     reservations = m.GetReservations().ToList();

            reservations.Count.ShouldBe(1);
        }
        public void TestRudyManagerGetClients()
        {
            UnitOfWork             uow     = new UnitOfWork(new VIPServicesRudyTestContext(true));
            VIPServicesRudyManager m       = new VIPServicesRudyManager(uow);
            List <Client>          clients = m.GetClients().ToList();

            clients.Count.ShouldBe(23);
        }
        public void TestRudyManagerGetLimousines()
        {
            UnitOfWork             uow   = new UnitOfWork(new VIPServicesRudyTestContext(true));
            VIPServicesRudyManager m     = new VIPServicesRudyManager(uow);
            List <Limousine>       limos = m.GetLimousines().ToList();

            limos.Count.ShouldBe(20);
        }
        public void TestRudyManagerGetCategory()
        {
            UnitOfWork             uow  = new UnitOfWork(new VIPServicesRudyTestContext(true));
            VIPServicesRudyManager m    = new VIPServicesRudyManager(uow);
            CategorieType          type = CategorieType.vip;
            Category vip = m.GetCategory(type);

            vip.Name.ShouldBe(CategorieType.vip);
            vip.StaffDiscount.Count.ShouldBe(3);
        }
        public void TestRudyManagerAddReservationLimousineNotInDatabase()
        {
            UnitOfWork             uow     = new UnitOfWork(new VIPServicesRudyTestContext(true));
            VIPServicesRudyManager m       = new VIPServicesRudyManager(uow);
            DateTime  reservationDateStart = new DateTime(2020, 01, 23, 15, 00, 00);
            DateTime  reservationDateEnd   = new DateTime(2020, 01, 23, 18, 00, 00);
            Limousine limoTest             = new Limousine("FIAT 500", 100, new List <Arrangement>()
            {
            });
            Client      clientTest  = uow.Clients.GetClient(3);
            Arrangement arrangement = new HourlyArrangement(100, HourlyArrangementType.Airport, reservationDateStart, reservationDateEnd);
            Reservation test        = new Reservation("Kerkstraat 45", clientTest, new ReservationDetails(reservationDateStart, reservationDateEnd, Location.Gent, Location.Brussel, limoTest, arrangement));
            Action      act         = () => m.AddReservation(test);

            act.ShouldThrow <ArgumentException>().Message.ShouldBe("Limousine zit nog niet in databank gelieve Limousine eerst toe te voegen.");
        }
        public void TestRudyManagerAddReservation()
        {
            UnitOfWork             uow = new UnitOfWork(new VIPServicesRudyTestContext(false));
            VIPServicesRudyManager m   = new VIPServicesRudyManager(uow);

            Parser.InitTestDatabase(uow);
            DateTime    reservationDateStart = new DateTime(2020, 01, 23, 15, 00, 00);
            DateTime    reservationDateEnd   = new DateTime(2020, 01, 23, 18, 00, 00);
            Limousine   limoTest             = uow.Limousines.GetLimousine(2);
            Client      clientTest           = uow.Clients.GetClient(2);
            Arrangement arrangement          = new HourlyArrangement(100, HourlyArrangementType.Airport, reservationDateStart, reservationDateEnd);
            Reservation test = new Reservation("Kerkstraat 45", clientTest, new ReservationDetails(reservationDateStart, reservationDateEnd, Location.Gent, Location.Brussel, limoTest, arrangement));

            m.AddReservation(test);
            uow.Reservations.InDatabase(test).ShouldBeTrue();
        }