mirror of
https://github.com/nsnail/Ocelot.git
synced 2025-08-04 20:52:27 +08:00
Rename all ReRoute to Route to move closer to YARP +semver: breaking
This commit is contained in:
@ -6,7 +6,7 @@ namespace Ocelot.AcceptanceTests
|
||||
using System.Collections.Generic;
|
||||
using System.Net;
|
||||
using TestStack.BDDfy;
|
||||
using Xunit;
|
||||
using Xunit;
|
||||
|
||||
public class CaseSensitiveRoutingTests : IDisposable
|
||||
{
|
||||
@ -21,14 +21,14 @@ namespace Ocelot.AcceptanceTests
|
||||
|
||||
[Fact]
|
||||
public void should_return_response_200_when_global_ignore_case_sensitivity_set()
|
||||
{
|
||||
int port = RandomPortFinder.GetRandomPort();
|
||||
{
|
||||
int port = RandomPortFinder.GetRandomPort();
|
||||
|
||||
var configuration = new FileConfiguration
|
||||
{
|
||||
ReRoutes = new List<FileReRoute>
|
||||
Routes = new List<FileRoute>
|
||||
{
|
||||
new FileReRoute
|
||||
new FileRoute
|
||||
{
|
||||
DownstreamPathTemplate = "/api/products/{productId}",
|
||||
DownstreamHostAndPorts = new List<FileHostAndPort>
|
||||
@ -55,15 +55,15 @@ namespace Ocelot.AcceptanceTests
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void should_return_response_200_when_reroute_ignore_case_sensitivity_set()
|
||||
{
|
||||
int port = RandomPortFinder.GetRandomPort();
|
||||
public void should_return_response_200_when_route_ignore_case_sensitivity_set()
|
||||
{
|
||||
int port = RandomPortFinder.GetRandomPort();
|
||||
|
||||
var configuration = new FileConfiguration
|
||||
{
|
||||
ReRoutes = new List<FileReRoute>
|
||||
Routes = new List<FileRoute>
|
||||
{
|
||||
new FileReRoute
|
||||
new FileRoute
|
||||
{
|
||||
DownstreamPathTemplate = "/api/products/{productId}",
|
||||
DownstreamHostAndPorts = new List<FileHostAndPort>
|
||||
@ -77,7 +77,7 @@ namespace Ocelot.AcceptanceTests
|
||||
DownstreamScheme = "http",
|
||||
UpstreamPathTemplate = "/products/{productId}",
|
||||
UpstreamHttpMethod = new List<string> { "Get" },
|
||||
ReRouteIsCaseSensitive = false,
|
||||
RouteIsCaseSensitive = false,
|
||||
}
|
||||
}
|
||||
};
|
||||
@ -91,15 +91,15 @@ namespace Ocelot.AcceptanceTests
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void should_return_response_404_when_reroute_respect_case_sensitivity_set()
|
||||
{
|
||||
int port = RandomPortFinder.GetRandomPort();
|
||||
public void should_return_response_404_when_route_respect_case_sensitivity_set()
|
||||
{
|
||||
int port = RandomPortFinder.GetRandomPort();
|
||||
|
||||
var configuration = new FileConfiguration
|
||||
{
|
||||
ReRoutes = new List<FileReRoute>
|
||||
Routes = new List<FileRoute>
|
||||
{
|
||||
new FileReRoute
|
||||
new FileRoute
|
||||
{
|
||||
DownstreamPathTemplate = "/api/products/{productId}",
|
||||
DownstreamHostAndPorts = new List<FileHostAndPort>
|
||||
@ -113,7 +113,7 @@ namespace Ocelot.AcceptanceTests
|
||||
DownstreamScheme = "http",
|
||||
UpstreamPathTemplate = "/products/{productId}",
|
||||
UpstreamHttpMethod = new List<string> { "Get" },
|
||||
ReRouteIsCaseSensitive = true,
|
||||
RouteIsCaseSensitive = true,
|
||||
}
|
||||
}
|
||||
};
|
||||
@ -127,15 +127,15 @@ namespace Ocelot.AcceptanceTests
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void should_return_response_200_when_reroute_respect_case_sensitivity_set()
|
||||
{
|
||||
int port = RandomPortFinder.GetRandomPort();
|
||||
public void should_return_response_200_when_route_respect_case_sensitivity_set()
|
||||
{
|
||||
int port = RandomPortFinder.GetRandomPort();
|
||||
|
||||
var configuration = new FileConfiguration
|
||||
{
|
||||
ReRoutes = new List<FileReRoute>
|
||||
Routes = new List<FileRoute>
|
||||
{
|
||||
new FileReRoute
|
||||
new FileRoute
|
||||
{
|
||||
DownstreamPathTemplate = "/api/products/{productId}",
|
||||
DownstreamHostAndPorts = new List<FileHostAndPort>
|
||||
@ -149,7 +149,7 @@ namespace Ocelot.AcceptanceTests
|
||||
DownstreamScheme = "http",
|
||||
UpstreamPathTemplate = "/PRODUCTS/{productId}",
|
||||
UpstreamHttpMethod = new List<string> { "Get" },
|
||||
ReRouteIsCaseSensitive = true,
|
||||
RouteIsCaseSensitive = true,
|
||||
}
|
||||
}
|
||||
};
|
||||
@ -164,14 +164,14 @@ namespace Ocelot.AcceptanceTests
|
||||
|
||||
[Fact]
|
||||
public void should_return_response_404_when_global_respect_case_sensitivity_set()
|
||||
{
|
||||
int port = RandomPortFinder.GetRandomPort();
|
||||
{
|
||||
int port = RandomPortFinder.GetRandomPort();
|
||||
|
||||
var configuration = new FileConfiguration
|
||||
{
|
||||
ReRoutes = new List<FileReRoute>
|
||||
Routes = new List<FileRoute>
|
||||
{
|
||||
new FileReRoute
|
||||
new FileRoute
|
||||
{
|
||||
DownstreamPathTemplate = "/api/products/{productId}",
|
||||
DownstreamHostAndPorts = new List<FileHostAndPort>
|
||||
@ -185,7 +185,7 @@ namespace Ocelot.AcceptanceTests
|
||||
DownstreamScheme = "http",
|
||||
UpstreamPathTemplate = "/products/{productId}",
|
||||
UpstreamHttpMethod = new List<string> { "Get" },
|
||||
ReRouteIsCaseSensitive = true,
|
||||
RouteIsCaseSensitive = true,
|
||||
}
|
||||
}
|
||||
};
|
||||
@ -200,14 +200,14 @@ namespace Ocelot.AcceptanceTests
|
||||
|
||||
[Fact]
|
||||
public void should_return_response_200_when_global_respect_case_sensitivity_set()
|
||||
{
|
||||
int port = RandomPortFinder.GetRandomPort();
|
||||
{
|
||||
int port = RandomPortFinder.GetRandomPort();
|
||||
|
||||
var configuration = new FileConfiguration
|
||||
{
|
||||
ReRoutes = new List<FileReRoute>
|
||||
Routes = new List<FileRoute>
|
||||
{
|
||||
new FileReRoute
|
||||
new FileRoute
|
||||
{
|
||||
DownstreamPathTemplate = "/api/products/{productId}",
|
||||
DownstreamHostAndPorts = new List<FileHostAndPort>
|
||||
@ -221,7 +221,7 @@ namespace Ocelot.AcceptanceTests
|
||||
DownstreamScheme = "http",
|
||||
UpstreamPathTemplate = "/PRODUCTS/{productId}",
|
||||
UpstreamHttpMethod = new List<string> { "Get" },
|
||||
ReRouteIsCaseSensitive = true,
|
||||
RouteIsCaseSensitive = true,
|
||||
}
|
||||
}
|
||||
};
|
||||
@ -249,4 +249,4 @@ namespace Ocelot.AcceptanceTests
|
||||
_steps.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user