Remove single moq usage
This commit is contained in:
parent
d01c8bb1cf
commit
82ed1a4eee
|
|
@ -22,7 +22,6 @@ using Microsoft.Extensions.DependencyInjection;
|
|||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.Extensions.OptionsModel;
|
||||
using Microsoft.Extensions.Primitives;
|
||||
using Moq;
|
||||
using Xunit;
|
||||
|
||||
namespace Microsoft.AspNet.Hosting
|
||||
|
|
@ -382,7 +381,7 @@ namespace Microsoft.AspNet.Hosting
|
|||
httpContext = innerHttpContext;
|
||||
return Task.FromResult(0);
|
||||
});
|
||||
var requestIdentifierFeature = new Mock<IHttpRequestIdentifierFeature>().Object;
|
||||
var requestIdentifierFeature = new StubHttpRequestIdentifierFeature();
|
||||
_featuresSupportedByThisHost[typeof(IHttpRequestIdentifierFeature)] = requestIdentifierFeature;
|
||||
var hostingEngine = CreateHostingEngine(requestDelegate);
|
||||
|
||||
|
|
@ -666,5 +665,10 @@ namespace Microsoft.AspNet.Hosting
|
|||
|
||||
IEnumerator IEnumerable.GetEnumerator() => null;
|
||||
}
|
||||
|
||||
private class StubHttpRequestIdentifierFeature : IHttpRequestIdentifierFeature
|
||||
{
|
||||
public string TraceIdentifier { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,11 +9,11 @@
|
|||
"Microsoft.AspNet.Testing": "1.0.0-*",
|
||||
"Microsoft.Extensions.OptionsModel": "1.0.0-*",
|
||||
"Microsoft.Extensions.PlatformAbstractions": "1.0.0-*",
|
||||
"Moq": "4.2.1312.1622",
|
||||
"xunit.runner.aspnet": "2.0.0-aspnet-*"
|
||||
},
|
||||
"frameworks": {
|
||||
"dnx451": {}
|
||||
"dnx451": { },
|
||||
"dnxcore50": { }
|
||||
},
|
||||
"commands": {
|
||||
"test": "xunit.runner.aspnet"
|
||||
|
|
|
|||
Loading…
Reference in New Issue