示例#1
0
        public FakeController()
        {
            var httpContext      = new FakeHttpContext();
            var routeData        = new RouteData();
            var actionDescriptor = new ControllerActionDescriptor();
            var actionContext    = new ActionContext(httpContext, routeData, actionDescriptor);

            ControllerContext = new ControllerContext(actionContext);
        }
示例#2
0
        public FakeViewContext()
        {
            HttpContext = new FakeHttpContext();
            View        = new FakeView();

            RouteData        = new RouteData();
            ActionDescriptor = new ActionDescriptor();
            FormContext      = new FormContext();
            Writer           = new StringWriter();
        }