public void ShouldCreateDefaultThrottler() { var configuration = new ConfigurationBuilder().Build(); var factory = new RequestExecutionThrottleFactory(configuration); var throttler = factory.Create(); throttler.Should().BeOfType <RequestExecutionThrottler>(); }
public void ShouldCreateThrottler() { var configuration = new ConfigurationBuilder().Build(); configuration.Properties["Server:MaximumConnectionsNumber"] = "5"; var factory = new RequestExecutionThrottleFactory(configuration); var ithrottler = factory.Create(); ithrottler.Should().BeOfType <RequestExecutionThrottler>(); var throttler = ithrottler as RequestExecutionThrottler; throttler.MaxCapacity.Should().Be(5); }