254 references to TestServer
InMemory.FunctionalTests (254)
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 (1)
230return new TestServer(app, serviceContext);
DefaultHeaderTests.cs (1)
21await using (var server = new TestServer(ctx => Task.CompletedTask, testContext))
EventSourceTests.cs (1)
41await using (var server = new TestServer(async context =>
KeepAliveTimeoutTests.cs (1)
255return new TestServer(httpContext => App(httpContext, longRunningCt, upgradeCt), context);
KestrelMetricsTests.cs (3)
217var server = new TestServer(async c => 283var server = new TestServer(async c => 403await using var server = new TestServer(async c =>
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)))
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 (104)
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 => 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 =>
TestTransport\TestServer.cs (1)
39: this(app, new TestServiceContext())
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 =>