Merge branch 'release/13.8.0'

This commit is contained in:
TomPallister
2019-10-28 07:34:56 +00:00
93 changed files with 1747 additions and 553 deletions

View File

@ -2,9 +2,10 @@
{
using global::CacheManager.Core;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Hosting.Internal;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting.Internal;
using Moq;
using Ocelot.Cache;
using Ocelot.Cache.CacheManager;
using Ocelot.Configuration;
@ -14,6 +15,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using TestStack.BDDfy;
using Xunit;
@ -30,11 +32,21 @@
{
_configRoot = new ConfigurationRoot(new List<IConfigurationProvider>());
_services = new ServiceCollection();
_services.AddSingleton<IHostingEnvironment, HostingEnvironment>();
_services.AddSingleton<IWebHostEnvironment>(GetHostingEnvironment());
_services.AddSingleton(_configRoot);
_maxRetries = 100;
}
private IWebHostEnvironment GetHostingEnvironment()
{
var environment = new Mock<IWebHostEnvironment>();
environment
.Setup(e => e.ApplicationName)
.Returns(typeof(OcelotBuilderExtensionsTests).GetTypeInfo().Assembly.GetName().Name);
return environment.Object;
}
[Fact]
public void should_set_up_cache_manager()
{