Ejemplo n.º 1
0
 private void ValidateHourlyPaycheck(PaydayTransaction pt, int empid, DateTime payDate, double pay)
 {
     Paycheck pc = pt.GetPaycheck(empid);
     Assert.IsNotNull(pc);
     Assert.AreEqual(payDate, pc.PayDate);
     Assert.AreEqual(pay, pc.GrossPay, .001);
     Assert.AreEqual("Hold", pc.GetField("Disposition"));
     Assert.AreEqual(0.0, pc.Deductions, .001);
     Assert.AreEqual(pay, pc.NetPay, .001);
 }
Ejemplo n.º 2
0
 public void PaySingleSalariedEmployeeOnWrongDate()
 {
     int empid = 1;
     AddSalariedEmployee t = new AddSalariedEmployee(empid, "Bob", "Home", 1000.00);
     t.Execute();
     DateTime payDate = new DateTime(2015, 11, 8);
     PaydayTransaction pt = new PaydayTransaction(payDate);
     pt.Execute();
     Paycheck pc = pt.GetPaycheck(empid);
     Assert.IsNull(pc);
 }
Ejemplo n.º 3
0
 public void PayingSingleHourlyEmployeeNoTimeCards()
 {
     int empid = 1;
     AddHourlyEmployee t = new AddHourlyEmployee(empid, "Билл", "Адрес", 15.25);
     t.Execute();
     DateTime payDate = new DateTime(2015, 11, 27);
     PaydayTransaction pt = new PaydayTransaction(payDate);
     pt.Execute();
     Paycheck pc = pt.GetPaycheck(empid);
     Assert.IsNotNull(pc);
     Assert.AreEqual(payDate, pc.PayDate);
     Assert.AreEqual(0.0, pc.GrossPay);
     Assert.AreEqual("Hold", pc.GetField("Disposition"));
     Assert.AreEqual(0.0, pc.Deductions, .001);
     Assert.AreEqual(0.0, pc.NetPay, .001);
 }
Ejemplo n.º 4
0
 public void PaySingleSalariedEmployee()
 {
     int empid = 1;
     AddSalariedEmployee t = new AddSalariedEmployee(empid, "Bill", "Home", 1000.00);
     t.Execute();
     DateTime payDate = new DateTime(2001, 11, 30);
     PaydayTransaction pt = new PaydayTransaction(payDate);
     pt.Execute();
     Paycheck pc = pt.GetPaycheck(empid);
     Assert.IsNotNull(pc);
     Assert.AreEqual(payDate, pc.PayDate);
     Assert.AreEqual(1000.00, pc.GrossPay, .001);
     Assert.AreEqual("Hold", pc.GetField("Disposition"));
     Assert.AreEqual(0.0, pc.Deductions, .001);
     Assert.AreEqual(1000.00, pc.NetPay, .001);
 }