public void AddServiceCharge() { int empId = 2; app.ExexcuteTransaction("addHourlyEmployee", RequestFactory.rf.MakeHourlyEmployeeRequest(empId, "Bob", "Home", 50)); Employee e = PayrollDb.GetEmployee(empId); Assert.IsNotNull(e); UnionAffiliation af = new UnionAffiliation(50, 100.50); e.Affiliation = af; int memeberId = 86; PayrollDb.AddUnionMember(memeberId, e); app.ExexcuteTransaction("addServiceCharge", RequestFactory.rf.MakeServiceChargeRequest(memeberId, new DateTime(2005, 8, 8), 12.95)); ServiceCharge sc = af.GetServiceCharge(new DateTime(2005, 8, 8)); Assert.IsNotNull(sc); Assert.AreEqual(12.95, sc.Amount, .001); }
protected override void RecordMembership(Employee e) { PayrollDb.AddUnionMember(memberId, e); }