Ejemplo n.º 1
0
 public void title_as_key_and_default_text()
 {
     var key = new MenuItemAttribute("SomeTitle", "some title").Title;
     key.DefaultValue.ShouldEqual("some title");
     key.Key.ShouldEqual("SomeTitle");
     key.ShouldBeOfType<NavigationKey>();
 }
Ejemplo n.º 2
0
        public void build_registration_for_add_to()
        {
            var registration = new MenuItemAttribute("something")
            {
                AddChildTo = "else"
            }.ToMenuRegistrations(theChain).Single().ShouldBeOfType<MenuRegistration>();

            registration.Strategy.ShouldBeOfType<AddChild>();
            registration.Node.Resolve(null);
            registration.Node.BehaviorChain.ShouldBeTheSameAs(theChain);

            registration.Node.Key.ShouldEqual(new NavigationKey("something"));
            registration.Matcher.ShouldEqual(new ByName("else"));
        }
 public void Configure(ActionCall action, MenuItemAttribute att, NavigationGraph graph)
 {
     var registrations = att.ToMenuRegistrations(action.ParentChain());
     graph.AddRegistrations(registrations);
 }
        public void Configure(ActionCall action, MenuItemAttribute att, NavigationGraph graph)
        {
            var registrations = att.ToMenuRegistrations(action.ParentChain());

            graph.AddRegistrations(registrations);
        }