Exemplo n.º 1
0
            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); }
 }
Exemplo n.º 3
0
 public bool IsSatisfiedBy(object argument) => _matcher.IsSatisfiedBy((T)argument);
Exemplo n.º 4
0
 public bool IsSatisfiedBy(object argument)
 {
     return(_genericMatcher.IsSatisfiedBy((T)argument));
 }