예제 #1
0
        public async Task AddServiceCharge()
        {
            int empId           = 4;
            AddHourlyEmployee t = new AddHourlyEmployee(empId, "Bill", "Home", 15.25);
            await t.ExecuteAsync();

            Employee e = await PayrollDatabase.GetEmployeeAsync(empId);

            Assert.NotNull(e);
            UnionAffiliation af = new UnionAffiliation();

            e.Affiliation = af;
            int memberId = 86; // Maxwell Smart
            await PayrollDatabase.AddUnionMemberAsync(memberId, e);

            ServiceChargeTransaction sct = new ServiceChargeTransaction(memberId, new DateTime(2005, 8, 8), 12.95);
            await sct.ExecuteAsync();

            ServiceCharge sc = af.GetServiceCharge(new DateTime(2005, 8, 8));

            Assert.NotNull(sc);
            Assert.Equal(12.95, sc.Amount);
        }
예제 #2
0
 protected override async Task RecordMembershipAsync(Employee e)
 {
     await PayrollDatabase.AddUnionMemberAsync(MemberId, e);
 }