File tree 3 files changed +2
-25
lines changed
src/Microsoft.AspNet.Hosting/Builder
test/Microsoft.AspNet.Hosting.Tests 3 files changed +2
-25
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ public class HttpContextFactory : IHttpContextFactory
11
11
{
12
12
public HttpContext CreateHttpContext ( IFeatureCollection featureCollection )
13
13
{
14
- return new DefaultHttpContext ( new FeatureCollection ( featureCollection ) ) ;
14
+ return new DefaultHttpContext ( featureCollection ) ;
15
15
}
16
16
}
17
17
}
Original file line number Diff line number Diff line change @@ -308,29 +308,6 @@ public void HostingEngine_CreatesDefaultRequestIdentifierFeature_IfNotPresent()
308
308
Assert . IsType < FastHttpRequestIdentifierFeature > ( httpContext . Features . Get < IHttpRequestIdentifierFeature > ( ) ) ;
309
309
}
310
310
311
- [ Fact ]
312
- public void Hosting_CreatesDefaultRequestIdentifierFeature_IfNotPresent_ForImmutableFeatureCollection ( )
313
- {
314
- // Arrange
315
- HttpContext httpContext = null ;
316
- var requestDelegate = new RequestDelegate ( innerHttpContext =>
317
- {
318
- httpContext = innerHttpContext ;
319
- return Task . FromResult ( 0 ) ;
320
- } ) ;
321
-
322
- _featuresSupportedByThisHost = new ReadOnlyFeatureCollection ( ) ;
323
-
324
- var hostingEngine = CreateHostingEngine ( requestDelegate ) ;
325
-
326
- // Act
327
- var disposable = hostingEngine . Start ( ) ;
328
-
329
- // Assert
330
- Assert . NotNull ( httpContext ) ;
331
- Assert . IsType < FastHttpRequestIdentifierFeature > ( httpContext . Features . Get < IHttpRequestIdentifierFeature > ( ) ) ;
332
- }
333
-
334
311
[ Fact ]
335
312
public void HostingEngine_DoesNot_CreateDefaultRequestIdentifierFeature_IfPresent ( )
336
313
{
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ public void Mutable_FeatureCollection_Wrapped_For_OwinFeatureCollection()
16
16
{
17
17
var env = new Dictionary < string , object > ( ) ;
18
18
var contextFactory = new HttpContextFactory ( ) ;
19
- var context = contextFactory . CreateHttpContext ( new OwinFeatureCollection ( env ) ) ;
19
+ var context = contextFactory . CreateHttpContext ( new FeatureCollection ( new OwinFeatureCollection ( env ) ) ) ;
20
20
21
21
// Setting a feature will throw if the above feature collection is not wrapped in a mutable feature collection.
22
22
context . Features . Set < ICustomFeature > ( new CustomFeature ( 100 ) ) ;
You can’t perform that action at this time.
0 commit comments