public void User_Locked_After_3_Attempts() { _mockContext.Setup(x => x.User).Returns(_mockSet.Object); var db = new HRSystemContext(); var username = "******"; var service = new LoginService(db); for (int i = 0; i < 3; i++) { service.HandleFailedLogin(username); } var user = db.User.Where(x => x.Username == username).SingleOrDefault(); Assert.AreEqual(false, user.IsActive); }
public UserService(HRSystemContext db) { _db = db; }
public UserService(ISessionService sessionService) { _db = new HRSystemContext(); _appUser = sessionService.GetSession(); }
public TblStudentDetailsController(HRSystemContext context) { _context = context; }
public LoginService(HRSystemContext db) { _db = db; }
public LoginService(HRSystemContext db, IAuthenticationService authentication, ISessionService session) { _db = db; _authenticationService = authentication; _sessionService = session; }
public SessionService() { _db = new HRSystemContext(); }
public SessionService(HRSystemContext db) { _db = db; }
public AuthenticationService() { _db = new HRSystemContext(); }
public AuthenticationService(HRSystemContext db) { _db = db; }