342 instantiations of TestServer
InMemory.FunctionalTests (342)
BadHttpRequestTests.cs (8)
164await using (var server = new TestServer(context => 212await using (var server = new TestServer(async context => 237await using (var server = new TestServer(context => Task.CompletedTask, new TestServiceContext(LoggerFactory, metrics: new KestrelMetrics(testMeterFactory)))) 259await using (var server = new TestServer(context => Task.CompletedTask, new TestServiceContext(LoggerFactory, metrics: new KestrelMetrics(testMeterFactory)))) 343await using (var server = new TestServer(context => Task.CompletedTask, new TestServiceContext(LoggerFactory, metrics: new KestrelMetrics(testMeterFactory)) { DiagnosticSource = diagListener })) 390await using (var server = new TestServer(context => context.Request.Body.DrainAsync(default), new TestServiceContext(LoggerFactory, metrics: new KestrelMetrics(testMeterFactory)) { DiagnosticSource = diagListener })) 456await using (var server = new TestServer(context => context.Request.Body.DrainAsync(default), new TestServiceContext(LoggerFactory, metrics: new KestrelMetrics(testMeterFactory)) { DiagnosticSource = diagListener })) 531await using (var server = new TestServer(context => context.Request.Body.DrainAsync(default), new TestServiceContext(LoggerFactory, metrics: new KestrelMetrics(testMeterFactory)) { DiagnosticSource = diagListener }))
ChunkedRequestTests.cs (17)
75await using (var server = new TestServer(App, testContext)) 104await using (var server = new TestServer(PipeApp, testContext)) 133await using (var server = new TestServer(AppChunked, testContext)) 174await using (var server = new TestServer(async httpContext => 230await using (var server = new TestServer(async httpContext => 358await using (var server = new TestServer(async httpContext => 495await using (var server = new TestServer(async context => 539await using (var server = new TestServer(async context => 580await using (var server = new TestServer(async httpContext => 661await using (var server = new TestServer(async httpContext => 705await using (var server = new TestServer(async httpContext => 750await using (var server = new TestServer(httpContext => 861await using (var server = new TestServer(async httpContext => 911await using (var server = new TestServer(async httpContext => 967await using (var server = new TestServer(async httpContext => 1017await using (var server = new TestServer(async httpContext => 1080await using (var server = new TestServer(async httpContext =>
ChunkedResponseTests.cs (29)
24await using (var server = new TestServer(async httpContext => 59await using (var server = new TestServer(async httpContext => 87await using (var server = new TestServer(async httpContext => 123await using (var server = new TestServer(async httpContext => 159await using (var server = new TestServer(async httpContext => 199await using (var server = new TestServer(async httpContext => 241await using (var server = new TestServer(async httpContext => 278await using (var server = new TestServer(async httpContext => 314await using (var server = new TestServer(async httpContext => 352await using (var server = new TestServer(async httpContext => 394await using (var server = new TestServer(async httpContext => 424await using (var server = new TestServer(async httpContext => 457await using (var server = new TestServer(async httpContext => 491await using (var server = new TestServer(async httpContext => 535await using (var server = new TestServer(async httpContext => 573await using (var server = new TestServer(async httpContext => 617await using (var server = new TestServer(async httpContext => 662await using (var server = new TestServer(async httpContext => 716await using (var server = new TestServer(async httpContext => 772await using (var server = new TestServer(async httpContext => 827await using (var server = new TestServer(async httpContext => 869await using (var server = new TestServer(async httpContext => 916await using (var server = new TestServer(async httpContext => 957await using (var server = new TestServer(async httpContext => 997await using (var server = new TestServer(async httpContext => 1036await using (var server = new TestServer(async httpContext => 1073await using (var server = new TestServer(async httpContext => 1111await using (var server = new TestServer(async httpContext => 1146await using (var server = new TestServer(async httpContext =>
ConnectionLimitTests.cs (2)
230return new TestServer(app, serviceContext); 244return new TestServer(app, serviceContext, listenOptions);
ConnectionMiddlewareTests.cs (10)
50await using (var server = new TestServer(requestDelegate, serviceContext, listenOptions)) 74await using (var server = new TestServer(requestDelegate, serviceContext, listenOptions => 104await using (var server = new TestServer(requestDelegate, serviceContext, listenOptions => 140await using (var server = new TestServer(requestDelegate, serviceContext, listenOptions)) 163await using (var server = new TestServer(requestDelegate, serviceContext, listenOptions)) 192await using (var server = new TestServer(requestDelegate, serviceContext, listenOptions)) 223await using (var server = new TestServer(TestApp.EchoApp, serviceContext, listenOptions)) 252await using (var server = new TestServer(requestDelegate, serviceContext, listenOptions)) 276await using (var server = new TestServer(async context => 307await using (var server = new TestServer(async context =>
DefaultHeaderTests.cs (1)
21await using (var server = new TestServer(ctx => Task.CompletedTask, testContext))
EventSourceTests.cs (3)
41await using (var server = new TestServer(async context => 149await using (var server = new TestServer(context => 271await using (var server = new TestServer(context => Task.CompletedTask, new TestServiceContext(LoggerFactory),
Http2\Http2EndToEndTests.cs (1)
31await using var server = new TestServer(async context =>
Http2\TlsTests.cs (1)
41await using (var server = new TestServer(context =>
HttpProtocolSelectionTests.cs (2)
67await using (var server = new TestServer(context => Task.CompletedTask, testContext, listenOptions)) 86await using (var server = new TestServer(context => Task.CompletedTask, testContext, listenOptions))
HttpsConnectionMiddlewareTests.cs (37)
58await using (var server = new TestServer(App, new TestServiceContext(LoggerFactory), ConfigureListenOptions)) 92await using (var server = new TestServer(App, new TestServiceContext(LoggerFactory), ConfigureListenOptions)) 112await using (var server = new TestServer(context => 143await using (var server = new TestServer(context => 181await using (var server = new TestServer(context => 204await using (var server = new TestServer(App, new TestServiceContext(LoggerFactory), listenOptions => 230await using (var server = new TestServer(context => 258await using (var server = new TestServer(context => 285await using (var server = new TestServer(context => Task.CompletedTask, new TestServiceContext(LoggerFactory), ConfigureListenOptions)) 315await using (var server = new TestServer(context => Task.CompletedTask, new TestServiceContext(LoggerFactory), ConfigureListenOptions)) 348await using (var server = new TestServer(context => Task.CompletedTask, new TestServiceContext(LoggerFactory), ConfigureListenOptions)) 383await using (var server = new TestServer(context => Task.CompletedTask, new TestServiceContext(LoggerFactory), ConfigureListenOptions)) 418await using (var server = new TestServer(context => Task.CompletedTask, new TestServiceContext(LoggerFactory), ConfigureListenOptions)) 452await using (var server = new TestServer(context => Task.CompletedTask, new TestServiceContext(LoggerFactory), ConfigureListenOptions)) 480await using (var server = new TestServer(context => Task.CompletedTask, new TestServiceContext(LoggerFactory), ConfigureListenOptions)) 510await using (var server = new TestServer(context => 546await using var server = new TestServer(async context => 590await using var server = new TestServer(async context => 631await using var server = new TestServer(async context => 674await using var server = new TestServer(async context => 722await using var server = new TestServer(async context => 764await using var server = new TestServer(async context => 842await using (var server = new TestServer( 891await using var server = new TestServer(async context => 928await using var server = new TestServer(context => Task.CompletedTask, 961await using var server = new TestServer(context => Task.CompletedTask, 994await using var server = new TestServer(context => Task.CompletedTask, 1027await using var server = new TestServer(async context => 1074await using var server = new TestServer(async context => 1118await using (var server = new TestServer(context => context.Response.WriteAsync(context.Request.Scheme), new TestServiceContext(LoggerFactory), ConfigureListenOptions)) 1141await using (var server = new TestServer(context => context.Response.WriteAsync("hello world"), new TestServiceContext(LoggerFactory), ConfigureListenOptions)) 1179await using (var server = new TestServer(context => Task.CompletedTask, new TestServiceContext(LoggerFactory), ConfigureListenOptions)) 1206await using (var server = new TestServer(context => Task.CompletedTask, new TestServiceContext(LoggerFactory), ConfigureListenOptions)) 1231await using (var server = new TestServer(context => Task.CompletedTask, new TestServiceContext(LoggerFactory), ConfigureListenOptions)) 1256await using (var server = new TestServer(context => Task.CompletedTask, new TestServiceContext(LoggerFactory), ConfigureListenOptions)) 1290await using (var server = new TestServer(app, new TestServiceContext(LoggerFactory), ConfigureListenOptions)) 1389await using var server = new TestServer(context => Task.CompletedTask, new TestServiceContext(LoggerFactory), ConfigureListenOptions);
HttpsTests.cs (18)
83await using (var server = new TestServer(context => Task.CompletedTask, 175await using (var server = new TestServer(context => Task.CompletedTask, 203await using (var server = new TestServer(context => Task.CompletedTask, 232await using (var server = new TestServer(async httpContext => 279await using (var server = new TestServer(async httpContext => 322await using (var server = new TestServer(context => Task.CompletedTask, 348await using (var server = new TestServer(context => Task.CompletedTask, 370await using (var server = new TestServer(context => Task.CompletedTask, 400await using (var server = new TestServer(context => Task.CompletedTask, 441await using (var server = new TestServer(context => Task.CompletedTask, 481await using (var server = new TestServer(context => Task.CompletedTask, 526await using (var server = new TestServer(context => Task.CompletedTask, 562await using var server = new TestServer(context => Task.CompletedTask, 597await using (var server = new TestServer(context => Task.CompletedTask, 643await using (var server = new TestServer(context => Task.CompletedTask, 683await using (var server = new TestServer(context => Task.CompletedTask, 719await using (var server = new TestServer(context => Task.CompletedTask, 755await using (var server = new TestServer(context => Task.CompletedTask,
KeepAliveTimeoutTests.cs (1)
255return new TestServer(httpContext => App(httpContext, longRunningCt, upgradeCt), context);
KestrelMetricsTests.cs (13)
69await using var server = new TestServer(EchoApp, serviceContext, listenOptions); 128await using var server = new TestServer(EchoApp, serviceContext, listenOptions); 217var server = new TestServer(async c => 283var server = new TestServer(async c => 348await using var server = new TestServer(EchoApp, serviceContext, listenOptions); 403await using var server = new TestServer(async c => 462await using var server = new TestServer(EchoApp, serviceContext, listenOptions); 502await using var server = new TestServer(UpgradeApp, serviceContext, listenOptions); 537var server = new TestServer(async context => 619var server = new TestServer(async context => 684await using (var server = new TestServer(context => 771var server = new TestServer( 852await using (var server = new TestServer(context =>
LoggingConnectionMiddlewareTests.cs (1)
20await using (var server = new TestServer(context =>
MaxRequestBodySizeTests.cs (13)
31await using (var server = new TestServer(async context => 73await using (var server = new TestServer(async context => 120await using (var server = new TestServer(async context => 169await using (var server = new TestServer(async context => 211await using (var server = new TestServer(async context => 251await using (var server = new TestServer(context => context.Request.Body.CopyToAsync(Stream.Null), 288await using (var server = new TestServer(async context => 328await using (var server = new TestServer(async context => 373await using (var server = new TestServer(async context => 421await using (var server = new TestServer(async context => 468await using (var server = new TestServer(async context => 513await using (var server = new TestServer(async context => 586await using (var server = new TestServer(async context =>
MaxRequestLineSizeTests.cs (1)
85return new TestServer(async httpContext => await httpContext.Response.WriteAsync("hello, world"), new TestServiceContext(LoggerFactory, metrics: new KestrelMetrics(meterFactory))
RequestBodyTimeoutTests.cs (3)
30await using (var server = new TestServer(context => 114await using (var server = new TestServer(context => 161await using (var server = new TestServer(async context =>
RequestHeaderLimitsTests.cs (1)
176return new TestServer(async httpContext => await httpContext.Response.WriteAsync("hello, world"), new TestServiceContext(LoggerFactory, metrics: kestrelMetrics)
RequestHeadersTimeoutTests.cs (1)
158return new TestServer(async httpContext =>
RequestTargetProcessingTests.cs (3)
22await using (var server = new TestServer(async context => 67await using (var server = new TestServer(async context => 99await using (var server = new TestServer(async context =>
RequestTests.cs (52)
30await using (var server = new TestServer(async context => 61await using (var server = new TestServer(async context => 82await using (var server = new TestServer(async context => 116await using (var server = new TestServer(async context => 182await using (var server = new TestServer(async context => 235await using (var server = new TestServer(async context => 287await using (var server = new TestServer(TestApp.EchoAppChunked, testContext)) 343await using var server = new TestServer(ExecuteApplication, testContext); 380await using var server = new TestServer(ExecuteApplication, testContext); 414await using var server = new TestServer(ExecuteApplication, testContext); 452await using var server = new TestServer(ExecuteApplication, testContext); 493await using var server = new TestServer(ExecuteApplication, testContext); 536await using var server = new TestServer(ExecuteApplication, testContext); 575await using (var server = new TestServer(async context => 592await using (var server = new TestServer(async context => 652await using (var server = new TestServer(TestApp.EchoAppChunked, testContext)) 686await using (var server = new TestServer(TestApp.EchoApp, testContext)) 725await using (var server = new TestServer(TestApp.EchoAppChunked, testContext)) 759await using (var server = new TestServer(TestApp.EchoApp, testContext)) 798await using (var server = new TestServer(TestApp.EchoAppChunked, testContext)) 854await using (var server = new TestServer(TestApp.EchoAppChunked, testContext)) 890await using (var server = new TestServer(TestApp.EchoAppChunked, testContext)) 922await using (var server = new TestServer(async httpContext => 968await using (var server = new TestServer(async httpContext => 1015await using (var server = new TestServer(async httpContext => 1047await using (var server = new TestServer(async httpContext => 1082await using (var server = new TestServer(async httpContext => 1121await using (var server = new TestServer(async httpContext => 1181await using (var server = new TestServer(async httpContext => 1236await using (var server = new TestServer(async httpContext => 1274await using (var server = new TestServer(TestApp.EchoAppChunked, testContext)) 1355await using (var server = new TestServer(async context => 1396await using (var server = new TestServer(async context => 1464await using (var server = new TestServer(context => Task.CompletedTask, new TestServiceContext(LoggerFactory))) 1482await using (var server = new TestServer(context => Task.CompletedTask, new TestServiceContext(LoggerFactory))) 1523await using (var server = new TestServer(context => Task.CompletedTask, new TestServiceContext(LoggerFactory))) 1571await using (var server = new TestServer(context => Task.CompletedTask, new TestServiceContext(LoggerFactory))) 1597await using (var server = new TestServer(async context => 1737await using (var server = new TestServer(async context => 1830await using (var server = new TestServer(async context => 1869await using (var server = new TestServer(async httpContext => 1903await using (var server = new TestServer(async httpContext => 1953await using (var server = new TestServer(async httpContext => 1998await using (var server = new TestServer(async httpContext => 2038await using (var server = new TestServer(async httpContext => 2082await using (var server = new TestServer(context => 2137await using (var server = new TestServer(context => 2199await using (var server = new TestServer(context => 2231await using (var server = new TestServer(_ => Task.CompletedTask, testContext)) 2263await using (var server = new TestServer(context => 2292await using (var server = new TestServer(context => 2335await using (var server = new TestServer(context => Task.CompletedTask, new TestServiceContext(LoggerFactory, disableHttp1LineFeedTerminators: false)))
ResponseDrainingTests.cs (1)
28await using (var server = new TestServer(context =>
ResponseHeaderTests.cs (4)
21await using var server = new TestServer(context => 52await using var server = new TestServer(context => 89await using var server = new TestServer(context => 110await using var server = new TestServer(context =>
ResponseTests.cs (109)
41await using (var server = new TestServer(context => 79await using (var server = new TestServer(async context => 114await using (var server = new TestServer(async context => 152await using (var server = new TestServer(async context => 217await using var server = new TestServer(async context => 246await using var server = new TestServer(async context => 375await using (var server = new TestServer(async context => 407await using (var server = new TestServer(async context => 444await using (var server = new TestServer(httpContext => 482await using (var server = new TestServer(async httpContext => 518await using (var server = new TestServer(async httpContext => 552await using (var server = new TestServer(httpContext => 577await using (var server = new TestServer(httpContext => 677await using (var server = new TestServer(async httpContext => 715await using (var server = new TestServer(async httpContext => 755await using (var server = new TestServer(async httpContext => 794await using (var server = new TestServer(async httpContext => 836await using (var server = new TestServer(async httpContext => 877await using (var server = new TestServer(httpContext => 913await using (var server = new TestServer(async httpContext => 957await using (var server = new TestServer(async httpContext => 998await using (var server = new TestServer(async httpContext => 1037await using (var server = new TestServer(async httpContext => 1072await using (var server = new TestServer(async httpContext => 1115await using (var server = new TestServer(async httpContext => 1169await using (var server = new TestServer(async httpContext => 1218await using (var server = new TestServer(async httpContext => 1265await using (var server = new TestServer(httpContext => 1306await using (var server = new TestServer(async httpContext => 1344await using (var server = new TestServer(async httpContext => 1380await using (var server = new TestServer(async httpContext => 1410await using (var server = new TestServer(httpContext => 1438await using (var server = new TestServer(async httpContext => 1471await using (var server = new TestServer(async httpContext => 1502await using (var server = new TestServer(async httpContext => 1537await using (var server = new TestServer(async httpContext => 1577await using (var server = new TestServer(async httpContext => 1622await using (var server = new TestServer(async httpContext => 1668await using (var server = new TestServer(async httpContext => 1711await using (var server = new TestServer(async httpContext => 1753await using (var server = new TestServer(async httpContext => 1795await using (var server = new TestServer(async httpContext => 1840await using (var server = new TestServer(async httpContext => 1883await using (var server = new TestServer(httpContext => 1923await using (var server = new TestServer(async httpContext => 1966await using (var server = new TestServer(async httpContext => 2003await using (var server = new TestServer(httpContext => Task.CompletedTask, 2037await using (var server = new TestServer(httpContext => 2107await using (var server = new TestServer(httpContext => 2153await using (var server = new TestServer(async httpContext => 2202await using (var server = new TestServer(TestApp.EchoApp, serviceContext)) 2226await using (var server = new TestServer(TestApp.EmptyApp, testContext)) 2258await using (var server = new TestServer(async httpContext => 2302await using (var server = new TestServer(TestApp.EmptyApp, testContext)) 2325await using (var server = new TestServer(async httpContext => 2374await using (var server = new TestServer(async httpContext => 2424await using (var server = new TestServer(httpContext => 2477await using (var server = new TestServer(async httpContext => 2533await using (var server = new TestServer(async httpContext => 2578await using (var server = new TestServer(async httpContext => 2628await using (var server = new TestServer(async httpContext => 2680await using (var server = new TestServer(async httpContext => 2725await using (var server = new TestServer(async httpContext => 2766await using (var server = new TestServer(async httpContext => 2797await using (var server = new TestServer(httpContext => 2822await using (var server = new TestServer(httpContext => 2851await using (var server = new TestServer(async httpContext => 2932await using (var server = new TestServer(async httpContext => 2961await using (var server = new TestServer(async httpContext => 2989await using (var server = new TestServer(async httpContext => 3019await using (var server = new TestServer(async httpContext => 3051await using (var server = new TestServer(async httpContext => 3081await using (var server = new TestServer(async httpContext => 3109await using (var server = new TestServer(async httpContext => 3140await using (var server = new TestServer(async httpContext => 3176await using (var server = new TestServer(async httpContext => 3207await using (var server = new TestServer(async httpContext => 3253await using (var server = new TestServer(httpContext => 3285await using (var server = new TestServer(async httpContext => 3321await using (var server = new TestServer(async context => 3372await using (var server = new TestServer(async context => 3446await using (var server = new TestServer(context => 3477await using (var server = new TestServer(context => 3546await using (var server = new TestServer(httpContext => 3577await using (var server = new TestServer(async httpContext => 3610await using (var server = new TestServer(httpContext => 3640await using (var server = new TestServer(httpContext => 3672await using (var server = new TestServer(httpContext => 3710await using (var server = new TestServer(async httpContext => 3747await using (var server = new TestServer(async httpContext => 3773await using (var server = new TestServer(async httpContext => 3815await using (var server = new TestServer(async httpContext => 3843await using (var server = new TestServer(async httpContext => 3874await using var server = new TestServer(async httpContext => 3907await using (var server = new TestServer(async httpContext => 3958await using (var server = new TestServer(async httpContext => 4008await using (var server = new TestServer(async httpContext => 4069await using (var server = new TestServer(httpContext => 4114await using (var server = new TestServer(async httpContext => 4142await using (var server = new TestServer(async httpContext => 4174await using (var server = new TestServer(async httpContext => 4203await using (var server = new TestServer(async httpContext => 4238await using (var server = new TestServer(async httpContext => 4272await using (var server = new TestServer(httpContext => 4303await using (var server = new TestServer(async httpContext => 4335await using (var server = new TestServer(async httpContext => 4475await using (var server = new TestServer( 4574await using var server = new TestServer(async context => 4624await using var server = new TestServer(async context =>
UpgradeTests.cs (10)
69await using (var server = new TestServer(async context => 121await using (var server = new TestServer(async context => 161await using (var server = new TestServer(async context => 195await using (var server = new TestServer(async context => 230await using (var server = new TestServer(async context => 271await using (var server = new TestServer(async context => 308await using (var server = new TestServer(async context => 356await using (var server = new TestServer(async context => 393await using var server = new TestServer(async context => 438await using (var server = new TestServer(async context =>
381 references to TestServer
InMemory.FunctionalTests (381)
BadHttpRequestTests.cs (8)
164await using (var server = new TestServer(context => 212await using (var server = new TestServer(async context => 237await using (var server = new TestServer(context => Task.CompletedTask, new TestServiceContext(LoggerFactory, metrics: new KestrelMetrics(testMeterFactory)))) 259await using (var server = new TestServer(context => Task.CompletedTask, new TestServiceContext(LoggerFactory, metrics: new KestrelMetrics(testMeterFactory)))) 343await using (var server = new TestServer(context => Task.CompletedTask, new TestServiceContext(LoggerFactory, metrics: new KestrelMetrics(testMeterFactory)) { DiagnosticSource = diagListener })) 390await using (var server = new TestServer(context => context.Request.Body.DrainAsync(default), new TestServiceContext(LoggerFactory, metrics: new KestrelMetrics(testMeterFactory)) { DiagnosticSource = diagListener })) 456await using (var server = new TestServer(context => context.Request.Body.DrainAsync(default), new TestServiceContext(LoggerFactory, metrics: new KestrelMetrics(testMeterFactory)) { DiagnosticSource = diagListener })) 531await using (var server = new TestServer(context => context.Request.Body.DrainAsync(default), new TestServiceContext(LoggerFactory, metrics: new KestrelMetrics(testMeterFactory)) { DiagnosticSource = diagListener }))
ChunkedRequestTests.cs (17)
75await using (var server = new TestServer(App, testContext)) 104await using (var server = new TestServer(PipeApp, testContext)) 133await using (var server = new TestServer(AppChunked, testContext)) 174await using (var server = new TestServer(async httpContext => 230await using (var server = new TestServer(async httpContext => 358await using (var server = new TestServer(async httpContext => 495await using (var server = new TestServer(async context => 539await using (var server = new TestServer(async context => 580await using (var server = new TestServer(async httpContext => 661await using (var server = new TestServer(async httpContext => 705await using (var server = new TestServer(async httpContext => 750await using (var server = new TestServer(httpContext => 861await using (var server = new TestServer(async httpContext => 911await using (var server = new TestServer(async httpContext => 967await using (var server = new TestServer(async httpContext => 1017await using (var server = new TestServer(async httpContext => 1080await using (var server = new TestServer(async httpContext =>
ChunkedResponseTests.cs (29)
24await using (var server = new TestServer(async httpContext => 59await using (var server = new TestServer(async httpContext => 87await using (var server = new TestServer(async httpContext => 123await using (var server = new TestServer(async httpContext => 159await using (var server = new TestServer(async httpContext => 199await using (var server = new TestServer(async httpContext => 241await using (var server = new TestServer(async httpContext => 278await using (var server = new TestServer(async httpContext => 314await using (var server = new TestServer(async httpContext => 352await using (var server = new TestServer(async httpContext => 394await using (var server = new TestServer(async httpContext => 424await using (var server = new TestServer(async httpContext => 457await using (var server = new TestServer(async httpContext => 491await using (var server = new TestServer(async httpContext => 535await using (var server = new TestServer(async httpContext => 573await using (var server = new TestServer(async httpContext => 617await using (var server = new TestServer(async httpContext => 662await using (var server = new TestServer(async httpContext => 716await using (var server = new TestServer(async httpContext => 772await using (var server = new TestServer(async httpContext => 827await using (var server = new TestServer(async httpContext => 869await using (var server = new TestServer(async httpContext => 916await using (var server = new TestServer(async httpContext => 957await using (var server = new TestServer(async httpContext => 997await using (var server = new TestServer(async httpContext => 1036await using (var server = new TestServer(async httpContext => 1073await using (var server = new TestServer(async httpContext => 1111await using (var server = new TestServer(async httpContext => 1146await using (var server = new TestServer(async httpContext =>
ConnectionLimitTests.cs (6)
36await using (var server = CreateServerWithMaxConnections(async context => 57await using (var server = CreateServerWithMaxConnections(async context => 112await using (var server = CreateServerWithMaxConnections(async context => 198await using (var server = CreateServerWithMaxConnections(_ => Task.CompletedTask, counter)) 226private TestServer CreateServerWithMaxConnections(RequestDelegate app, long max, IMeterFactory meterFactory = null) 233private TestServer CreateServerWithMaxConnections(RequestDelegate app, ResourceCounter concurrentConnectionCounter, IMeterFactory meterFactory = null)
ConnectionMiddlewareTests.cs (10)
50await using (var server = new TestServer(requestDelegate, serviceContext, listenOptions)) 74await using (var server = new TestServer(requestDelegate, serviceContext, listenOptions => 104await using (var server = new TestServer(requestDelegate, serviceContext, listenOptions => 140await using (var server = new TestServer(requestDelegate, serviceContext, listenOptions)) 163await using (var server = new TestServer(requestDelegate, serviceContext, listenOptions)) 192await using (var server = new TestServer(requestDelegate, serviceContext, listenOptions)) 223await using (var server = new TestServer(TestApp.EchoApp, serviceContext, listenOptions)) 252await using (var server = new TestServer(requestDelegate, serviceContext, listenOptions)) 276await using (var server = new TestServer(async context => 307await using (var server = new TestServer(async context =>
DefaultHeaderTests.cs (1)
21await using (var server = new TestServer(ctx => Task.CompletedTask, testContext))
EventSourceTests.cs (4)
41await using (var server = new TestServer(async context => 149await using (var server = new TestServer(context => 271await using (var server = new TestServer(context => Task.CompletedTask, new TestServiceContext(LoggerFactory), 362await using (var server = new TestServer(context => Task.CompletedTask, serviceContext,
Http2\Http2EndToEndTests.cs (1)
31await using var server = new TestServer(async context =>
Http2\TlsTests.cs (1)
41await using (var server = new TestServer(context =>
HttpProtocolSelectionTests.cs (2)
67await using (var server = new TestServer(context => Task.CompletedTask, testContext, listenOptions)) 86await using (var server = new TestServer(context => Task.CompletedTask, testContext, listenOptions))
HttpsConnectionMiddlewareTests.cs (37)
58await using (var server = new TestServer(App, new TestServiceContext(LoggerFactory), ConfigureListenOptions)) 92await using (var server = new TestServer(App, new TestServiceContext(LoggerFactory), ConfigureListenOptions)) 112await using (var server = new TestServer(context => 143await using (var server = new TestServer(context => 181await using (var server = new TestServer(context => 204await using (var server = new TestServer(App, new TestServiceContext(LoggerFactory), listenOptions => 230await using (var server = new TestServer(context => 258await using (var server = new TestServer(context => 285await using (var server = new TestServer(context => Task.CompletedTask, new TestServiceContext(LoggerFactory), ConfigureListenOptions)) 315await using (var server = new TestServer(context => Task.CompletedTask, new TestServiceContext(LoggerFactory), ConfigureListenOptions)) 348await using (var server = new TestServer(context => Task.CompletedTask, new TestServiceContext(LoggerFactory), ConfigureListenOptions)) 383await using (var server = new TestServer(context => Task.CompletedTask, new TestServiceContext(LoggerFactory), ConfigureListenOptions)) 418await using (var server = new TestServer(context => Task.CompletedTask, new TestServiceContext(LoggerFactory), ConfigureListenOptions)) 452await using (var server = new TestServer(context => Task.CompletedTask, new TestServiceContext(LoggerFactory), ConfigureListenOptions)) 480await using (var server = new TestServer(context => Task.CompletedTask, new TestServiceContext(LoggerFactory), ConfigureListenOptions)) 510await using (var server = new TestServer(context => 546await using var server = new TestServer(async context => 590await using var server = new TestServer(async context => 631await using var server = new TestServer(async context => 674await using var server = new TestServer(async context => 722await using var server = new TestServer(async context => 764await using var server = new TestServer(async context => 842await using (var server = new TestServer( 891await using var server = new TestServer(async context => 928await using var server = new TestServer(context => Task.CompletedTask, 961await using var server = new TestServer(context => Task.CompletedTask, 994await using var server = new TestServer(context => Task.CompletedTask, 1027await using var server = new TestServer(async context => 1074await using var server = new TestServer(async context => 1118await using (var server = new TestServer(context => context.Response.WriteAsync(context.Request.Scheme), new TestServiceContext(LoggerFactory), ConfigureListenOptions)) 1141await using (var server = new TestServer(context => context.Response.WriteAsync("hello world"), new TestServiceContext(LoggerFactory), ConfigureListenOptions)) 1179await using (var server = new TestServer(context => Task.CompletedTask, new TestServiceContext(LoggerFactory), ConfigureListenOptions)) 1206await using (var server = new TestServer(context => Task.CompletedTask, new TestServiceContext(LoggerFactory), ConfigureListenOptions)) 1231await using (var server = new TestServer(context => Task.CompletedTask, new TestServiceContext(LoggerFactory), ConfigureListenOptions)) 1256await using (var server = new TestServer(context => Task.CompletedTask, new TestServiceContext(LoggerFactory), ConfigureListenOptions)) 1290await using (var server = new TestServer(app, new TestServiceContext(LoggerFactory), ConfigureListenOptions)) 1389await using var server = new TestServer(context => Task.CompletedTask, new TestServiceContext(LoggerFactory), ConfigureListenOptions);
HttpsTests.cs (18)
83await using (var server = new TestServer(context => Task.CompletedTask, 175await using (var server = new TestServer(context => Task.CompletedTask, 203await using (var server = new TestServer(context => Task.CompletedTask, 232await using (var server = new TestServer(async httpContext => 279await using (var server = new TestServer(async httpContext => 322await using (var server = new TestServer(context => Task.CompletedTask, 348await using (var server = new TestServer(context => Task.CompletedTask, 370await using (var server = new TestServer(context => Task.CompletedTask, 400await using (var server = new TestServer(context => Task.CompletedTask, 441await using (var server = new TestServer(context => Task.CompletedTask, 481await using (var server = new TestServer(context => Task.CompletedTask, 526await using (var server = new TestServer(context => Task.CompletedTask, 562await using var server = new TestServer(context => Task.CompletedTask, 597await using (var server = new TestServer(context => Task.CompletedTask, 643await using (var server = new TestServer(context => Task.CompletedTask, 683await using (var server = new TestServer(context => Task.CompletedTask, 719await using (var server = new TestServer(context => Task.CompletedTask, 755await using (var server = new TestServer(context => Task.CompletedTask,
KeepAliveTimeoutTests.cs (7)
32await using (var server = CreateServer(testContext)) 64await using (var server = CreateServer(testContext)) 97await using (var server = CreateServer(testContext)) 143await using (var server = CreateServer(testContext, longRunningCt: cts.Token)) 187await using (var server = CreateServer(testContext)) 213await using (var server = CreateServer(testContext, upgradeCt: cts.Token)) 247private TestServer CreateServer(TestServiceContext context, CancellationToken longRunningCt = default, CancellationToken upgradeCt = default)
KestrelMetricsTests.cs (14)
69await using var server = new TestServer(EchoApp, serviceContext, listenOptions); 128await using var server = new TestServer(EchoApp, serviceContext, listenOptions); 171await using var server = new TestServer(async context => 217var server = new TestServer(async c => 283var server = new TestServer(async c => 348await using var server = new TestServer(EchoApp, serviceContext, listenOptions); 403await using var server = new TestServer(async c => 462await using var server = new TestServer(EchoApp, serviceContext, listenOptions); 502await using var server = new TestServer(UpgradeApp, serviceContext, listenOptions); 537var server = new TestServer(async context => 619var server = new TestServer(async context => 684await using (var server = new TestServer(context => 771var server = new TestServer( 852await using (var server = new TestServer(context =>
LoggingConnectionMiddlewareTests.cs (1)
20await using (var server = new TestServer(context =>
MaxRequestBodySizeTests.cs (13)
31await using (var server = new TestServer(async context => 73await using (var server = new TestServer(async context => 120await using (var server = new TestServer(async context => 169await using (var server = new TestServer(async context => 211await using (var server = new TestServer(async context => 251await using (var server = new TestServer(context => context.Request.Body.CopyToAsync(Stream.Null), 288await using (var server = new TestServer(async context => 328await using (var server = new TestServer(async context => 373await using (var server = new TestServer(async context => 421await using (var server = new TestServer(async context => 468await using (var server = new TestServer(async context => 513await using (var server = new TestServer(async context => 586await using (var server = new TestServer(async context =>
MaxRequestLineSizeTests.cs (3)
34await using (var server = CreateServer(limit, testMeterFactory)) 65await using (var server = CreateServer(requestLine.Length - 1, testMeterFactory)) 83private TestServer CreateServer(int maxRequestLineSize, IMeterFactory meterFactory)
RequestBodyTimeoutTests.cs (3)
30await using (var server = new TestServer(context => 114await using (var server = new TestServer(context => 161await using (var server = new TestServer(async context =>
RequestHeaderLimitsTests.cs (5)
32await using (var server = CreateServer(maxRequestHeadersTotalSize: headers.Length + extraLimit, meterFactory: testMeterFactory)) 69await using (var server = CreateServer(maxRequestHeaderCount: maxHeaderCount, meterFactory: testMeterFactory)) 100await using (var server = CreateServer(maxRequestHeadersTotalSize: headers.Length - 1, meterFactory: testMeterFactory)) 129await using (var server = CreateServer(maxRequestHeaderCount: maxHeaderCount, meterFactory: testMeterFactory)) 161private TestServer CreateServer(int? maxRequestHeaderCount = null, int? maxRequestHeadersTotalSize = null, IMeterFactory meterFactory = null)
RequestHeadersTimeoutTests.cs (5)
31await using (var server = CreateServer(testContext)) 60await using (var server = CreateServer(testContext)) 98await using (var server = CreateServer(testContext)) 128await using (var server = CreateServer(testContext)) 151private TestServer CreateServer(TestServiceContext context)
RequestTargetProcessingTests.cs (3)
22await using (var server = new TestServer(async context => 67await using (var server = new TestServer(async context => 99await using (var server = new TestServer(async context =>
RequestTests.cs (57)
30await using (var server = new TestServer(async context => 61await using (var server = new TestServer(async context => 82await using (var server = new TestServer(async context => 116await using (var server = new TestServer(async context => 182await using (var server = new TestServer(async context => 235await using (var server = new TestServer(async context => 287await using (var server = new TestServer(TestApp.EchoAppChunked, testContext)) 343await using var server = new TestServer(ExecuteApplication, testContext); 380await using var server = new TestServer(ExecuteApplication, testContext); 414await using var server = new TestServer(ExecuteApplication, testContext); 452await using var server = new TestServer(ExecuteApplication, testContext); 493await using var server = new TestServer(ExecuteApplication, testContext); 536await using var server = new TestServer(ExecuteApplication, testContext); 540private static async Task TestAsyncLocalValues(TestServiceContext testContext, TestServer server) 575await using (var server = new TestServer(async context => 592await using (var server = new TestServer(async context => 652await using (var server = new TestServer(TestApp.EchoAppChunked, testContext)) 686await using (var server = new TestServer(TestApp.EchoApp, testContext)) 725await using (var server = new TestServer(TestApp.EchoAppChunked, testContext)) 759await using (var server = new TestServer(TestApp.EchoApp, testContext)) 798await using (var server = new TestServer(TestApp.EchoAppChunked, testContext)) 854await using (var server = new TestServer(TestApp.EchoAppChunked, testContext)) 890await using (var server = new TestServer(TestApp.EchoAppChunked, testContext)) 922await using (var server = new TestServer(async httpContext => 968await using (var server = new TestServer(async httpContext => 1015await using (var server = new TestServer(async httpContext => 1047await using (var server = new TestServer(async httpContext => 1082await using (var server = new TestServer(async httpContext => 1121await using (var server = new TestServer(async httpContext => 1181await using (var server = new TestServer(async httpContext => 1236await using (var server = new TestServer(async httpContext => 1274await using (var server = new TestServer(TestApp.EchoAppChunked, testContext)) 1306await using (var server = new TestServer(httpContext => 1355await using (var server = new TestServer(async context => 1396await using (var server = new TestServer(async context => 1464await using (var server = new TestServer(context => Task.CompletedTask, new TestServiceContext(LoggerFactory))) 1482await using (var server = new TestServer(context => Task.CompletedTask, new TestServiceContext(LoggerFactory))) 1523await using (var server = new TestServer(context => Task.CompletedTask, new TestServiceContext(LoggerFactory))) 1571await using (var server = new TestServer(context => Task.CompletedTask, new TestServiceContext(LoggerFactory))) 1597await using (var server = new TestServer(async context => 1632await using (var server = new TestServer(async context => 1686await using (var server = new TestServer(async context => 1737await using (var server = new TestServer(async context => 1785await using (var server = new TestServer(async context => 1830await using (var server = new TestServer(async context => 1869await using (var server = new TestServer(async httpContext => 1903await using (var server = new TestServer(async httpContext => 1953await using (var server = new TestServer(async httpContext => 1998await using (var server = new TestServer(async httpContext => 2038await using (var server = new TestServer(async httpContext => 2082await using (var server = new TestServer(context => 2137await using (var server = new TestServer(context => 2199await using (var server = new TestServer(context => 2231await using (var server = new TestServer(_ => Task.CompletedTask, testContext)) 2263await using (var server = new TestServer(context => 2292await using (var server = new TestServer(context => 2335await using (var server = new TestServer(context => Task.CompletedTask, new TestServiceContext(LoggerFactory, disableHttp1LineFeedTerminators: false)))
ResponseDrainingTests.cs (1)
28await using (var server = new TestServer(context =>
ResponseHeaderTests.cs (4)
21await using var server = new TestServer(context => 52await using var server = new TestServer(context => 89await using var server = new TestServer(context => 110await using var server = new TestServer(context =>
ResponseTests.cs (118)
41await using (var server = new TestServer(context => 79await using (var server = new TestServer(async context => 114await using (var server = new TestServer(async context => 152await using (var server = new TestServer(async context => 217await using var server = new TestServer(async context => 246await using var server = new TestServer(async context => 375await using (var server = new TestServer(async context => 407await using (var server = new TestServer(async context => 444await using (var server = new TestServer(httpContext => 482await using (var server = new TestServer(async httpContext => 518await using (var server = new TestServer(async httpContext => 552await using (var server = new TestServer(httpContext => 577await using (var server = new TestServer(httpContext => 677await using (var server = new TestServer(async httpContext => 715await using (var server = new TestServer(async httpContext => 755await using (var server = new TestServer(async httpContext => 794await using (var server = new TestServer(async httpContext => 836await using (var server = new TestServer(async httpContext => 877await using (var server = new TestServer(httpContext => 913await using (var server = new TestServer(async httpContext => 957await using (var server = new TestServer(async httpContext => 998await using (var server = new TestServer(async httpContext => 1037await using (var server = new TestServer(async httpContext => 1072await using (var server = new TestServer(async httpContext => 1115await using (var server = new TestServer(async httpContext => 1169await using (var server = new TestServer(async httpContext => 1218await using (var server = new TestServer(async httpContext => 1265await using (var server = new TestServer(httpContext => 1306await using (var server = new TestServer(async httpContext => 1344await using (var server = new TestServer(async httpContext => 1380await using (var server = new TestServer(async httpContext => 1410await using (var server = new TestServer(httpContext => 1438await using (var server = new TestServer(async httpContext => 1471await using (var server = new TestServer(async httpContext => 1502await using (var server = new TestServer(async httpContext => 1537await using (var server = new TestServer(async httpContext => 1577await using (var server = new TestServer(async httpContext => 1622await using (var server = new TestServer(async httpContext => 1668await using (var server = new TestServer(async httpContext => 1711await using (var server = new TestServer(async httpContext => 1753await using (var server = new TestServer(async httpContext => 1795await using (var server = new TestServer(async httpContext => 1840await using (var server = new TestServer(async httpContext => 1883await using (var server = new TestServer(httpContext => 1923await using (var server = new TestServer(async httpContext => 1966await using (var server = new TestServer(async httpContext => 2003await using (var server = new TestServer(httpContext => Task.CompletedTask, 2037await using (var server = new TestServer(httpContext => 2107await using (var server = new TestServer(httpContext => 2153await using (var server = new TestServer(async httpContext => 2202await using (var server = new TestServer(TestApp.EchoApp, serviceContext)) 2226await using (var server = new TestServer(TestApp.EmptyApp, testContext)) 2258await using (var server = new TestServer(async httpContext => 2302await using (var server = new TestServer(TestApp.EmptyApp, testContext)) 2325await using (var server = new TestServer(async httpContext => 2374await using (var server = new TestServer(async httpContext => 2424await using (var server = new TestServer(httpContext => 2477await using (var server = new TestServer(async httpContext => 2533await using (var server = new TestServer(async httpContext => 2578await using (var server = new TestServer(async httpContext => 2628await using (var server = new TestServer(async httpContext => 2680await using (var server = new TestServer(async httpContext => 2725await using (var server = new TestServer(async httpContext => 2766await using (var server = new TestServer(async httpContext => 2797await using (var server = new TestServer(httpContext => 2822await using (var server = new TestServer(httpContext => 2851await using (var server = new TestServer(async httpContext => 2885await using (var server = new TestServer(httpContext => 2932await using (var server = new TestServer(async httpContext => 2961await using (var server = new TestServer(async httpContext => 2989await using (var server = new TestServer(async httpContext => 3019await using (var server = new TestServer(async httpContext => 3051await using (var server = new TestServer(async httpContext => 3081await using (var server = new TestServer(async httpContext => 3109await using (var server = new TestServer(async httpContext => 3140await using (var server = new TestServer(async httpContext => 3176await using (var server = new TestServer(async httpContext => 3207await using (var server = new TestServer(async httpContext => 3253await using (var server = new TestServer(httpContext => 3285await using (var server = new TestServer(async httpContext => 3321await using (var server = new TestServer(async context => 3372await using (var server = new TestServer(async context => 3416await using (var server = new TestServer(async context => 3446await using (var server = new TestServer(context => 3477await using (var server = new TestServer(context => 3512await using (var server = new TestServer(context => 3546await using (var server = new TestServer(httpContext => 3577await using (var server = new TestServer(async httpContext => 3610await using (var server = new TestServer(httpContext => 3640await using (var server = new TestServer(httpContext => 3672await using (var server = new TestServer(httpContext => 3710await using (var server = new TestServer(async httpContext => 3747await using (var server = new TestServer(async httpContext => 3773await using (var server = new TestServer(async httpContext => 3815await using (var server = new TestServer(async httpContext => 3843await using (var server = new TestServer(async httpContext => 3874await using var server = new TestServer(async httpContext => 3907await using (var server = new TestServer(async httpContext => 3958await using (var server = new TestServer(async httpContext => 4008await using (var server = new TestServer(async httpContext => 4069await using (var server = new TestServer(httpContext => 4114await using (var server = new TestServer(async httpContext => 4142await using (var server = new TestServer(async httpContext => 4174await using (var server = new TestServer(async httpContext => 4203await using (var server = new TestServer(async httpContext => 4238await using (var server = new TestServer(async httpContext => 4272await using (var server = new TestServer(httpContext => 4303await using (var server = new TestServer(async httpContext => 4335await using (var server = new TestServer(async httpContext => 4368await using (var server = new TestServer( 4405await using (var server = new TestServer( 4442await using (var server = new TestServer( 4475await using (var server = new TestServer( 4500await using (var server = new TestServer( 4540await using (var server = new TestServer( 4574await using var server = new TestServer(async context => 4624await using var server = new TestServer(async context => 4695await using (var server = new TestServer(handler, new TestServiceContext(loggerFactory),
TestTransport\InMemoryHttpClientSlim.cs (2)
22private readonly TestServer _inMemoryTestServer; 24public InMemoryHttpClientSlim(TestServer testServer)
UpgradeTests.cs (11)
26await using (var server = new TestServer(async context => 69await using (var server = new TestServer(async context => 121await using (var server = new TestServer(async context => 161await using (var server = new TestServer(async context => 195await using (var server = new TestServer(async context => 230await using (var server = new TestServer(async context => 271await using (var server = new TestServer(async context => 308await using (var server = new TestServer(async context => 356await using (var server = new TestServer(async context => 393await using var server = new TestServer(async context => 438await using (var server = new TestServer(async context =>