public void interacts_with_webapp_to_handle_login()
        {
            var request = new LoginRequest { UserName = "******", Password = "******" };

            _interactor.Login(request);

            _page.Verify(p => p.Login(request.UserName, request.Password));
        }
Exemplo n.º 2
0
        public void Login(LoginRequest request)
        {
            LoginResponse response = ExecuteLogin(request);

            if (response.WasSuccessful)
            {
                _view.SetCurrentWeek(response);
            }
            else
            {
                _view.ShowErrorMessage(response.ErrorMessage);
            }
        }
Exemplo n.º 3
0
        private LoginResponse ExecuteLogin(LoginRequest request)
        {
            if (_page.Login(request.UserName, request.Password))
            {
                return BuildResponseForSuccessfulLogin();
            }

            return BuildResponseForFailedLogin();
        }
Exemplo n.º 4
0
        private void btnLogin_Click(object sender, EventArgs e)
        {
            var interactor = new LoginInteractor(this, _appDriver);

            var request = new LoginRequest
                              {
                                  UserName = tbUserName.Text,
                                  Password = tbPassword.Text
                              };

             interactor.Login(request);
        }