CMajor.Tests.RouteTestHelper.CreateHttpContext C# (CSharp) Method

CreateHttpContext() private static method

private static CreateHttpContext ( string url, string httpMethod, string formMethod ) : System.Web.HttpContextBase
url string
httpMethod string
formMethod string
return System.Web.HttpContextBase
        private static HttpContextBase CreateHttpContext(string url, string httpMethod, string formMethod)
        {
            var httpContextMock = new Mock<HttpContextBase>();
            httpContextMock.Setup(c => c.Request.AppRelativeCurrentExecutionFilePath)
                .Returns(url);
            httpContextMock.Setup(c => c.Request.HttpMethod)
               .Returns(httpMethod);
            httpContextMock.Setup(c => c.Request.Form.Get("_method"))
                .Returns(formMethod);
            var httpContext = httpContextMock.Object;
            return httpContext;
        }