renamed and removed some stuff that wasnt needed

This commit is contained in:
TomPallister
2016-10-18 16:22:51 +01:00
parent 84256e7bac
commit 707f1d6908
19 changed files with 87 additions and 107 deletions

View File

@ -8,6 +8,7 @@ using Microsoft.AspNetCore.TestHost;
using Microsoft.Extensions.DependencyInjection;
using Moq;
using Ocelot.Library.Builder;
using Ocelot.Library.Configuration;
using Ocelot.Library.DownstreamRouteFinder;
using Ocelot.Library.Middleware;
using Ocelot.Library.Repository;
@ -60,9 +61,9 @@ namespace Ocelot.UnitTests.Middleware
var downstreamRoute = new DownstreamRoute(new List<TemplateVariableNameAndValue>(),
new ReRouteBuilder()
.WithDownstreamTemplate("any old string")
.WithConfigurationHeaderExtractorProperties(new List<ConfigurationHeaderExtractorProperties>
.WithConfigurationHeaderExtractorProperties(new List<ClaimToHeader>
{
new ConfigurationHeaderExtractorProperties("UserId", "Subject", "", 0)
new ClaimToHeader("UserId", "Subject", "", 0)
})
.Build());
@ -76,7 +77,7 @@ namespace Ocelot.UnitTests.Middleware
private void GivenTheAddHeadersToRequestReturns(string claimValue)
{
_addHeaders
.Setup(x => x.SetHeadersOnContext(It.IsAny<List<ConfigurationHeaderExtractorProperties>>(),
.Setup(x => x.SetHeadersOnContext(It.IsAny<List<ClaimToHeader>>(),
It.IsAny<HttpContext>()))
.Returns(new OkResponse());
}
@ -84,7 +85,7 @@ namespace Ocelot.UnitTests.Middleware
private void ThenTheAddHeadersToRequestIsCalledCorrectly()
{
_addHeaders
.Verify(x => x.SetHeadersOnContext(It.IsAny<List<ConfigurationHeaderExtractorProperties>>(),
.Verify(x => x.SetHeadersOnContext(It.IsAny<List<ClaimToHeader>>(),
It.IsAny<HttpContext>()), Times.Once);
}