コード例 #1
0
ファイル: Account.cs プロジェクト: yzpower/agilewizard
 private void LogonWithUserNameAndPassword(string username, string password)
 {
     _logOnModel = new LogOnModel
     {
         UserName = username,
         Password = password,
     };
     Logon();
 }
コード例 #2
0
 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);
 }
コード例 #3
0
        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);
        }
コード例 #4
0
        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();
        }
コード例 #5
0
ファイル: Account.cs プロジェクト: JohnCai/agilewizard
        public void LogonWithAccountTable(Table table)
        {
            _logOnModel = table.CreateInstance<LogOnModel>();

            Logon();
        }