Exemplo n.º 1
0
        public void AddserviceCharge()
        {
            int empid           = 8;
            AddHourlyEmployee t = new AddHourlyEmployee(empid, "Bob", "Home", 23.41);

            t.Execute();
            Employee e = PayrollDatabase.GetEmployee_Static(empid);

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

            e.Affiliation = af;
            int memberId = 86;

            PayrollDatabase.AddUnionMember_Static(memberId, e);
            ServiceChargeTransaction sct = new ServiceChargeTransaction(memberId, new DateTime(2015, 11, 8), 12.95);

            sct.Execute();
            ServiceCharge sc = af.GetServiceCharge(new DateTime(2015, 11, 8));

            Assert.IsNotNull(sc);
            Assert.AreEqual(12.95, sc.Charge, .001);
        }