public void Set_adds_new_element()
        {
            var extraSession = new InProcSession(new SessionId(Guid.NewGuid(), false), A.Dummy <ISession>(), _nowUtc, TimeSpan.FromMinutes(15));

            _inProcSessionCache.Set(extraSession);

            var expected = _numberOfSessions + 1;
            var actual   = _inProcSessionCache.Count;

            Assert.Equal(expected, actual);
        }
    public InProcSessionCacheFixture() {
      _nowUtc = new DateTime(2015, 10, 20, 21, 36, 14, DateTimeKind.Utc);
      _fakeSystemClock = A.Fake<ISystemClock>();
      ConfigureSystemClock_ToReturn(_nowUtc);

      _inProcSessionCache = new InProcSessionCache(_fakeSystemClock);
      _expiredSession = new InProcSession(new SessionId(Guid.NewGuid(), false), A.Dummy<ISession>(), _nowUtc.AddMinutes(-20), TimeSpan.FromMinutes(15));
      _activeSession = new InProcSession(new SessionId(Guid.NewGuid(), false), A.Dummy<ISession>(), _nowUtc.AddMinutes(-3), TimeSpan.FromMinutes(15));
      _inProcSessionCache.Set(_expiredSession);
      _inProcSessionCache.Set(_activeSession);
      _numberOfSessions = 2;
    }
        public InProcSessionCacheFixture()
        {
            _nowUtc          = new DateTime(2015, 10, 20, 21, 36, 14, DateTimeKind.Utc);
            _fakeSystemClock = A.Fake <ISystemClock>();
            ConfigureSystemClock_ToReturn(_nowUtc);

            _inProcSessionCache = new InProcSessionCache(_fakeSystemClock);
            _expiredSession     = new InProcSession(new SessionId(Guid.NewGuid(), false), A.Dummy <ISession>(), _nowUtc.AddMinutes(-20), TimeSpan.FromMinutes(15));
            _activeSession      = new InProcSession(new SessionId(Guid.NewGuid(), false), A.Dummy <ISession>(), _nowUtc.AddMinutes(-3), TimeSpan.FromMinutes(15));
            _inProcSessionCache.Set(_expiredSession);
            _inProcSessionCache.Set(_activeSession);
            _numberOfSessions = 2;
        }