public void SetUp()
        {
            _security = MockRepository.GenerateStub<ISecurityDataService>();
            _authContext = MockRepository.GenerateMock<IAuthenticationContext>();
            _resolver = MockRepository.GenerateMock<IUrlResolver>();
            _controller = new LoginController(_security, _authContext, _resolver);

            _loginModel = new LoginViewModel();
            _security.Stub(s => s.AuthenticateForUserId("foo", "bar")).Return(null);
        }
        public void SetUp()
        {
            _security = MockRepository.GenerateStub<ISecurityDataService>();
            _authContext = MockRepository.GenerateMock<IAuthenticationContext>();
            _resolver = MockRepository.GenerateMock<IUrlResolver>();
            _controller = new LoginController(_security, _authContext, _resolver);

            _userId = Guid.NewGuid();
            _security.Stub(s => s.AuthenticateForUserId("foo", "bar")).Return(_userId);

            _returnUrl = "TESTRETURN";
            _loginModel = new LoginViewModel {Username = "******", Password = "******", RememberMeChecked = true, ReturnUrl=_returnUrl};

            _result = _controller.Index(_loginModel);
        }