Ejemplo n.º 1
0
 private static ControllerContext GetControllerContext(Stream stream)
 {
     return(new ControllerContext(
                MockHttpContextBase.Generate("/", stream),
                GetRouteData(),
                MockRepository.GenerateStub <ControllerBase>()));
 }
Ejemplo n.º 2
0
        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;
        }
Ejemplo n.º 3
0
        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");
        }