public void Test_GetTotalEmployeeCostDataNoDependentsWithDiscount() { var employeeData = new EmployeeData("emily", "apple"); BenefitsService benefitsService = new BenefitsService(); var result = benefitsService.GetEmployeeCost(employeeData); Assert.That(result.BenefitCostForEmployeeOnly, Is.EqualTo(900.00m)); Assert.That(result.BenefitCostForDependentsOnly, Is.EqualTo(0.00m)); Assert.That(result.TotalBenefitsCostPerYear, Is.EqualTo(900.00m)); Assert.That(result.TotalEmployeeCostPerPayPeriod, Is.EqualTo(2034.62m)); Assert.That(result.TotalEmployeeCostPerYear, Is.EqualTo(52900.00m)); Assert.That(result.ErrorDetails, Is.Null); Assert.That(result.EmployeeData, !Is.Null); }
public void Test_GetTotalEmployeeCostDataNoDependentsNoDiscount() { var employeeData = new EmployeeData("joe", "person"); BenefitsService benefitsService = new BenefitsService(); var result = benefitsService.GetEmployeeCost(employeeData); Assert.That(result.BenefitCostForEmployeeOnly, Is.EqualTo(1000.00m)); Assert.That(result.BenefitCostForDependentsOnly, Is.EqualTo(0.00m)); Assert.That(result.TotalBenefitsCostPerYear, Is.EqualTo(1000.00m)); Assert.That(result.TotalEmployeeCostPerPayPeriod, Is.EqualTo(2038.46m)); Assert.That(result.TotalEmployeeCostPerYear, Is.EqualTo(53000.00m)); Assert.That(result.ErrorDetails, Is.Null); Assert.That(result.EmployeeData, !Is.Null); }
public void Test_GetTotalEmployeeCostDataOneDependentsWithDependentDiscount() { var employeeData = new EmployeeData("bob", "orange") { Dependents = new List <Person> { new Person("alice", "apple") } }; BenefitsService benefitsService = new BenefitsService(); var result = benefitsService.GetEmployeeCost(employeeData); Assert.That(result.BenefitCostForEmployeeOnly, Is.EqualTo(1000.00m)); Assert.That(result.BenefitCostForDependentsOnly, Is.EqualTo(450.00m)); Assert.That(result.TotalBenefitsCostPerYear, Is.EqualTo(1450.00m)); Assert.That(result.TotalEmployeeCostPerPayPeriod, Is.EqualTo(2055.77m)); Assert.That(result.TotalEmployeeCostPerYear, Is.EqualTo(53450.00m)); Assert.That(result.ErrorDetails, Is.Null); Assert.That(result.EmployeeData, !Is.Null); }
public void Test_GetTotalEmployeeCostDataEmployeeAndDependentsWithSpecialCharacters() { var employeeData = new EmployeeData("#$%2223%%^", "9!!~~~~%^^&*()") { Dependents = new List <Person> { new Person("@#$%^*(", "2342334&&*&%$"), new Person("*^&(^&^$%%#$222", "333$%$^%") } }; BenefitsService benefitsService = new BenefitsService(); var result = benefitsService.GetEmployeeCost(employeeData); Assert.That(result.BenefitCostForEmployeeOnly, Is.EqualTo(1000.00m)); Assert.That(result.BenefitCostForDependentsOnly, Is.EqualTo(1000.00m)); Assert.That(result.TotalBenefitsCostPerYear, Is.EqualTo(2000.00m)); Assert.That(result.TotalEmployeeCostPerPayPeriod, Is.EqualTo(2076.92m)); Assert.That(result.TotalEmployeeCostPerYear, Is.EqualTo(54000.00m)); Assert.That(result.ErrorDetails, Is.Null); Assert.That(result.EmployeeData, !Is.Null); }
public void Test_GetTotalEmployeeCostDataTwoDependentsWithEmployeeAndOneDependentDiscount() { var employeeData = new EmployeeData("test", "apple") { Dependents = new List <Person> { new Person("apple", "blue"), new Person("jill", "jackson") } }; BenefitsService benefitsService = new BenefitsService(); var result = benefitsService.GetEmployeeCost(employeeData); Assert.That(result.BenefitCostForEmployeeOnly, Is.EqualTo(900.00m)); Assert.That(result.BenefitCostForDependentsOnly, Is.EqualTo(950.00m)); Assert.That(result.TotalBenefitsCostPerYear, Is.EqualTo(1850.00m)); Assert.That(result.TotalEmployeeCostPerPayPeriod, Is.EqualTo(2071.15m)); Assert.That(result.TotalEmployeeCostPerYear, Is.EqualTo(53850.00m)); Assert.That(result.ErrorDetails, Is.Null); Assert.That(result.EmployeeData, !Is.Null); }
public void Test_GetTotalEmployeeCostDataThreeDependentsNoDiscount() { var employeeData = new EmployeeData("sam", "person") { Dependents = new List <Person> { new Person("george", "dependent"), new Person("four", "three"), new Person("james", "brown") } }; BenefitsService benefitsService = new BenefitsService(); var result = benefitsService.GetEmployeeCost(employeeData); Assert.That(result.BenefitCostForEmployeeOnly, Is.EqualTo(1000.00m)); Assert.That(result.BenefitCostForDependentsOnly, Is.EqualTo(1500.00m)); Assert.That(result.TotalBenefitsCostPerYear, Is.EqualTo(2500.00m)); Assert.That(result.TotalEmployeeCostPerPayPeriod, Is.EqualTo(2096.15m)); Assert.That(result.TotalEmployeeCostPerYear, Is.EqualTo(54500.00m)); Assert.That(result.ErrorDetails, Is.Null); Assert.That(result.EmployeeData, !Is.Null); }