Exemple #1
0
        private static object[] UpdateCase(EmployeeSeed oldSeed, EmployeeSeed newSeed)
        {
            var oldModel = EmployeeTestData.Model(oldSeed);

            var(newModel, dto) = EmployeeTestData.GenerateEmployee(newSeed);
            return(new object[] { oldModel, dto, newModel });
        }
            public EmployeeCase(EmployeeSeed seed,
                                decimal benefitCost,
                                int payPeriodsPerYear)
            {
                Model             = EmployeeTestData.Model(seed);
                BenefitCost       = benefitCost;
                PayPeriodsPerYear = payPeriodsPerYear;
                // If you're just repeating the same logic here that's
                // in the implementation, is this a good unit test?
                var grossPayPerPeriod = seed.Salary / PayPeriodsPerYear;

                BenefitCostPerPeriod = benefitCost / PayPeriodsPerYear;
                NetPayPerPeriod      = grossPayPerPeriod - BenefitCostPerPeriod;
            }
 public void TestInit()
 {
     employees = EmployeeTestData.GetListOf10Employees();
 }