Change all ctor's to use IOcelotLoggerFactory

As part of #35 we are we are standardising on using IOcelotLoggerFactory
over the default ILogger for DI purposes. Following a sln search, the use
of ILogger was only found in one place (FileOcelotConfigurationCreator)
and it's corresponding tests.

This commit changes them and ensures the unit tests still pass.
This commit is contained in:
Marc Denman
2017-03-13 11:44:02 +00:00
parent c09cec67c6
commit 0ec7fc44ad
2 changed files with 8 additions and 6 deletions

View File

@ -8,6 +8,7 @@ using Ocelot.Configuration.Creator;
using Ocelot.Configuration.File;
using Ocelot.Configuration.Validator;
using Ocelot.LoadBalancer.LoadBalancers;
using Ocelot.Logging;
using Ocelot.Requester.QoS;
using Ocelot.Responses;
using Shouldly;
@ -22,7 +23,7 @@ namespace Ocelot.UnitTests.Configuration
private readonly Mock<IConfigurationValidator> _validator;
private Response<IOcelotConfiguration> _config;
private FileConfiguration _fileConfiguration;
private readonly Mock<ILogger<FileOcelotConfigurationCreator>> _logger;
private readonly Mock<IOcelotLoggerFactory> _logger;
private readonly FileOcelotConfigurationCreator _ocelotConfigurationCreator;
private readonly Mock<ILoadBalancerFactory> _loadBalancerFactory;
private readonly Mock<ILoadBalancerHouse> _loadBalancerHouse;
@ -44,7 +45,7 @@ namespace Ocelot.UnitTests.Configuration
_qosProviderFactory = new Mock<IQoSProviderFactory>();
_qosProviderHouse = new Mock<IQosProviderHouse>();
_qosProvider = new Mock<IQoSProvider>();
_logger = new Mock<ILogger<FileOcelotConfigurationCreator>>();
_logger = new Mock<IOcelotLoggerFactory>();
_validator = new Mock<IConfigurationValidator>();
_fileConfig = new Mock<IOptions<FileConfiguration>>();
_loadBalancerFactory = new Mock<ILoadBalancerFactory>();