Beispiel #1
0
        public void Properties()
        {
            var enabled = !ApiRateLimiter.EnabledDefault;

            var rateLimiter = new ApiRateLimiter
            {
                IsEnabled = enabled
            };

            Assert.Equal(enabled, rateLimiter.IsEnabled);
        }
        public void ConfigureThrows()
        {
            var rateLimiter = new ApiRateLimiter();

            Assert.Throws <ArgumentException>("count", () => rateLimiter.Configure(TimeSpan.FromSeconds(1), -1));
        }