split DownstreamTemplate into DownstreamPathTemplate, DownstreamScheme, DownstreamHost and DownstreamPort in order to prepare for service discovery

This commit is contained in:
TomPallister
2017-01-21 09:59:47 +00:00
parent 044b609ea9
commit 0f71c040d9
53 changed files with 767 additions and 258 deletions

View File

@ -44,7 +44,7 @@ namespace Ocelot.UnitTests.Configuration
private void ThenTheConfigurationIsReturned()
{
_getResult.Data.ReRoutes[0].DownstreamTemplate.ShouldBe("initial");
_getResult.Data.ReRoutes[0].DownstreamPathTemplate.Value.ShouldBe("initial");
}
private void WhenIGetTheConfiguration()
@ -75,16 +75,16 @@ namespace Ocelot.UnitTests.Configuration
class FakeConfig : IOcelotConfiguration
{
private readonly string _downstreamTemplate;
private readonly string _downstreamTemplatePath;
public FakeConfig(string downstreamTemplate)
public FakeConfig(string downstreamTemplatePath)
{
_downstreamTemplate = downstreamTemplate;
_downstreamTemplatePath = downstreamTemplatePath;
}
public List<ReRoute> ReRoutes => new List<ReRoute>
{
new ReRouteBuilder().WithDownstreamTemplate(_downstreamTemplate).Build()
new ReRouteBuilder().WithDownstreamPathTemplate(_downstreamTemplatePath).Build()
};
}
}