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); }
public void IfTheApplicantIsASmoker_ThenLoadBy300Percent() { SmokerLoading Smoke = new SmokerLoading(); Assert.AreEqual(Smoke.ApplySmokerLoading(100, true), 300); }
public void IfTheApplicantIsANonSmoker_ThenNoSmokerLoadingIsApplied() { SmokerLoading Smoke = new SmokerLoading(); Assert.AreEqual(Smoke.ApplySmokerLoading(100, false), 100); }