Class IFastMockNSubstituteExtensions
NSubstitute-specific convenience extensions for IFastMock<T>.
These stay in the provider package so the core abstractions remain provider agnostic.
Inheritance
IFastMockNSubstituteExtensions
Assembly: FastMoq.Provider.NSubstitute.dll
Syntax
public static class IFastMockNSubstituteExtensions
Methods
AsNSubstitute<T>(IFastMock<T>)
Returns the tracked substitute instance after validating that the active provider produced an NSubstitute substitute.
Declaration
public static T AsNSubstitute<T>(this IFastMock<T> fastMock) where T : class
Parameters
Returns
Type Parameters
ClearReceivedCalls<T>(IFastMock<T>)
Clears recorded calls on the tracked substitute.
Declaration
public static void ClearReceivedCalls<T>(this IFastMock<T> fastMock) where T : class
Parameters
Type Parameters
DidNotReceiveWithAnyArgs<T>(IFastMock<T>)
NSubstitute convenience shortcut for fastMock.AsNSubstitute().DidNotReceiveWithAnyArgs().
Declaration
public static T DidNotReceiveWithAnyArgs<T>(this IFastMock<T> fastMock) where T : class
Parameters
Returns
Type Parameters
DidNotReceive<T>(IFastMock<T>)
NSubstitute convenience shortcut for fastMock.AsNSubstitute().DidNotReceive().
Declaration
public static T DidNotReceive<T>(this IFastMock<T> fastMock) where T : class
Parameters
Returns
Type Parameters
ReceivedWithAnyArgs<T>(IFastMock<T>)
NSubstitute convenience shortcut for fastMock.AsNSubstitute().ReceivedWithAnyArgs().
Declaration
public static T ReceivedWithAnyArgs<T>(this IFastMock<T> fastMock) where T : class
Parameters
Returns
Type Parameters
Received<T>(IFastMock<T>)
NSubstitute convenience shortcut for fastMock.AsNSubstitute().Received().
Declaration
public static T Received<T>(this IFastMock<T> fastMock) where T : class
Parameters
Returns
Type Parameters
Received<T>(IFastMock<T>, int)
NSubstitute convenience shortcut for fastMock.AsNSubstitute().Received(requiredNumberOfCalls).
Declaration
public static T Received<T>(this IFastMock<T> fastMock, int requiredNumberOfCalls) where T : class
Parameters
| Type |
Name |
Description |
| IFastMock<T> |
fastMock |
|
| int |
requiredNumberOfCalls |
|
Returns
Type Parameters