Class NSubstituteMockCollectionExtensions
- Namespace
- Mokkit.Containers.NSubstitute
- Assembly
- Mokkit.Containers.NSubstitute.dll
Convenience registration methods that create NSubstitute substitutes for the mock collection.
public static class NSubstituteMockCollectionExtensionsInheritance
Inherited Members
Methods
AddSubstitute<T>(IMockCollection<object>)
Registers a substitute for T, throwing if one is already registered.
public static IMockCollection<object> AddSubstitute<T>(this IMockCollection<object> mocks) where T : classParameters
mocksIMockCollection<object>-
The mock collection.
Returns
- IMockCollection<object>
-
The collection for fluent chaining.
Type Parameters
T-
The type to substitute.
TryAddSubstitute<T>(IMockCollection<object>)
Registers a substitute for T only if one is not already registered.
public static IMockCollection<object> TryAddSubstitute<T>(this IMockCollection<object> mocks) where T : classParameters
mocksIMockCollection<object>-
The mock collection.
Returns
- IMockCollection<object>
-
The collection for fluent chaining.
Type Parameters
T-
The type to substitute.