public void Configure(FubuRegistry registry)
 {
     registry.Navigation(x =>
     {
         x.ForMenu(StringConstants.BlogName);
         x.InsertAfter["Home"] = MenuNode.ForInput<AboutInputModel>("About");
     });
 }
        public void Configure(FubuRegistry registry)
        {
            registry.ApplyConvention<AuthorizationConvention>();

            registry.Navigation<AuthorizationNavigationRegistry>();

            registry.Services(x =>
            {
                x.ReplaceService<IAuthorizationFailureHandler,AuthorizationFailureHandler>();
            });
        }
        public void Configure(FubuRegistry registry)
        {
            registry.ApplyConvention<NavigationRootPolicy>(x =>
            {
                x.ForKey(DiagnosticKeys.Main);
                x.WrapWithChrome<DashboardChrome>();

                x.Alter(chain => chain.BehaviorChain.Route.Prepend("_fubu"));
            });

            registry.Navigation<DiagnosticsMenu>();
        }
        public void navigation_method_on_fubu_registry_works()
        {
            var registry = new FubuRegistry();
            registry.Navigation(x =>
            {
                x.ForMenu(FakeKeys.Key1);
                x.Add += MenuNode.Node(FakeKeys.Key2);
                x.Add += MenuNode.Node(FakeKeys.Key3);
            });

            var graph = BehaviorGraph.BuildFrom(registry).Settings.Get<NavigationGraph>();

            graph.MenuFor(FakeKeys.Key1).Select(x => x.Key)
                .ShouldHaveTheSameElementsAs(FakeKeys.Key2, FakeKeys.Key3);
        }
        public void import_with_strings_instead_of_StringToken()
        {
            var registry = new FubuRegistry();
            registry.Navigation(x =>
            {
                x.ForMenu("Key1");
                x.Add += MenuNode.Node("Key2");
                x.Add += MenuNode.Node("Key3");
            });

            registry.Import<ChildRegistry>();

            var graph = BehaviorGraph.BuildFrom(registry).Settings.Get<NavigationGraph>();

            graph.MenuFor("Key1").Select(x => x.Key)
                .ShouldHaveTheSameElementsAs(new NavigationKey("Key2"), new NavigationKey("Key3"));
        }
        public void import_navigation_from_child_registry()
        {
            var registry = new FubuRegistry();
            registry.Navigation(x =>
            {
                x.ForMenu(FakeKeys.Key1);
                x.Add += MenuNode.Node(FakeKeys.Key2);
                x.Add += MenuNode.Node(FakeKeys.Key3);
            });

            registry.Import<ChildRegistry>();

            var graph = BehaviorGraph.BuildFrom(registry).Settings.Get<NavigationGraph>();

            graph.MenuFor(FakeKeys.Key1).Select(x => x.Key)
                .ShouldHaveTheSameElementsAs(FakeKeys.Key2, FakeKeys.Key3, FakeKeys.Key4, FakeKeys.Key5);

            graph.MenuFor(FakeKeys.Key6).Select(x => x.Key)
                .ShouldHaveTheSameElementsAs(FakeKeys.Key7, FakeKeys.Key8);
        }