Пример #1
0
        public void TestAddServiceCharge()
        {
            int empId           = 2;
            AddHourlyEmployee t = new AddHourlyEmployee(empId, "Bill", "Home", 15.75m);

            t.Execute();
            Employee e = PayrollDatabase.GetEmployee(empId);

            Assert.That(e, Is.Not.Null);

            UnionAffiliation ua = new UnionAffiliation();

            e.Affiliation = ua;
            int memberId = 86;

            PayrollDatabase.AddUnionMember(memberId, empId);

            ServiceChargeTransaction sct = new ServiceChargeTransaction(memberId, new DateTime(2020, 02, 02), 12.95m);

            sct.Execute();
            ServiceCharge sc = ua.GetServiceCharge(new DateTime(2020, 02, 02));

            Assert.That(sc, Is.Not.Null);
            Assert.That(sc.Amount, Is.EqualTo(12.95m));
        }
Пример #2
0
 public void AddServiceCharge(ServiceCharge sc)
 {
     servicecharges[sc.Date] = sc;
 }