Пример #1
0
        private void AddVastePrijsAndPercentuelePromotieToPromoties()
        {
            VastePrijsPromotie  vastePrijsPromotie  = new VastePrijsPromotie(-250);
            PercentuelePromotie percentuelePromotie = new PercentuelePromotie(-0.10);

            RentAVillaRentingService.Promoties.Add(vastePrijsPromotie);
            RentAVillaRentingService.Promoties.Add(percentuelePromotie);
        }
Пример #2
0
 public AfroepContract(Klant klant, Pand pand, Periode periode, int overnachtingsQuota, VastePrijsPromotie vastePrijsPromotie)
 {
     Klant              = klant;
     Pand               = pand;
     Periode            = periode;
     OvernachtingsQuota = overnachtingsQuota;
     VastePrijsPromotie = vastePrijsPromotie;
 }
Пример #3
0
        public void VastePrijsPromotieHeeftPeriodeEnIsPrijsComponent()
        {
            Periode            periode  = new Periode("22/04/2019", "26/04/2019");
            double             waarde   = -250.00;
            VastePrijsPromotie promotie = new VastePrijsPromotie(periode, waarde);

            Assert.IsTrue(promotie != null);
            Assert.IsTrue(promotie.Waarde == -250.00 && promotie.ToepassingsEenheid == PrijsEenheid.PerReservatie);
        }
Пример #4
0
        public void AfroepContractHeeftKlantPeriodeEnHuurobject()
        {
            Klant              klant              = new Klant(new KlantCategorie(KlantCategorieNaam.Reisbroker), "TravelSL");
            Periode            periode            = new Periode("01/04/2019", "31/12/2019");
            Pand               pand               = TestDataGenerator.GetTestPand();
            int                overnachtingsQuota = 30;
            VastePrijsPromotie contractBonus      = new VastePrijsPromotie(-10000.00);
            AfroepContract     testContract       = new AfroepContract(klant, pand, periode, overnachtingsQuota, contractBonus);

            Assert.IsTrue(testContract.GetType() == typeof(AfroepContract));
        }
Пример #5
0
        private void AddAfroepContract()
        {
            Klant klant = RentAVillaRentingService.KlantenBestand.Find(kl => kl.Naam == "Traveling Lathouwers NV");
            Pand  pand  = RentAVillaRentingService.HuurPanden.Find(p => p.Land == ActieveLanden.Frankrijk);
            VastePrijsPromotie vastePrijsPromotie = new VastePrijsPromotie(-2500);
            int overnachtingsQuota = 50;

            RentAVillaRentingService.AfroepContracten.Add(new AfroepContract(klant,
                                                                             pand,
                                                                             new Periode("01/04/2019",
                                                                                         "01/09/2019"),
                                                                             overnachtingsQuota,
                                                                             vastePrijsPromotie));
        }
Пример #6
0
        public void MaakPrijsOfferteMetPrijsComponenten()
        {
            int          aantalPersonen = 6;
            int          aantalNachten  = 7;
            PrijsOfferte offerte        = new PrijsOfferte();

            HuurPrijsPerNacht       huurPrijsPerNacht       = new HuurPrijsPerNacht(Tarief.Hoogseizoen, 127.00);
            Waarborg                waarborg                = new Waarborg(500.00);
            SchoonmaakPrijs         schoonmaak              = new SchoonmaakPrijs(100.00);
            PersoonsToeslagPerNacht persoonsToeslagPerNacht = new PersoonsToeslagPerNacht(25);
            Periode             promotiePeriode             = new Periode("21/04/2019", "31/12/2019");
            VastePrijsPromotie  vastePrijsPromotie          = new VastePrijsPromotie(promotiePeriode, -250.00);
            PercentuelePromotie reservatieKorting           = new PercentuelePromotie(promotiePeriode, -0.10, offerte);
            PercentuelePromotie huurPrijsPromotie           = new PercentuelePromotie(promotiePeriode, -0.5, huurPrijsPerNacht);

            offerte.Add(huurPrijsPerNacht, aantalNachten);
            offerte.Add(waarborg);
            offerte.Add(schoonmaak);
            offerte.Add(persoonsToeslagPerNacht, aantalNachten * aantalPersonen);
            offerte.Add(vastePrijsPromotie);
            offerte.Add(reservatieKorting);
            offerte.Add(huurPrijsPromotie, aantalNachten);
            Assert.IsTrue(offerte.Waarde != 0);
        }