|
Hey,
Thanks for the great test helpers!
I was curious of you could add additional setups in the TestUtility.GetHttpContext(..) or offer an
extension point where we can add additional Moq Setup calls to the HttpContextBase
var mockContext = new Mock<HttpContextBase>();
...
mockContext.Setup(context => context.Request.AppRelativeCurrentExecutionFilePath).Returns(filePath);
mockContext.Setup(context => context.Items).Returns(new Dictionary<object, object>());
The reason for this is that we have some routing infrastructure which makes use of the HttpContext.Items property which blows up without these additional setups.
Thanks
|