Exemple #1
0
        public void GetIndividualBenefitCost_PersonWithNameNotStartingWithA_GetsStandardCost()
        {
            //arrange
            Employee           employee = new Employee("George", "Random");
            BenefitCostService service  = GetMockBenefitCostService();

            //act
            var annualBenefitCost = service.GetIndividualBenefitCost(employee).AnnualBenefitCost;

            //assert
            annualBenefitCost.Should().Be(1000);
        }
Exemple #2
0
        public void GetIndividualBenefitCost_StandardEmployee_ReturnsCorrectPaycheckAmount()
        {
            //arrange
            Employee           employee = new Employee("George", "Random");
            BenefitCostService service  = GetMockBenefitCostService();

            //act
            var paycheckBenefitCost = service.GetIndividualBenefitCost(employee).PaycheckBenefitCost;

            //assert
            paycheckBenefitCost.Should().Be(Math.Round(1000M / 26, 2));
        }
Exemple #3
0
        public void GetIndividualBenefitCost_PersonWithNameStartingWithA_GetsDiscount()
        {
            //arrange
            Employee           employee = new Employee("Alphonso", "Miller");
            BenefitCostService service  = GetMockBenefitCostService();

            //act
            decimal annualBenefitCost = service.GetIndividualBenefitCost(employee).AnnualBenefitCost;

            //assert
            annualBenefitCost.Should().Be(900);
        }