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

Commit d04421d

Browse files
committed
Fixed test
1 parent 34704e7 commit d04421d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

test/Microsoft.AspNetCore.Hosting.Tests/HostingApplicationTests.cs

+3-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ public void DisposeContextDoesNotThrowWhenContextScopeIsNull()
2222
// Arrange
2323
var httpContextFactory = new HttpContextFactory(new DefaultObjectPoolProvider(), Options.Create(new FormOptions()), new HttpContextAccessor());
2424
var hostingApplication = new HostingApplication(ctx => Task.FromResult(0), new NullScopeLogger(), new NoopDiagnosticSource(), httpContextFactory);
25-
var context = hostingApplication.CreateContext(new FeatureCollection());
25+
var features = new FeatureCollection();
26+
features.Set<IHttpRequestFeature>(new HttpRequestFeature());
27+
var context = hostingApplication.CreateContext(features);
2628

2729
// Act/Assert
2830
hostingApplication.DisposeContext(context, null);

0 commit comments

Comments
 (0)