public void Execute()
        {
            Employee e = new Employee(empid, name, address);
            PaymentClassification pc = MakeClassification();
            PaymentSchedule ps = MakeSchedule();
            PaymentMethod pm = new HoldMethod();

            e.Classification = pc;
            e.Schedule = ps;
            e.Method = pm;
            PayrollDatabase.AddEmployee(empid, e);
        }
 public void EmployeeToString()
 {
     int empid = 1;
     Employee e = new Employee(empid, "Natasha", "Slancy");
     Assert.AreEqual("Emp#: 1 Natasha Slancy Paid by ", e.ToString());
 }
 public void TestEmployee()
 {
     int empid = 1;
     Employee e = new Employee(empid, "Natasha", "Slancy");
     Assert.AreEqual("Natasha", e.Name);
     Assert.AreEqual("Slancy", e.Address);
     Assert.AreEqual(empid, e.EmpId);
 }
예제 #4
0
 public static void AddEmployee(int id, Employee employee)
 {
     employees[id] = employee;
 }