changed upstream http method to use httpmethod class in .net

This commit is contained in:
Tom Gardham-Pallister
2017-02-07 18:30:21 +00:00
parent bbb808eb51
commit 33ce162693
17 changed files with 105 additions and 21 deletions

View File

@ -29,6 +29,7 @@ namespace Ocelot.UnitTests.LoadBalancer
{
var reRoute = new ReRouteBuilder()
.WithServiceProviderConfiguraion(new ServiceProviderConfiguraionBuilder().Build())
.WithUpstreamHttpMethod("Get")
.Build();
this.Given(x => x.GivenAReRoute(reRoute))
@ -43,6 +44,7 @@ namespace Ocelot.UnitTests.LoadBalancer
{
var reRoute = new ReRouteBuilder()
.WithLoadBalancer("RoundRobin")
.WithUpstreamHttpMethod("Get")
.WithServiceProviderConfiguraion(new ServiceProviderConfiguraionBuilder().Build())
.Build();
@ -58,6 +60,7 @@ namespace Ocelot.UnitTests.LoadBalancer
{
var reRoute = new ReRouteBuilder()
.WithLoadBalancer("LeastConnection")
.WithUpstreamHttpMethod("Get")
.WithServiceProviderConfiguraion(new ServiceProviderConfiguraionBuilder().Build())
.Build();
@ -73,6 +76,7 @@ namespace Ocelot.UnitTests.LoadBalancer
{
var reRoute = new ReRouteBuilder()
.WithLoadBalancer("RoundRobin")
.WithUpstreamHttpMethod("Get")
.WithServiceProviderConfiguraion(new ServiceProviderConfiguraionBuilder().Build())
.Build();

View File

@ -69,6 +69,7 @@ namespace Ocelot.UnitTests.LoadBalancer
{
var downstreamRoute = new DownstreamRoute(new List<Ocelot.DownstreamRouteFinder.UrlMatcher.UrlPathPlaceholderNameAndValue>(),
new ReRouteBuilder()
.WithUpstreamHttpMethod("Get")
.Build());
this.Given(x => x.GivenTheDownStreamUrlIs("any old string"))
@ -85,6 +86,7 @@ namespace Ocelot.UnitTests.LoadBalancer
{
var downstreamRoute = new DownstreamRoute(new List<Ocelot.DownstreamRouteFinder.UrlMatcher.UrlPathPlaceholderNameAndValue>(),
new ReRouteBuilder()
.WithUpstreamHttpMethod("Get")
.Build());
this.Given(x => x.GivenTheDownStreamUrlIs("any old string"))
@ -100,6 +102,7 @@ namespace Ocelot.UnitTests.LoadBalancer
{
var downstreamRoute = new DownstreamRoute(new List<Ocelot.DownstreamRouteFinder.UrlMatcher.UrlPathPlaceholderNameAndValue>(),
new ReRouteBuilder()
.WithUpstreamHttpMethod("Get")
.Build());
this.Given(x => x.GivenTheDownStreamUrlIs("any old string"))