private static ControllerContext GetControllerContext(Stream stream) { return(new ControllerContext( MockHttpContextBase.Generate("/", stream), GetRouteData(), MockRepository.GenerateStub <ControllerBase>())); }
public SparkViewEngineFixture() { var settings = new SparkSettings(); this.actionContext = new ActionContext(httpContext, "Stub"); this.engine = new SparkViewEngine(settings) { ViewFolder = new FileSystemViewFolder("TestViews") }; this.httpContext = MockHttpContextBase.Generate("/", new StringWriter()); this.response = httpContext.Response; this.output = response.Output; }
public void SetUp() { var settings = new SparkSettings(); _factory = new SparkViewFactory(settings) { ViewFolder = new FileSystemViewFolder("FubuMVC.Tests.Views") }; _httpContext = MockHttpContextBase.Generate("/", new StringWriter()); _response = _httpContext.Response; _output = _response.Output; _routeData = new RouteData(); _routeData.Values.Add("action", "Index"); _actionContext = new ActionContext(new StubController().GetType().Namespace, "Stub"); }