public void Setup()
        {
            _container = new WindsorContainer();
            _factory = new WindsorControllerFactory(_container);

            _container.AddComponent("simplecontroller", typeof(WindsorSimpleController));
            _container.AddComponent("StubDependency", typeof(IDependency), typeof(StubDependency));
            _container.AddComponent("dependencycontroller", typeof(WindsorDependencyController));

            _factory.InitializeWithControllerTypes(typeof(WindsorSimpleController), typeof(WindsorDependencyController));

            var mocks = new MockRepository();
            _context = new RequestContext(mocks.DynamicHttpContextBase(), new RouteData());
            mocks.ReplayAll();
        }
        public void Setup()
        {
            _container = new UnityContainer();
            _container.RegisterType<UnitySimpleController, UnitySimpleController>();
            _container.RegisterType<IDependency, StubDependency>();
            _container.RegisterType<UnityDependencyController, UnityDependencyController>();

            _mocks = new MockRepository();
            _mockContext = _mocks.PartialMock<HttpContextBase>();
            _mockContext.Stub(c => c.ApplicationInstance).Return(new MockApplication(_container));
            _mocks.ReplayAll();

            _context = new RequestContext(_mockContext, new RouteData());
            _factory = new UnityControllerFactory();
            _factory.InitializeWithControllerTypes(typeof(UnitySimpleController), typeof(UnityDependencyController));
        }
        public void Setup()
        {
            _container = new UnityContainer();
            _container.RegisterType <UnitySimpleController, UnitySimpleController>();
            _container.RegisterType <IDependency, StubDependency>();
            _container.RegisterType <UnityDependencyController, UnityDependencyController>();

            _mocks       = new MockRepository();
            _mockContext = _mocks.PartialMock <HttpContextBase>();
            _mockContext.Stub(c => c.ApplicationInstance).Return(new MockApplication(_container));
            _mocks.ReplayAll();

            _context = new RequestContext(_mockContext, new RouteData());
            _factory = new UnityControllerFactory();
            _factory.InitializeWithControllerTypes(typeof(UnitySimpleController), typeof(UnityDependencyController));
        }
        public void Setup()
        {
            _container = new WindsorContainer();
            _factory   = new WindsorControllerFactory(_container);

            _container.AddComponent("simplecontroller", typeof(WindsorSimpleController));
            _container.AddComponent("StubDependency", typeof(IDependency), typeof(StubDependency));
            _container.AddComponent("dependencycontroller", typeof(WindsorDependencyController));

            _factory.InitializeWithControllerTypes(typeof(WindsorSimpleController), typeof(WindsorDependencyController));

            var mocks = new MockRepository();

            _context = new RequestContext(mocks.DynamicHttpContextBase(), new RouteData());
            mocks.ReplayAll();
        }