private void LogonWithUserNameAndPassword(string username, string password) { _logOnModel = new LogOnModel { UserName = username, Password = password, }; Logon(); }
public ActionResult LogOn(LogOnModel model) { if (ModelState.IsValid) { if (UserAuthenticationService.SignIn(model.UserName, model.Password, model.RememberMe)) { return RedirectToAction("Index", "Home"); } ShowLoginError(); } // If we got this far, something failed, redisplay form return View(model); }
public AccountControllerTest() { _logOnModel = new LogOnModel { UserName = _userName, Password = _password, RememberMe = false, }; _userAuthenticationService = new Mock<IUserAuthenticationService>(); _sessionStateRepository = new Mock<ISessionStateRepository>(); _accountControllerSUT = new AccountController(_userAuthenticationService.Object, _sessionStateRepository.Object); }
public AccountControllerTest() { _logOnModel = new LogOnModel { UserName = _userName, Password = _password, }; _userAuthenticationService = new Mock<IUserAuthenticationService>(); _sessionStateRepository = new Mock<ISessionStateRepository>(); _accountMapper = new Mock<IAccountMapper>(); _accountControllerSUT = new AccountController(_userAuthenticationService.Object, _sessionStateRepository.Object, _accountMapper.Object); AccountMapper.ConfigAutoMapper(); }
public void LogonWithAccountTable(Table table) { _logOnModel = table.CreateInstance<LogOnModel>(); Logon(); }