public void AddEmployeeValidTest() { var employeeDal = new EmployeeDal(); var employee = new Employee { FirstName = "TestEmployeeForTestingAdd", LastName = "TestEmployeeForTesting", Username = "******", IsManager = false, Password = "******" }; employeeDal.AddEmployee(employee, "testpasswordforAddtesting"); var result = employeeDal.Authenticate(employee.Username, employee.Password); Assert.AreEqual(1, result); employeeDal.RemoveEmployee(employee.Username); var resultAfterDelete = employeeDal.Authenticate(employee.Username, employee.Password); this.cleanDataBase(employee); Assert.AreEqual(0, resultAfterDelete); }
public void AuthenticateEmployeeValidTest() { var employeeDal = new EmployeeDal(); var result = employeeDal.Authenticate("Username", "Password"); Assert.AreEqual(1, result); }