Bert.RateLimiters.Tests.RollingWindowThrottlerTests.ShouldThrottle_WhenCalledWithTokensLessThanOne_WillThrow C# (CSharp) Method

ShouldThrottle_WhenCalledWithTokensLessThanOne_WillThrow() private method

        public void ShouldThrottle_WhenCalledWithTokensLessThanOne_WillThrow()
        {
            var throttler = new RollingWindowThrottler(1, TimeSpan.FromSeconds(1));
            long waitTimeMillis;
            Assert.Throws<ArgumentOutOfRangeException>(() => throttler.ShouldThrottle(0, out waitTimeMillis));
        }