Example #1
0
        public void ShouldExecuteControllerFoundByMatch()
        {
            var router = new FunctionalRouter(
                new IRenderingControllerSearchDelegate[] { new FunctionalRenderingControllerSearchDelegate(x => typeof(CustomController)), },
                null);

            router.FindRenderingControllerType(this.CreateContext("sdf").Request).Type.Should().Be(typeof(CustomController));
        }
Example #2
0
        public void ShouldExecuteControllerNotFoundByMatch2()
        {
            var router = new FunctionalRouter(
                new IRenderingControllerSearchDelegate[] { new FunctionalRenderingControllerSearchDelegate(null), },
                null);

            router.FindRenderingControllerType(this.CreateContext("sdf").Request).Should().BeNull();
        }
Example #3
0
        public void ShouldExecuteControllerNotFoundNoDelegates()
        {
            var router = new FunctionalRouter(null, null);

            router.FindRenderingControllerType(this.CreateContext("sdf").Request).Should().BeNull();
        }