public void SetUp()
 {
     _systemClock = MockRepository.GenerateMock<ISystemClock>();
     _systemClock.Stub(arg => arg.LocalDateTime).Return(new DateTime(2012, 1, 1, 0, 0, 0, DateTimeKind.Local));
     _helper = new FormsAuthenticationHelper(_systemClock);
     _cookie = _helper.GenerateTicket(_systemClock.LocalDateTime.AddYears(1), @"{ ""P"": ""V"" }", persistent:true);
 }
			public void SetUp()
			{
				_systemClock = MockRepository.GenerateMock<ISystemClock>();
				_configuration = MockRepository.GenerateMock<IFormsAuthenticationConfiguration>();
				var helper = new FormsAuthenticationHelper(_configuration, _systemClock);
				Cookie cookie = helper.GenerateTicket(DateTime.Now.AddYears(-1), @"{ ""P"": ""V"" }");

				_request = MockRepository.GenerateMock<HttpRequestBase>();
				_request.Stub(arg => arg.Cookies).Return(new HttpCookieCollection { cookie.GetHttpCookie() });
				_authenticationData = new FormsAuthenticationData<dynamic>(_configuration);
			}
			public void SetUp()
			{
				_configuration = MockRepository.GenerateMock<IFormsAuthenticationConfiguration>();
				_configuration.Stub(arg => arg.CookieName).Return("name");
				_configuration.Stub(arg => arg.CookiePath).Return("/path");
				_systemClock = MockRepository.GenerateMock<ISystemClock>();

				DateTime now = DateTime.Now;

				_systemClock.Stub(arg => arg.LocalDateTime).Return(now);
				_helper = new FormsAuthenticationHelper(_configuration, _systemClock);
				_request = MockRepository.GenerateMock<HttpRequestBase>();
				_request.Stub(arg => arg.Cookies).Return(new HttpCookieCollection { _helper.GenerateTicket(now.AddDays(1)).GetHttpCookie() });
			}
			public void SetUp()
			{
				_configuration = MockRepository.GenerateMock<IFormsAuthenticationConfiguration>();
				_configuration.Stub(arg => arg.CookieDomain).Return("domain.com");
				_configuration.Stub(arg => arg.CookieName).Return("name");
				_configuration.Stub(arg => arg.CookiePath).Return("/path");
				_configuration.Stub(arg => arg.Persistent).Return(true);
				_configuration.Stub(arg => arg.RequireSsl).Return(true);
				_configuration.Stub(arg => arg.SlidingExpiration).Return(true);
				_systemClock = MockRepository.GenerateMock<ISystemClock>();
				_systemClock.Stub(arg => arg.LocalDateTime).Return(new DateTime(2012, 1, 1, 0, 0, 0, DateTimeKind.Local));
				_helper = new FormsAuthenticationHelper(_configuration, _systemClock);
				_cookie = _helper.GenerateTicket(_systemClock.LocalDateTime.AddYears(1), @"{ ""P"": ""V"" }");
				_response = MockRepository.GenerateMock<HttpResponseBase>();
				_response.Stub(arg => arg.Cookies).Return(new HttpCookieCollection { _cookie.GetHttpCookie() });
			}