Provides extensions for substitutes to facilitate easier interrogation of the call history, eg when you want to pull an argument for an invocation to test against.
More...
|
static CallWrapper[] | ReceivedCalls (this object substitute, Func< CallWrapper, bool > filter) |
| Retrieve all received calls for the provided substitute, filtered by the provided filter.
|
static CallWrapper[] | ReceivedCalls (this object substitute, string methodName) |
| Retrieve all recorded calls for the provided method on the provided substitute.
|
static bool | DoesNotHaveUniqueMethodCalled (this object objOrType, string seek) |
| Tests if a type or object only has one method with the provided name (ie no overloads, and a method with that name exists)
|
Provides extensions for substitutes to facilitate easier interrogation of the call history, eg when you want to pull an argument for an invocation to test against.
◆ DoesNotHaveUniqueMethodCalled()
bool PeanutButter.TestUtils.Generic.SubstituteExtensions.DoesNotHaveUniqueMethodCalled |
( |
this object | objOrType, |
|
|
string | seek ) |
|
static |
Tests if a type or object only has one method with the provided name (ie no overloads, and a method with that name exists)
- Parameters
-
- Returns
- Exceptions
-
◆ ReceivedCalls() [1/2]
CallWrapper[] PeanutButter.TestUtils.Generic.SubstituteExtensions.ReceivedCalls |
( |
this object | substitute, |
|
|
Func< CallWrapper, bool > | filter ) |
|
static |
Retrieve all received calls for the provided substitute, filtered by the provided filter.
- Parameters
-
- Returns
◆ ReceivedCalls() [2/2]
CallWrapper[] PeanutButter.TestUtils.Generic.SubstituteExtensions.ReceivedCalls |
( |
this object | substitute, |
|
|
string | methodName ) |
|
static |
Retrieve all recorded calls for the provided method on the provided substitute.
- Parameters
-
- Returns
- Exceptions
-
ArgumentNullException | |
ArgumentException | |
The documentation for this class was generated from the following file:
- source/TestUtils/PeanutButter.TestUtils.Generic/SubstituteExtensions.cs