public bool IsSatisfiedBy(object argument) { if (!argument.IsCompatibleWith(ForType)) { return(false); } try { return(matcher.IsSatisfiedBy(argument)); } catch (Exception e) { if (fluentExceptionType.Value.IsInstanceOfType(e)) { // We explicitly let exceptions from Fluent Assertions escape throw e; } else { // Follow normal NSubstitute behaviour where exception from matcher => non-match return(false); } } }
public bool IsSatisfiedBy(object argument) { if (!IsCompatibleWith(argument)) { return(false); } try { return(_matcher.IsSatisfiedBy(argument)); } catch { return(false); } }
public bool IsSatisfiedBy(object argument) => _matcher.IsSatisfiedBy((T)argument);
public bool IsSatisfiedBy(object argument) { return(_genericMatcher.IsSatisfiedBy((T)argument)); }