Пример #1
0
        public PayrollResult RunPayroll(BiWeeklyPayPeriod payPeriod, IEnumerable <Timecard> timecards)
        {
            var result = new PayrollResult();

            foreach (var timecard in timecards)
            {
                result.Paychecks.Add(new Paycheck
                {
                    Employee = timecard.Employee,
                    Amount   = timecard.CalculatePay(timecard, payPeriod)
                });
            }
            return(result);
        }
Пример #2
0
 private void When_I_run_payroll()
 {
     var system = new PayrollSystem();
     _payrollResult = system.RunPayroll(_payPeriod, new[] { _timecard });
 }
Пример #3
0
 public PayrollResult RunPayroll(BiWeeklyPayPeriod payPeriod, IEnumerable<Timecard> timecards)
 {
     var result = new PayrollResult();
     foreach (var timecard in timecards)
     {
         result.Paychecks.Add(new Paycheck
                                  {
                                      Employee = timecard.Employee,
                                      Amount = timecard.CalculatePay(timecard, payPeriod)
                                  });
     }
     return result;
 }
Пример #4
0
        private void When_I_run_payroll()
        {
            var system = new PayrollSystem();

            _payrollResult = system.RunPayroll(_payPeriod, new[] { _timecard });
        }