コード例 #1
0
        public void find_home_is_not_set()
        {
            var graph = new FubuRegistry(x =>
            {
                x.Applies.ToThisAssembly();
                x.Actions.IncludeClassesSuffixedWithController();
            }).BuildGraph();

            graph.FindHomeChain().ShouldBeNull();
        }
コード例 #2
0
        public void find_home_is_not_null()
        {
            var graph = new FubuRegistry(x =>
            {
                x.Applies.ToThisAssembly();
                x.Actions.IncludeClassesSuffixedWithController();

                x.Routes.HomeIs <MyHomeController>(c => c.ThisIsHome());
            }).BuildGraph();

            graph.FindHomeChain().FirstCall().Method.Name.ShouldEqual("ThisIsHome");
        }
コード例 #3
0
ファイル: BehaviorGraphTester.cs プロジェクト: DRHouk/fubumvc
        public void should_remove_chain()
        {
            var graph = new FubuRegistry(x =>
            {
                x.Applies.ToThisAssembly();
                x.Actions.IncludeClassesSuffixedWithController();

                x.Routes.HomeIs <MyHomeController>(c => c.ThisIsHome());
            }).BuildGraph();

            var chain = graph.FindHomeChain();

            graph.RemoveChain(chain);

            graph
            .Behaviors
            .ShouldNotContain(chain);
        }