public void TestSalariedUnionMemberDuesFridaysTest() { int empId = 1; var t = new AddSalariedEmployee(empId, "Bob", "Home", 1000.00m); t.Execute(); int memberId = 7734; var cmt = new ChangeMemberTransaction(empId, memberId, 9.42m); cmt.Execute(); DateTime payDate = new DateTime(2020, 01, 31); var pt = new PaydayTransaction(payDate); pt.Execute(); //5 Fridays in Jan var unionDues = 5m * 9.42m; ValidatePaycheck(pt, empId, payDate, 1000m, unionDues); }
public void TestAddSalariedEmployee() { int empId = 1; AddEmployeeTransaction t = new AddSalariedEmployee(empId, "Bob", "Home", 1000); t.Execute(); Employee e = PayrollDatabase.GetEmployee(empId); Assert.That(e.Name, Is.EqualTo("Bob")); PaymentClassification pc = e.Classification; Assert.That(pc is SalariedClassification, Is.True); SalariedClassification sc = pc as SalariedClassification; Assert.That(sc.Salary, Is.EqualTo(1000)); PaymentSchedule ps = e.Schedule; Assert.That(ps is MonthlySchedule, Is.True); PaymentMethod pm = e.Method; Assert.That(pm is HoldMethod, Is.True); }