public PeriodicCacheCleanerFixture() {
      _fakeSessionCache = A.Fake<IInProcSessionCache>();
      _fakePeriodicTaskFactory = A.Fake<IPeriodicTaskFactory>();
      _fakePeriodicTask = A.Fake<IPeriodicTask>();
      _fakeCancellationTokenSourceFactory = A.Fake<ICancellationTokenSourceFactory>();
      _validConfiguration = new InProcSessionsConfiguration();

      _cancellationTokenSource = new CancellationTokenSource();
      A.CallTo(() => _fakeCancellationTokenSourceFactory.Create()).Returns(_cancellationTokenSource);
      A.CallTo(() => _fakePeriodicTaskFactory.Create(A<Action>._)).Returns(_fakePeriodicTask);

      _periodicCacheCleaner = new PeriodicCacheCleaner(_validConfiguration, _fakeSessionCache, _fakePeriodicTaskFactory, _fakeCancellationTokenSourceFactory);
    }
        public PeriodicCacheCleanerFixture()
        {
            _fakeSessionCache                   = A.Fake <IInProcSessionCache>();
            _fakePeriodicTaskFactory            = A.Fake <IPeriodicTaskFactory>();
            _fakePeriodicTask                   = A.Fake <IPeriodicTask>();
            _fakeCancellationTokenSourceFactory = A.Fake <ICancellationTokenSourceFactory>();
            _validConfiguration                 = new InProcSessionsConfiguration();

            _cancellationTokenSource = new CancellationTokenSource();
            A.CallTo(() => _fakeCancellationTokenSourceFactory.Create()).Returns(_cancellationTokenSource);
            A.CallTo(() => _fakePeriodicTaskFactory.Create(A <Action> ._)).Returns(_fakePeriodicTask);

            _periodicCacheCleaner = new PeriodicCacheCleaner(_validConfiguration, _fakeSessionCache, _fakePeriodicTaskFactory, _fakeCancellationTokenSourceFactory);
        }