Exemplo n.º 1
0
        public void BaseRateFor70YearOldFemale_ShouldBe485()
        {
            BasePrice        b   = new BasePrice();
            ApplicantDetails foo = new ApplicantDetails {
                Age = 70, isMale = false
            };

            Assert.AreEqual(b.ReturnBasePrice(foo), 485);
        }
Exemplo n.º 2
0
        public void BaseRateFor10YearOldBoy_ShouldBe150()
        {
            BasePrice        b   = new BasePrice();
            ApplicantDetails foo = new ApplicantDetails {
                Age = 10, isMale = true
            };

            Assert.AreEqual(b.ReturnBasePrice(foo), 150);
        }
Exemplo n.º 3
0
        public decimal CalculateFinalQuote(ApplicantDetails quote)
        {
            decimal BasePremium = new BasePrice().ReturnBasePrice(quote);

            decimal AfterRHI = BasePremium + new CountryOfResidence().ReturnRHIDifference(quote.Country);

            ChildLoading child = new ChildLoading();
            decimal      PremiumAfterChildLoad = child.ApplyChildLoading(AfterRHI, quote.HasChildren);

            SmokerLoading smoke = new SmokerLoading();
            decimal       PremiumAfterSmoking = smoke.ApplySmokerLoading(PremiumAfterChildLoad, quote.IsSmoker);

            HealthyLifeStyleBonus HLB = new HealthyLifeStyleBonus();
            decimal PremiumAfterLifeStyleAdjustment = HLB.ApplyLifeStyleBonus(PremiumAfterSmoking, quote.WeeklyExcercise);

            return(PremiumAfterLifeStyleAdjustment);
        }