public void GetControllerInstance_GivenRequestContextAndControllerType_ShouldResolveControllerType()
        {
            //---------------Set up test pack-------------------
            var kernel = Substitute.For<IKernel>();
            var windsorControllerFactory = new WindsorControllerFactory_EXPOSES_GetControllerInstance(kernel);
            var requestContext = new RequestContext();
            var controllerType = typeof (int);
            var expected = new FooController();
            kernel.Resolve(controllerType).Returns(expected);
            //---------------Assert Precondition----------------

            //---------------Execute Test ----------------------
            var result = windsorControllerFactory.BaseGetControllerInstance(requestContext, controllerType);
            //---------------Test Result -----------------------
            Assert.AreEqual(expected, result);
        }
        public void GetControllerInstance_GivenRequestContextAndNullControllerType_ShouldThrowHttpException()
        {
            //---------------Set up test pack-------------------
            var kernel = Substitute.For<IKernel>();
            var windsorControllerFactory = new WindsorControllerFactory_EXPOSES_GetControllerInstance(kernel);
            var requestContext = new RequestContext();

            //---------------Assert Precondition----------------

            //---------------Execute Test ----------------------
            var ex =
                Assert.Throws<HttpException>(
                    () => windsorControllerFactory.BaseGetControllerInstance(requestContext, null));
            //---------------Test Result -----------------------
            Assert.AreEqual(404, ex.GetHttpCode());
        }