public void AuthWithNotFoundManager() { EmployeeDetails employeeDetails = new EmployeeDetails() { Username = "******", Password = "******" }; var result = employeeManager.AuthenticationUser(employeeDetails); Assert.IsFalse(result); }
public HttpResponseMessage Authentication(EmployeeDetails employeeDetails) { var authUser = employeeManager.AuthenticationUser(employeeDetails); if (authUser == true) { return(Request.CreateResponse(HttpStatusCode.Created, "Employee has authenticated successfully")); } else { return(Request.CreateErrorResponse(HttpStatusCode.NotFound, "Invalid Username and Password")); } }