public void Description_is_concatenated_from_matchers() { var matcher = Matches.AnyOf(_failingMatcher, _successfulMatcher); var description = new StringDescription(); matcher.DescribeTo(description); Assert.Equal("(Failing matcher or Successful matcher)", description.ToString()); }
public void Match_if_any_matchers_succeed() { var matcher = Matches.AnyOf(_successfulMatcher, _failingMatcher); Assert.Equal(true, matcher.Matches("")); matcher = Matches.AnyOf(new List <IMatcher <string> > { _failingMatcher, _successfulMatcher }); Assert.Equal(true, matcher.Matches("")); }
public void Match_if_any_matchers_succeed() { var matcher = Matches.AnyOf(new[] { successfulMatcher, failingMatcher }); Assert.AreEqual(true, matcher.Matches(""), "Expected match if any matchers succeed."); matcher = Matches.AnyOf(new List <IMatcher <string> > { failingMatcher, successfulMatcher }); Assert.AreEqual(true, matcher.Matches(""), "Expected match if any matchers succeed."); }
public void Shortcut_matching_when_matcher_succeeds() { var matcher = Matches.AnyOf(_successfulMatcher, _explodingMatcher); Assert.Equal(true, matcher.Matches("")); }
public void No_match_if_all_matchers_fail() { var matcher = Matches.AnyOf(_failingMatcher, _failingMatcher); Assert.Equal(false, matcher.Matches("")); }
public void Shortcut_matching_when_matcher_succeeds() { var matcher = Matches.AnyOf(new[] { successfulMatcher, explodingMatcher }); Assert.AreEqual(true, matcher.Matches("")); }
public void No_match_if_all_matchers_fail() { var matcher = Matches.AnyOf(new[] { failingMatcher, failingMatcher }); Assert.AreEqual(false, matcher.Matches(""), "Expected no match if all matchers fail."); }