private LoadBalancerOptions CreateLoadBalancerOptions(FileLoadBalancerOptions options) { return(new LoadBalancerOptionsBuilder() .WithType(options.Type) .WithKey(options.Key) .WithExpiryInMs(options.Expiry) .Build()); }
public FileGlobalConfiguration() { ServiceDiscoveryProvider = new FileServiceDiscoveryProvider(); RateLimitOptions = new FileRateLimitOptions(); LoadBalancerOptions = new FileLoadBalancerOptions(); QoSOptions = new FileQoSOptions(); HttpHandlerOptions = new FileHttpHandlerOptions(); }
public void should_create() { var fileLoadBalancerOptions = new FileLoadBalancerOptions { Type = "test", Key = "west", Expiry = 1 }; this.Given(_ => GivenThe(fileLoadBalancerOptions)) .When(_ => WhenICreate()) .Then(_ => ThenTheOptionsAreCreated(fileLoadBalancerOptions)) .BDDfy(); }
private void GivenThe(FileLoadBalancerOptions fileLoadBalancerOptions) { _fileLoadBalancerOptions = fileLoadBalancerOptions; }
private void ThenTheOptionsAreCreated(FileLoadBalancerOptions expected) { _result.Type.ShouldBe(expected.Type); _result.Key.ShouldBe(expected.Key); _result.ExpiryInMs.ShouldBe(expected.Expiry); }