11 instantiations of TestRateLimiterPolicy
Microsoft.AspNetCore.RateLimiting.Tests (11)
RateLimiterEndpointConventionBuilderExtensionsTests.cs (1)
42
testConventionBuilder.RequireRateLimiting(new
TestRateLimiterPolicy
("myKey", 404, false));
RateLimitingMiddlewareTests.cs (10)
260
options.Value.AddPolicy<string>(name, new
TestRateLimiterPolicy
("myKey", 404, false));
291
options.Value.AddPolicy<string>(name, new
TestRateLimiterPolicy
("myKey", 404, true));
323
options.Value.AddPolicy<string>(name, new
TestRateLimiterPolicy
("myKey", 404, false));
355
options.Value.AddPolicy<string>(name, new
TestRateLimiterPolicy
("myKey", 404, false));
432
options.Value.AddPolicy<string>(endpointName1, new
TestRateLimiterPolicy
(duplicateKey, 404, false));
433
options.Value.AddPolicy<string>(endpointName2, new
TestRateLimiterPolicy
(duplicateKey, 400, false));
522
options.Value.AddPolicy<string>(name, new
TestRateLimiterPolicy
("myKey", 404, false));
559
var policy = new
TestRateLimiterPolicy
("myKey", 404, false);
589
var policy = new
TestRateLimiterPolicy
("myKey1", 404, false);
593
options.Value.AddPolicy<string>(name, new
TestRateLimiterPolicy
("myKey2", 403, false));
4 references to TestRateLimiterPolicy
Microsoft.AspNetCore.RateLimiting.Tests (4)
RateLimitingMiddlewareTests.cs (3)
387
options.Value.AddPolicy<string,
TestRateLimiterPolicy
>(name);
559
var
policy = new TestRateLimiterPolicy("myKey", 404, false);
589
var
policy = new TestRateLimiterPolicy("myKey1", 404, false);
RateLimitingOptionsTests.cs (1)
46
Assert.Throws<ArgumentException>(() => options.AddPolicy<string,
TestRateLimiterPolicy
>("myKey"));