Esempio n. 1
0
 public void TestPaySingleHourlyEmployeeOvertimeOneTimeCard()
 {
     int empId = 1;
     AddHourlyEmployee t = new AddHourlyEmployee(empId, "Билл", "Домашний адрес", 15.25);
     t.Execute();
     DateTime payDate = new DateTime(2001, 11, 9);
     TimeCardTransaction tc = new TimeCardTransaction(payDate, 9.0, empId);
     tc.Execute();
     PaydayTransaction pt = new PaydayTransaction(payDate);
     pt.Execute();
     ValidateHourlyPaycheck(pt, empId, payDate, (8 + 1.5) * 15.25);
 }
Esempio n. 2
0
 public void TimeCardTransaction()
 {
     int empId = 1;
     AddHourlyEmployee t = new AddHourlyEmployee(empId, "Bill", "Home", 15.25);
     t.Execute();
     TimeCardTransaction tct = new TimeCardTransaction(new DateTime(2015, 10, 31), 8.0, empId);
     tct.Execute();
     Employee e = PayrollDatabase.GetEmployee(empId);
     Assert.IsNotNull(e);
     PaymentClassification pc = e.Classification;
     Assert.IsTrue(pc is HourlyClassification);
     HourlyClassification hc = pc as HourlyClassification;
     TimeCard tc = hc.GetTimeCard(new DateTime(2015, 10, 31));
     Assert.IsNotNull(tc);
     Assert.AreEqual(8.0, tc.Hours);
 }
Esempio n. 3
0
 public void PaySingleHourlyEmployeeOneTimeCard()
 {
     int empId = 1;
     AddHourlyEmployee t = new AddHourlyEmployee(empId, "Билл", "Домашний адрес", 15.25);
     t.Execute();
     DateTime payDate = new DateTime(2015, 12, 4);
     TimeCardTransaction tc = new TimeCardTransaction(payDate, 2.0, empId);
     tc.Execute();
     PaydayTransaction pt = new PaydayTransaction(payDate);
     pt.Execute();
     ValidateHourlyPaycheck(pt, empId, payDate, 30.5);
 }