Merge remote-tracking branch 'upstream/release-3.1.8' into feature/AddStyleCopAnalyzers

# Conflicts:
#	src/Ocelot/Configuration/ServiceProviderConfiguration.cs
This commit is contained in:
Philip Wood
2018-03-03 16:28:19 +00:00
70 changed files with 2373 additions and 481 deletions

View File

@ -328,7 +328,7 @@ namespace Ocelot.UnitTests.Configuration
this.Given(x => x.GivenAConfiguration(configuration))
.When(x => x.WhenIValidateTheConfiguration())
.Then(x => x.ThenTheResultIsNotValid())
.And(x => x.ThenTheErrorMessageAtPositionIs(0, "ReRoutes for aggregateReRoute / either do not exist or do not have correct Key property"))
.And(x => x.ThenTheErrorMessageAtPositionIs(0, "ReRoutes for aggregateReRoute / either do not exist or do not have correct ServiceName property"))
.BDDfy();
}

View File

@ -30,13 +30,15 @@ namespace Ocelot.UnitTests.Configuration
ServiceDiscoveryProvider = new FileServiceDiscoveryProvider
{
Host = "127.0.0.1",
Port = 1234
Port = 1234,
Type = "ServiceFabric"
}
};
var expected = new ServiceProviderConfigurationBuilder()
.WithServiceDiscoveryProviderHost("127.0.0.1")
.WithServiceDiscoveryProviderPort(1234)
.WithServiceDiscoveryProviderType("ServiceFabric")
.Build();
this.Given(x => x.GivenTheFollowingReRoute(reRoute))
@ -63,8 +65,8 @@ namespace Ocelot.UnitTests.Configuration
private void ThenTheConfigIs(ServiceProviderConfiguration expected)
{
_result.ServiceProviderHost.ShouldBe(expected.ServiceProviderHost);
_result.ServiceProviderPort.ShouldBe(expected.ServiceProviderPort);
_result.Host.ShouldBe(expected.Host);
_result.Port.ShouldBe(expected.Port);
}
}
}
}