#262 added working eureka sample (#333)

This commit is contained in:
Tom Pallister
2018-04-26 09:38:36 +01:00
committed by GitHub
parent 027bf6867a
commit 5b63f333f7
18 changed files with 411 additions and 12 deletions

View File

@ -29,6 +29,33 @@ namespace Ocelot.UnitTests.LoadBalancer
.BDDfy();
}
[Fact]
public void should_return_error_if_no_services()
{
var services = new List<Service>();
this.Given(x => x.GivenServices(services))
.When(x => x.WhenIGetTheNextHostAndPort())
.Then(x => x.ThenThereIsAnError())
.BDDfy();
}
[Fact]
public void should_return_error_if_null_services()
{
List<Service> services = null;
this.Given(x => x.GivenServices(services))
.When(x => x.WhenIGetTheNextHostAndPort())
.Then(x => x.ThenThereIsAnError())
.BDDfy();
}
private void ThenThereIsAnError()
{
_result.IsError.ShouldBeTrue();
}
private void GivenServices(List<Service> services)
{
_services = services;