public void LoginUser1() { var result = sut.Login(MockUser.testUser); Assert.IsTrue(result); MockConnection.CloseConnection(); }
public async void SetupTest() { // do everything to take us to the browser window... if (!(await _loginLogic.IsUserLoggedInAsync(ApplyLoggedInUser))) { _loginLogic.Login(ApplyLoggedInUser); } }
public void Login() { try { _view.ShowSpinner(true); _logic.Login(ApplyUser); } catch (Exception ex) { _view.HandleException(ex); } }
public ActionResult Index(LoginViewModel loginViewModel) { bool login = loginLogic.Login(loginViewModel); if (login) { HttpContext.Session.SetString("Email", loginViewModel.Email); HttpContext.Session.SetInt32("UserId", loginViewModel.UserId); return(RedirectToAction("Index", "Home")); } return(View()); }
public ActionResult Index(LoginViewModel user) { bool login = _loginLogic.Login(user); if (login) { HttpContext.Session.SetString("Email", user.Email); HttpContext.Session.SetInt32("UserId", user.UserId); System.Threading.Thread.Sleep(3500); return(RedirectToAction("Index", "Home")); } return(View()); }
public async Task <IActionResult> Login(LoginViewModel model) { if (ModelState.IsValid) { var user = new User { UserName = model.Username, PasswordHash = model.Password, }; await _loginLogic.Login(user); return(RedirectToAction("Index", "Home")); } ModelState.AddModelError(string.Empty, "Email en/of Wachtwoord is incorrect. Probeer het opnieuw."); return(View(model)); }
public void Login() { _view.ShowSpinner(true); _logic.Login(ApplyUser); }
public UserViewModel Login([FromBody] LoginUiCommand command) { return(_loginLogic.Login(command)); }