public void No_match_if_action_does_not_throw() { var matcher = new Throws<ArgumentException>(); var match = matcher.Matches(() => { }); NHAssert.That(match, Is.False()); }
public void No_match_if_thrown_exception_does_not_match_predicate() { var matcher = new Throws <ArgumentNullException>().With(e => e.Message == "something else"); var matches = matcher.Matches(DoIt); NHAssert.That(matches, Is.False()); }
public void No_match_if_action_throws_different_exception() { var matcher = new Throws <NullReferenceException>(); var match = matcher.Matches(DoIt); NHAssert.That(match, Is.False()); }
public void No_match_if_action_does_not_throw() { var matcher = new Throws <ArgumentException>(); var match = matcher.Matches(() => { }); NHAssert.That(match, Is.False()); }
public void No_match_if_thrown_exception_does_not_match_predicate() { var matcher = new Throws<ArgumentNullException>().With(e => e.Message == "something else"); var matches = matcher.Matches(DoIt); NHAssert.That(matches, Is.False()); }
public void No_match_if_action_throws_different_exception() { var matcher = new Throws<NullReferenceException>(); var match = matcher.Matches(DoIt); NHAssert.That(match, Is.False()); }