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

Commit 5543198

Browse files
committed
fixing tests after bad merge during rebase
1 parent 0218817 commit 5543198

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

test/Microsoft.AspNet.Hosting.Tests/WebHostBuilderTests.cs

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -71,17 +71,20 @@ public async Task StartupCtorThrows_Fallback()
7171
var engine = builder.UseServer(server).UseStartup<StartupCtorThrows>().Build();
7272
using (engine.Start())
7373
{
74-
await AssertResponseContains(server.RequestDelegate using (engine.Start())
75-
{
76-
await AssertResponseContains(serverFactory.Application, "Exception from constructor");
74+
await AssertResponseContains(server.RequestDelegate, "Exception from constructor");
7775
}
7876
}
79-
[Fact] public async Task IApplicationLifetimeRegisteredEvenWhenStartupCtorThrows_Fallback()
80-
{ var builder = CreateWebHostBuilder();
81-
var serverFactory = new TestServerFactory();Delegate
82-
var engine = builder.UseServer(serverFactory).UseStartup<StartupCtorThrows>().Build(); using (engine.Start())erver.RequestLD { var service = engine.ApplicationServices.GetServicse<IApplicationLifetime>();
77+
78+
[Fact] public async Task IApplicationLifetimeRegisteredEvenWhenStartupCtorThrows_Fallback()
79+
{
80+
var builder = CreateWebHostBuilder();
81+
var server = new TestServer();
82+
var engine = builder.UseServer(server).UseStartup<StartupCtorThrows>().Build();
83+
using (engine.Start())
84+
{
85+
var service = engine.ApplicationServices.GetServices<IApplicationLifetime>();
8386
Assert.NotNull(service);
84-
await AssertResponseContains(application, "Exception from constructor");
87+
await AssertResponseContains(server.RequestDelegate, "Exception from constructor");
8588
}
8689
}
8790

0 commit comments

Comments
 (0)