public void EmployeeRegister_ShouldAddEmployees() { var employees = EmployeeFactory.GetEmployeesRecord(); var employeeRegister = new EmployeeRegister(); employeeRegister.AddEmployeesRecord(employees); Assert.Equal(employees, employeeRegister.GetEmployeesRecord()); }
public void EmployeeRegister_ShouldReadEmployee() { var employees = EmployeeFactory.GetEmployeesRecord(); var employeeRegister = new EmployeeRegister(); employeeRegister.AddEmployeesRecord(employees); Assert.NotEqual(EmployeeFactory.GetEmployeeRecord(), employeeRegister.GetEmployeeRecord(5)); }
public void EmployeeFixture_ShouldUpdateEmployee() { var employees = EmployeeFactory.GetEmployeesRecord(); var employeeRegister = new EmployeeRegister(); employeeRegister.AddEmployeesRecord(employees); var newEmployee = new Employee() { EmpId = 5, EmpName = "emp5", EmpRole = EmployeeRole.Admin }; employeeRegister.UpdateEmployeeRecord(newEmployee); Assert.Equal(newEmployee, employeeRegister.GetEmployeeRecord(5)); }