mirror of
https://github.com/nsnail/Ocelot.git
synced 2025-06-19 10:38:15 +08:00
Merge branch 'master' into develop
This commit is contained in:
@ -4,6 +4,7 @@ using Ocelot.Configuration.Builder;
|
||||
using Ocelot.LoadBalancer.LoadBalancers;
|
||||
using Ocelot.ServiceDiscovery;
|
||||
using Shouldly;
|
||||
using System.Collections.Generic;
|
||||
using TestStack.BDDfy;
|
||||
using Xunit;
|
||||
|
||||
@ -29,7 +30,7 @@ namespace Ocelot.UnitTests.LoadBalancer
|
||||
{
|
||||
var reRoute = new ReRouteBuilder()
|
||||
.WithServiceProviderConfiguraion(new ServiceProviderConfigurationBuilder().Build())
|
||||
.WithUpstreamHttpMethod("Get")
|
||||
.WithUpstreamHttpMethod(new List<string> { "Get" })
|
||||
.Build();
|
||||
|
||||
this.Given(x => x.GivenAReRoute(reRoute))
|
||||
@ -44,7 +45,7 @@ namespace Ocelot.UnitTests.LoadBalancer
|
||||
{
|
||||
var reRoute = new ReRouteBuilder()
|
||||
.WithLoadBalancer("RoundRobin")
|
||||
.WithUpstreamHttpMethod("Get")
|
||||
.WithUpstreamHttpMethod(new List<string> { "Get" })
|
||||
.WithServiceProviderConfiguraion(new ServiceProviderConfigurationBuilder().Build())
|
||||
.Build();
|
||||
|
||||
@ -60,7 +61,7 @@ namespace Ocelot.UnitTests.LoadBalancer
|
||||
{
|
||||
var reRoute = new ReRouteBuilder()
|
||||
.WithLoadBalancer("LeastConnection")
|
||||
.WithUpstreamHttpMethod("Get")
|
||||
.WithUpstreamHttpMethod(new List<string> { "Get" })
|
||||
.WithServiceProviderConfiguraion(new ServiceProviderConfigurationBuilder().Build())
|
||||
.Build();
|
||||
|
||||
@ -76,7 +77,7 @@ namespace Ocelot.UnitTests.LoadBalancer
|
||||
{
|
||||
var reRoute = new ReRouteBuilder()
|
||||
.WithLoadBalancer("RoundRobin")
|
||||
.WithUpstreamHttpMethod("Get")
|
||||
.WithUpstreamHttpMethod(new List<string> { "Get" })
|
||||
.WithServiceProviderConfiguraion(new ServiceProviderConfigurationBuilder().Build())
|
||||
.Build();
|
||||
|
||||
|
@ -73,7 +73,7 @@ namespace Ocelot.UnitTests.LoadBalancer
|
||||
{
|
||||
var downstreamRoute = new DownstreamRoute(new List<Ocelot.DownstreamRouteFinder.UrlMatcher.UrlPathPlaceholderNameAndValue>(),
|
||||
new ReRouteBuilder()
|
||||
.WithUpstreamHttpMethod("Get")
|
||||
.WithUpstreamHttpMethod(new List<string> { "Get" })
|
||||
.Build());
|
||||
|
||||
this.Given(x => x.GivenTheDownStreamUrlIs("http://my.url/abc?q=123"))
|
||||
@ -90,7 +90,7 @@ namespace Ocelot.UnitTests.LoadBalancer
|
||||
{
|
||||
var downstreamRoute = new DownstreamRoute(new List<Ocelot.DownstreamRouteFinder.UrlMatcher.UrlPathPlaceholderNameAndValue>(),
|
||||
new ReRouteBuilder()
|
||||
.WithUpstreamHttpMethod("Get")
|
||||
.WithUpstreamHttpMethod(new List<string> { "Get" })
|
||||
.Build());
|
||||
|
||||
this.Given(x => x.GivenTheDownStreamUrlIs("http://my.url/abc?q=123"))
|
||||
@ -106,7 +106,7 @@ namespace Ocelot.UnitTests.LoadBalancer
|
||||
{
|
||||
var downstreamRoute = new DownstreamRoute(new List<Ocelot.DownstreamRouteFinder.UrlMatcher.UrlPathPlaceholderNameAndValue>(),
|
||||
new ReRouteBuilder()
|
||||
.WithUpstreamHttpMethod("Get")
|
||||
.WithUpstreamHttpMethod(new List<string> { "Get" })
|
||||
.Build());
|
||||
|
||||
this.Given(x => x.GivenTheDownStreamUrlIs("http://my.url/abc?q=123"))
|
||||
|
Reference in New Issue
Block a user