Rename all ReRoute to Route to move closer to YARP +semver: breaking

This commit is contained in:
Tom Pallister
2020-05-23 20:50:05 +01:00
committed by GitHub
parent fe3e8bd23a
commit 3439be8927
269 changed files with 23591 additions and 23605 deletions

View File

@ -10,18 +10,18 @@ namespace Ocelot.UnitTests.Cache
public class RegionCreatorTests
{
private string _result;
private FileReRoute _reRoute;
private FileRoute _route;
[Fact]
public void should_create_region()
{
var reRoute = new FileReRoute
var route = new FileRoute
{
UpstreamHttpMethod = new List<string> { "Get" },
UpstreamPathTemplate = "/testdummy"
};
this.Given(_ => GivenTheReRoute(reRoute))
this.Given(_ => GivenTheRoute(route))
.When(_ => WhenICreateTheRegion())
.Then(_ => ThenTheRegionIs("Gettestdummy"))
.BDDfy();
@ -30,7 +30,7 @@ namespace Ocelot.UnitTests.Cache
[Fact]
public void should_use_region()
{
var reRoute = new FileReRoute
var route = new FileRoute
{
FileCacheOptions = new FileCacheOptions
{
@ -38,21 +38,21 @@ namespace Ocelot.UnitTests.Cache
}
};
this.Given(_ => GivenTheReRoute(reRoute))
this.Given(_ => GivenTheRoute(route))
.When(_ => WhenICreateTheRegion())
.Then(_ => ThenTheRegionIs("region"))
.BDDfy();
}
private void GivenTheReRoute(FileReRoute reRoute)
}
private void GivenTheRoute(FileRoute route)
{
_reRoute = reRoute;
_route = route;
}
private void WhenICreateTheRegion()
{
{
RegionCreator regionCreator = new RegionCreator();
_result = regionCreator.Create(_reRoute);
_result = regionCreator.Create(_route);
}
private void ThenTheRegionIs(string expected)
@ -60,4 +60,4 @@ namespace Ocelot.UnitTests.Cache
_result.ShouldBe(expected);
}
}
}
}