Exemplo n.º 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);
        }
Exemplo n.º 2
0
 private void When_I_run_payroll()
 {
     var system = new PayrollSystem();
     _payrollResult = system.RunPayroll(_payPeriod, new[] { _timecard });
 }
Exemplo n.º 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;
 }
Exemplo n.º 4
0
        private void When_I_run_payroll()
        {
            var system = new PayrollSystem();

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