예제 #1
0
        public void CreateOptions_ShouldNotTrace()
        {
            var rateLimiter = TraceUtils.GetRateLimiter(999);
            var factory     = new RateLimitingTraceOptionsFactory(rateLimiter);

            Assert.True(factory.CreateOptions().ShouldTrace);  // t=0ms
            Assert.False(factory.CreateOptions().ShouldTrace); // t=999ms
        }
예제 #2
0
        public void CreateOptions_ShouldTrace()
        {
            var rateLimiter = TraceUtils.GetRateLimiter(1001);
            var factory     = new RateLimitingTraceOptionsFactory(rateLimiter);

            Assert.True(factory.CreateOptions().ShouldTrace);
        }