public BySessionIdCookieIdentificationMethodFixture() {
   _fakeEncryptionProvider = A.Fake<IEncryptionProvider>();
   _fakeHmacProvider = A.Fake<IHmacProvider>();
   _validConfiguration = new InProcSessionsConfiguration();
   _fakeSessionIdentificationDataProvider = A.Fake<ISessionIdentificationDataProvider>();
   _fakeHmacValidator = A.Fake<IHmacValidator>();
   _fakeSessionIdFactory = A.Fake<ISessionIdFactory>();
   _fakeCookieFactory = A.Fake<ICookieFactory>();
   _bySessionIdCookieIdentificationMethod = new BySessionIdCookieIdentificationMethod(
     _fakeEncryptionProvider,
     _fakeHmacProvider,
     _fakeSessionIdentificationDataProvider,
     _fakeHmacValidator,
     _fakeSessionIdFactory,
     _fakeCookieFactory);
   _cookieName = "TheNameOfTheCookie";
   _bySessionIdCookieIdentificationMethod.CookieName = _cookieName;
 }
 public BySessionIdCookieIdentificationMethodFixture()
 {
     _fakeEncryptionProvider = A.Fake <IEncryptionProvider>();
     _fakeHmacProvider       = A.Fake <IHmacProvider>();
     _validConfiguration     = new InProcSessionsConfiguration();
     _fakeSessionIdentificationDataProvider = A.Fake <ISessionIdentificationDataProvider>();
     _fakeHmacValidator    = A.Fake <IHmacValidator>();
     _fakeSessionIdFactory = A.Fake <ISessionIdFactory>();
     _fakeCookieFactory    = A.Fake <ICookieFactory>();
     _bySessionIdCookieIdentificationMethod = new BySessionIdCookieIdentificationMethod(
         _fakeEncryptionProvider,
         _fakeHmacProvider,
         _fakeSessionIdentificationDataProvider,
         _fakeHmacValidator,
         _fakeSessionIdFactory,
         _fakeCookieFactory);
     _cookieName = "TheNameOfTheCookie";
     _bySessionIdCookieIdentificationMethod.CookieName = _cookieName;
 }
        public void On_creation_sets_default_cookie_name()
        {
            var newInstance = new BySessionIdCookieIdentificationMethod(_fakeEncryptionProvider, _fakeHmacProvider, _fakeSessionIdentificationDataProvider, _fakeHmacValidator, _fakeSessionIdFactory, _fakeCookieFactory);

            Assert.Equal("_nsid", newInstance.CookieName);
        }
 public void On_creation_sets_default_cookie_name() {
   var newInstance = new BySessionIdCookieIdentificationMethod(_fakeEncryptionProvider, _fakeHmacProvider, _fakeSessionIdentificationDataProvider, _fakeHmacValidator, _fakeSessionIdFactory, _fakeCookieFactory);
   Assert.Equal("_nsid", newInstance.CookieName);
 }