public void SetUp()
        {
            _mocks = new MockRepository();
            var httpContext = new TestHttpContext();
            var requestContext = new RequestContext(httpContext, new RouteData());
            var controller = _mocks.StrictMock<ControllerBase>();
            _mocks.Replay(controller);

            var viewEngine = new BooViewEngine
                             	{
                             		ViewSourceLoader = new FileSystemViewSourceLoader(VIEW_ROOT_DIRECTORY),
                             		Options = new BooViewEngineOptions()
                             	};
            viewEngine.Initialize();

            _viewEngine = new BrailViewFactory(viewEngine);
            _mocks.ReplayAll();
        }
 public void SetUp()
 {
     _mocks = new MockRepository();
     _viewEngine = _mocks.DynamicMock<BooViewEngine>();
     _view = _mocks.StrictMock<BrailBase>(_viewEngine);
 }
 protected TestBrailBase(BooViewEngine viewEngine)
     : base(viewEngine)
 {
 }
        public void SetUp()
        {
            _output = new StringWriter();
            _mocks = new MockRepository();
            _httpContext = _mocks.DynamicMock<HttpContextBase>(); //new TestHttpContext();
            var response = _mocks.DynamicMock<HttpResponseBase>();
            SetupResult.For(response.Output).Return(_output);
            SetupResult.For(_httpContext.Request).Return(_mocks.DynamicMock<HttpRequestBase>());
            SetupResult.For(_httpContext.Response).Return(response);
            //			SetupResult.For(_httpContext.Session).Return(_mocks.DynamicMock<HttpSessionStateBase>());
            var requestContext = new RequestContext(_httpContext, new RouteData());
            _controller = _mocks.StrictMock<Controller>();
            _mocks.Replay(_controller);

            controllerContext = new ControllerContext(requestContext, _controller);
            //			_viewContext = new ViewContext(controllerContext, null, new ViewDataDictionary(), null);

            _viewEngine = new BooViewEngine
                          	{
                          		ViewSourceLoader = new FileSystemViewSourceLoader(VIEW_ROOT_DIRECTORY),
                          		Options = new BooViewEngineOptions()
                          	};
            _viewEngine.Initialize();
            _mocks.Replay(_httpContext);
        }
Exemple #5
0
 public BrailPreProcessor(BooViewEngine booViewEngine)
 {
     this.booViewEngine = booViewEngine;
 }
Exemple #6
0
        /// <summary>
        /// Initializes a new instance of the <see cref="BrailBase"/> class.
        /// </summary>
        /// <param name="viewEngine">The view engine.</param>
        /// <param name="output">The output.</param>
        public BrailBase(BooViewEngine viewEngine)
//		(BooViewEngine viewEngine, TextWriter output, IEngineContext context, IController __controller, IControllerContext __controllerContext)
        {
            this.viewEngine = viewEngine;
        }
Exemple #7
0
 //        (BooViewEngine viewEngine, TextWriter output, IEngineContext context, IController __controller, IControllerContext __controllerContext)
 /// <summary>
 /// Initializes a new instance of the <see cref="BrailBase"/> class.
 /// </summary>
 /// <param name="viewEngine">The view engine.</param>
 /// <param name="output">The output.</param>
 public BrailBase(BooViewEngine viewEngine)
 {
     this.viewEngine = viewEngine;
 }