Пример #1
0
        public void negative_test_by_key_alone()
        {
            var key = new NavigationKey("something");

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

            var matcher = new ByName("something");
            matcher.Matches(key).ShouldBeTrue();
        }
Пример #3
0
        public void negative_test_by_localization_key()
        {
            var key = new NavigationKey("something");

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

            matcher.Matches(key).ShouldBeFalse();
        }
Пример #4
0
 public bool Equals(ByName other)
 {
     if (ReferenceEquals(null, other))
     {
         return(false);
     }
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     return(Equals(other._name, _name));
 }
Пример #5
0
 public bool Equals(ByName other)
 {
     if (ReferenceEquals(null, other)) return false;
     if (ReferenceEquals(this, other)) return true;
     return Equals(other._name, _name);
 }
Пример #6
0
 public void default_key()
 {
     var matcher = new ByName("something");
     matcher.DefaultKey().ShouldBeOfType<NavigationKey>()
         .Key.ShouldEqual("something");
 }