public void No_match_if_object_is_null() { var matcher = new TestNonNullMatcher(s => true); var match = matcher.Matches(null); Assert.False(match, "Expected no match for null."); }
public void Pass_to_MatchesSafely_if_not_null() { var flag = false; var matcher = new TestNonNullMatcher(s => { flag = true; return(true); }); matcher.Matches(""); Assert.True(flag, "Expected MatchesSafely(string, IDescription) to be called."); }