Exemplo n.º 1
0
        public void EmployeeGetEmployeeLoginAccess()
        {
            //Grabs the fake emp ID
            int      ID   = TestCleanupAccessor.getTestEmp();
            Employee fake = EmployeeAccessor.GetEmployeeLogin(ID, Password);

            //Asserts that the employee record being returned matches the fake employee record in the setup
            Assert.AreEqual("Test", fake.FirstName);
        }
Exemplo n.º 2
0
 /// <summary>
 /// Arik Chadima
 /// Created: 2015/03/03
 /// Attempts to fetch an employee with the given credentials from the access layer.
 /// Failure: ApplicationException if the login was bad, and SqlException of some kind if it's a connection issue.
 /// </summary>
 /// <param name="empId">The employee's ID matching an employee record</param>
 /// <param name="empPassword">the employee's Password that matches the same record as the employeeID</param>
 /// <returns>The employee object with the given credentials.</returns>
 public Employee GetEmployeeLogin(int empId, string empPassword)
 {
     try
     {
         return(EmployeeAccessor.GetEmployeeLogin(empId, empPassword));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }