Пример #1
0
        /// <summary>Determines if behavior is intended for a call.</summary>
        /// <param name="input">Details of the call.</param>
        /// <returns>True if matched; false otherwise.</returns>
        internal bool MatchesCall(CallData input)
        {
            if (input == null)
            {
                throw new ArgumentNullException(nameof(input));
            }

            return((_methodName == input._methodName) &&
                   GenericsMatch(input._generics) &&
                   ArgsMatch(input._args));
        }
Пример #2
0
 /// <summary>Initializes a new instance of the <see cref="FakeCallException"/> class.</summary>
 /// <param name="data">Associated call data.</param>
 /// <param name="setup">Call data with behavior.</param>
 internal FakeCallException(CallData data, IEnumerable <CallData> setup) : base(BuildMessage(data, setup))
 {
 }
Пример #3
0
 /// <summary>Initializes a new instance of the <see cref="FakeVerifyException"/> class.</summary>
 /// <param name="data">Associated call data.</param>
 /// <param name="expected">Expected number of calls.</param>
 /// <param name="actual">Actual number of calls.</param>
 /// <param name="log">Log of all made calls.</param>
 internal FakeVerifyException(CallData data, Times expected, int actual, IEnumerable <CallData> log)
     : base(BuildMessage(data, expected.ToString(), actual, log))
 {
 }