public MyHttpContext(HttpContextTestData myTestData) { var request = new Mock <HttpRequestBase>(); if (myTestData != null && !string.IsNullOrEmpty(myTestData.Url)) { request.SetupGet(x => x.Url).Returns(new Uri(myTestData.Url)); } _context.SetupGet(x => x.Request).Returns(request.Object); }
public MyHttpContext(HttpContextTestData myTestData) { var request = new Mock<HttpRequestBase>(); if (myTestData != null && !string.IsNullOrEmpty(myTestData.Url)) request.SetupGet(x => x.Url).Returns(new Uri(myTestData.Url)); _context.SetupGet(x => x.Request).Returns(request.Object); }