Example #1
0
        public void negative_test_by_key_alone()
        {
            var key = new NavigationKey("something");

            var matcher = new ByName("else");
            matcher.Matches(key).ShouldBeFalse();
        }
Example #2
0
        public void matches_by_key_alone()
        {
            var key = new NavigationKey("something");

            var matcher = new ByName("something");
            matcher.Matches(key).ShouldBeTrue();
        }
Example #3
0
        public void negative_test_by_localization_key()
        {
            var key = new NavigationKey("something");

            var matcher = new ByName("OtherKey:something");

            matcher.Matches(key).ShouldBeFalse();
        }
Example #4
0
        public void matches_positive()
        {
            var key = new NavigationKey("something");

            new Literal(key).Matches(key).ShouldBeTrue();
        }
Example #5
0
 public void matches_negative()
 {
     var key = new NavigationKey("something");
     new Literal(new NavigationKey("else")).Matches(key).ShouldBeFalse();
 }
Example #6
0
 public void default_key()
 {
     var key = new NavigationKey("something");
     new Literal(key).DefaultKey().ShouldBeTheSameAs(key);
 }
Example #7
0
 public void format_description()
 {
     var key = new NavigationKey("something");
     new AddAfter().FormatDescription("parent", key)
         .ShouldEqual("Insert '{0}' after 'parent'".ToFormat(key.ToLocalizationKey()));
 }
Example #8
0
 public void format_description()
 {
     var key = new NavigationKey("something");
     new AddChild().FormatDescription("parent", key)
         .ShouldEqual("Add '{0}' to menu 'parent'".ToFormat(key.ToLocalizationKey()));
 }