public FileConfigurationPollerTests() { var logger = new Mock <IOcelotLogger>(); _factory = new Mock <IOcelotLoggerFactory>(); _factory.Setup(x => x.CreateLogger <FileConfigurationPoller>()).Returns(logger.Object); _repo = new Mock <IFileConfigurationRepository>(); _fileConfig = new FileConfiguration(); _config = new Mock <IFileConfigurationPollerOptions>(); _repo.Setup(x => x.Get()).ReturnsAsync(new OkResponse <FileConfiguration>(_fileConfig)); _config.Setup(x => x.Delay).Returns(100); _internalConfigRepo = new Mock <IInternalConfigurationRepository>(); _internalConfigCreator = new Mock <IInternalConfigurationCreator>(); _internalConfigCreator.Setup(x => x.Create(It.IsAny <FileConfiguration>())).ReturnsAsync(new OkResponse <IInternalConfiguration>(_internalConfig)); _poller = new FileConfigurationPoller(_factory.Object, _repo.Object, _config.Object, _internalConfigRepo.Object, _internalConfigCreator.Object); }