예제 #1
0
        public void PremiumChange_BasedOnExcerciseLevels()
        {
            HealthyLifeStyleBonus hl = new HealthyLifeStyleBonus();

            Assert.AreEqual(hl.ApplyLifeStyleBonus(100, 0), 120);
            Assert.AreEqual(hl.ApplyLifeStyleBonus(100, 1), 100);
            Assert.AreEqual(hl.ApplyLifeStyleBonus(100, 3), 70);
            Assert.AreEqual(hl.ApplyLifeStyleBonus(100, 6), 50);
            Assert.AreEqual(hl.ApplyLifeStyleBonus(100, 10), 150);
        }
예제 #2
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);
        }