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 }
public void CreateOptions_ShouldTrace() { var rateLimiter = TraceUtils.GetRateLimiter(1001); var factory = new RateLimitingTraceOptionsFactory(rateLimiter); Assert.True(factory.CreateOptions().ShouldTrace); }