Renaming HttpContextFactory Create method
This commit is contained in:
parent
f931cb7c6d
commit
018f3d1815
|
|
@ -7,7 +7,7 @@ namespace Microsoft.AspNet.Http
|
||||||
{
|
{
|
||||||
public interface IHttpContextFactory
|
public interface IHttpContextFactory
|
||||||
{
|
{
|
||||||
HttpContext CreateHttpContext(IFeatureCollection featureCollection);
|
HttpContext Create(IFeatureCollection featureCollection);
|
||||||
void Dispose(HttpContext httpContext);
|
void Dispose(HttpContext httpContext);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ namespace Microsoft.AspNet.Http.Internal
|
||||||
_httpContextAccessor = httpContextAccessor;
|
_httpContextAccessor = httpContextAccessor;
|
||||||
}
|
}
|
||||||
|
|
||||||
public HttpContext CreateHttpContext(IFeatureCollection featureCollection)
|
public HttpContext Create(IFeatureCollection featureCollection)
|
||||||
{
|
{
|
||||||
var httpContext = new DefaultHttpContext(featureCollection);
|
var httpContext = new DefaultHttpContext(featureCollection);
|
||||||
_httpContextAccessor.HttpContext = httpContext;
|
_httpContextAccessor.HttpContext = httpContext;
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ namespace Microsoft.AspNet.Http.Internal
|
||||||
var contextFactory = new HttpContextFactory(accessor);
|
var contextFactory = new HttpContextFactory(accessor);
|
||||||
|
|
||||||
// Act
|
// Act
|
||||||
var context = contextFactory.CreateHttpContext(new FeatureCollection());
|
var context = contextFactory.Create(new FeatureCollection());
|
||||||
|
|
||||||
// Assert
|
// Assert
|
||||||
Assert.True(ReferenceEquals(context, accessor.HttpContext));
|
Assert.True(ReferenceEquals(context, accessor.HttpContext));
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue