public void EmployeeManagerGetEmpLogin() { //Grabs the fake emp id int ID = TestCleanupAccessor.getTestEmp(); //Gets the entire Employee Record by login info Employee orig = myManager.GetEmployeeLogin(ID, Password); //Asserts that the record returned matches the one in setup. Assert.AreEqual("Test", orig.FirstName); }
public void EmployeeManagerEditEmployee() { //Grabs the fake emp id int ID = TestCleanupAccessor.getTestEmp(); //Gets the entire Employee Record Employee orig = EmployeeAccessor.GetEmployee(ID); //Creates a new employee object with the original properties, update the active property to false. Employee newEmp = new Employee(orig.FirstName, orig.LastName, orig.Password, (int)orig.Level, false); //calls to manager. ResultsEdit result = myManager.EditCurrentEmployee(orig, newEmp); //Asserts that the update went through Assert.AreEqual(ResultsEdit.Success, result); }