示例#1
0
        public void ManagementFee_Verification_CorrectValue()
        {
            PolicyCMaturityCalculator PolicyCMaturityCalculator = new PolicyCMaturityCalculator();
            var policyCMaturityCalculatorSpy = new PolicyCMaturityCalculatorSpy();

            var managementFee = policyCMaturityCalculatorSpy.GetSpyManagementFee;

            Assert.AreEqual(0.07, managementFee);
        }
示例#2
0
        public void GetDiscretionaryBonus_PolicyTakenBefore_1_1_1990_VerifyDiscretionaryBonus_Zero()
        {
            var startDate    = DateTime.ParseExact("1/6/1986", "m/d/yyyy", CultureInfo.InvariantCulture);
            var policyDetail = new PolicyDetail()
            {
                PolicyNumber       = "C100002",
                PolicyStartDate    = startDate,
                DiscretionaryBonus = 2000
            };
            var policyCMaturityCalculatorSpy = new PolicyCMaturityCalculatorSpy();

            var discretionaryBonus = policyCMaturityCalculatorSpy.GetSpyDiscretionaryBonus(policyDetail);

            Assert.AreEqual(0, discretionaryBonus);
        }
示例#3
0
        public void GetDiscretionaryBonus_PolicyTakenAfter_1_1_1990_MembershipRightTrue_VerifyDiscretionaryBonus_TwoThousand()
        {
            PolicyCMaturityCalculator PolicyCMaturityCalculator = new PolicyCMaturityCalculator();
            var startDate    = DateTime.ParseExact("1/1/1991", "m/d/yyyy", CultureInfo.InvariantCulture);
            var policyDetail = new PolicyDetail()
            {
                PolicyNumber       = "C100001",
                PolicyStartDate    = startDate,
                DiscretionaryBonus = 2000,
                Membership         = true
            };
            var policyCMaturityCalculatorSpy = new PolicyCMaturityCalculatorSpy();

            var discretionaryBonus = policyCMaturityCalculatorSpy.GetSpyDiscretionaryBonus(policyDetail);

            Assert.AreEqual(2000, discretionaryBonus);
        }