public WhenRunningThePopulatorWithNotFoundResponses(
            NotFoundRedisPopulatorFixture fixture,
            ITestOutputHelper xUnitLogger)
            : base(LastChangedList.CreateInMemoryContext())
        {
            _fixture           = fixture;
            _httpClientHandler = fixture.MockHttpClientHandler(Records);
            _redisBatch        = RedisFixture.MockRedisBatch();

            var logger            = FakePopulatorRunnerLogger.CreateLogger(xUnitLogger);
            var redisStoreFactory = RedisFixture.MockStoreFactory(_redisBatch.Object);
            var configuration     = fixture.MockConfiguration();

            var runner = new PopulatorRunner(
                new FakeRepository(Context),
                redisStoreFactory,
                _httpClientHandler.Object,
                configuration,
                logger);

            runner.RunAsync(CancellationToken.None).GetAwaiter().GetResult();

            for (var i = 0; i < 9; i++)
            {
                Thread.Sleep(2000);
                runner.RunAsync(CancellationToken.None).GetAwaiter().GetResult();
            }
        }
Exemplo n.º 2
0
        public GivenABatchWasAlreadyStarted()
        {
            _sut = new RedisStore(
                RedisFixture.MockConnectionMultiplexer(RedisFixture.MockRedisBatch().Object),
                ETagFixture.MockETagGenerator());

            _sut.CreateBatch();
        }
Exemplo n.º 3
0
 public GiveNoBatchWasStarted()
 {
     _sut = new RedisStore(
         RedisFixture.MockConnectionMultiplexer(RedisFixture.MockRedisBatch().Object),
         ETagFixture.MockETagGenerator());
 }