1 instantiation of TestServer
IIS.Tests (1)
Utilities\TestServer.cs (1)
74
var server = new
TestServer
(appBuilder, loggerFactory, isHttps);
72 references to TestServer
IIS.Microbenchmarks (2)
PlaintextBenchmark.cs (2)
19
private
TestServer
_server;
26
_server =
TestServer
.Create(builder => builder.UseMiddleware<PlaintextMiddleware>(), new LoggerFactory(), new IISServerOptions()).GetAwaiter().GetResult();
IIS.Tests (70)
ClientDisconnectTests.cs (16)
29
using (
var
testServer = await
TestServer
.Create(
67
using (
var
testServer = await
TestServer
.Create(async ctx =>
110
using (
var
testServer = await
TestServer
.Create(async ctx =>
150
using (
var
testServer = await
TestServer
.Create(async ctx =>
192
using (
var
testServer = await
TestServer
.Create(async ctx =>
238
using (
var
testServer = await
TestServer
.Create(async ctx =>
291
using (
var
testServer = await
TestServer
.Create(async ctx =>
326
using (
var
testServer = await
TestServer
.Create(
ConnectionIdFeatureTests.cs (2)
20
using (
var
testServer = await
TestServer
.Create(ctx =>
HttpBodyControlFeatureTests.cs (2)
22
using (
var
testServer = await
TestServer
.Create(
MaxRequestBodySizeTests.cs (20)
31
using (
var
testServer = await
TestServer
.Create(
69
using (
var
testServer = await
TestServer
.Create(
107
using (
var
testServer = await
TestServer
.Create(
134
using (
var
testServer = await
TestServer
.Create(
164
using (
var
testServer = await
TestServer
.Create(
187
using (
var
testServer = await
TestServer
.Create(
211
using (
var
testServer = await
TestServer
.Create(
242
using (
var
testServer = await
TestServer
.Create(
277
using (
var
testServer = await
TestServer
.Create(
320
using (
var
testServer = await
TestServer
.Create(
ResponseAbortTests.cs (12)
22
using (
var
testServer = await
TestServer
.Create(
41
using (
var
testServer = await
TestServer
.Create(
71
using (
var
testServer = await
TestServer
.Create(
101
using (
var
testServer = await
TestServer
.Create(
129
using (
var
testServer = await
TestServer
.Create(
150
using (
var
testServer = await
TestServer
.Create(async ctx =>
ResponseBodySizeTests.cs (2)
19
using (
var
testServer = await
TestServer
.Create(
TestServerTest.cs (2)
24
using (
var
testServer = await
TestServer
.Create(ctx =>
TlsHandshakeFeatureTests.cs (4)
21
using (
var
testServer = await
TestServer
.CreateHttps(ctx =>
65
using (
var
testServer = await
TestServer
.Create(ctx =>
Utilities\SkipIfHostableWebCoreNotAvailibleAttribute.cs (2)
13
public bool IsMet { get; } = File.Exists(
TestServer
.HostableWebCoreLocation);
15
public string SkipReason { get; } = $"Hostable Web Core not available, {
TestServer
.HostableWebCoreLocation} not found.";
Utilities\TestServer.cs (8)
33
internal static string BasePath => Path.Combine(Path.GetDirectoryName(typeof(
TestServer
).Assembly.Location),
70
public static async Task<
TestServer
> Create(Action<IApplicationBuilder> appBuilder, ILoggerFactory loggerFactory, IISServerOptions options, bool isHttps = false)
74
var
server = new TestServer(appBuilder, loggerFactory, isHttps);
81
public static Task<
TestServer
> Create(RequestDelegate app, ILoggerFactory loggerFactory)
86
public static Task<
TestServer
> Create(RequestDelegate app, ILoggerFactory loggerFactory, IISServerOptions options)
91
public static Task<
TestServer
> CreateHttps(RequestDelegate app, ILoggerFactory loggerFactory)
116
HttpClient = new HttpClient(new LoggingHandler(new SocketsHttpHandler(), _loggerFactory.CreateLogger<
TestServer
>()))
151
.UseSetting(WebHostDefaults.ApplicationKey, typeof(
TestServer
).GetTypeInfo().Assembly.FullName)