Skip to content
This repository was archived by the owner on Dec 18, 2018. It is now read-only.

Commit 98fd274

Browse files
committed
Review feedback 1: update test
1 parent a4ec6b3 commit 98fd274

File tree

1 file changed

+17
-16
lines changed

1 file changed

+17
-16
lines changed

test/Microsoft.AspNet.Server.Kestrel.FunctionalTests/RequestTests.cs

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -90,22 +90,23 @@ private async Task TestRemoteIPAddress(string registerAddress, string requestAdd
9090
{ "server.urls", $"http://{registerAddress}:{port}" }
9191
}).Build();
9292

93-
var builder = new WebHostBuilder(config).UseServer("Microsoft.AspNet.Server.Kestrel")
94-
.UseStartup(app =>
95-
{
96-
app.Run(async context =>
97-
{
98-
var connection = context.Connection;
99-
await context.Response.WriteAsync(JsonConvert.SerializeObject(new
100-
{
101-
RemoteIPAddress = connection.RemoteIpAddress?.ToString(),
102-
RemotePort = connection.RemotePort,
103-
LocalIPAddress = connection.LocalIpAddress?.ToString(),
104-
LocalPort = connection.LocalPort,
105-
IsLocal = connection.IsLocal
106-
}));
107-
});
108-
});
93+
var builder = new WebHostBuilder(config)
94+
.UseServer("Microsoft.AspNet.Server.Kestrel")
95+
.UseStartup(app =>
96+
{
97+
app.Run(async context =>
98+
{
99+
var connection = context.Connection;
100+
await context.Response.WriteAsync(JsonConvert.SerializeObject(new
101+
{
102+
RemoteIPAddress = connection.RemoteIpAddress?.ToString(),
103+
RemotePort = connection.RemotePort,
104+
LocalIPAddress = connection.LocalIpAddress?.ToString(),
105+
LocalPort = connection.LocalPort,
106+
IsLocal = connection.IsLocal
107+
}));
108+
});
109+
});
109110

110111
using (var app = builder.Build().Start())
111112
using (var client = new HttpClient())

0 commit comments

Comments
 (0)