Beispiel #1
0
        public void No_match_if_not_equal()
        {
            var isEqual = new IsEqualMatcher <string>("test");

            var matches = isEqual.Matches("somethingelse");

            Assert.False(matches);
        }
Beispiel #2
0
        public void No_match_if_compared_to_null()
        {
            var isEqual = new IsEqualMatcher <string>("test");

            var matches = isEqual.Matches(null);

            Assert.False(matches);
            Assert.False(Is.EqualTo <string>(null).Matches("test"));
        }
Beispiel #3
0
        public void Append_description()
        {
            const string test    = "test";
            var          isEqual = IsEqualMatcher <string> .EqualTo(test);

            var description = new StringDescription();

            isEqual.DescribeTo(description);

            Assert.Equal("\"" + test + "\"", description.ToString());
        }
Beispiel #4
0
 public static IMatcher <bool> False()
 {
     return(IsEqualMatcher <bool> .EqualTo(false));
 }
Beispiel #5
0
 public static IMatcher <bool> True()
 {
     return(IsEqualMatcher <bool> .EqualTo(true));
 }
Beispiel #6
0
 public static IMatcher <T> EqualTo <T>(T value)
 {
     return(IsEqualMatcher <T> .EqualTo(value));
 }