Class MockingProviderRegistry
Global registry for available mocking providers with support for scoped overrides.
Inheritance
MockingProviderRegistry
Assembly: FastMoq.Core.dll
Syntax
public static class MockingProviderRegistry
Properties
Default
Declaration
public static IMockingProvider Default { get; }
Property Value
RegisteredProviderNames
Declaration
public static IReadOnlyCollection<string> RegisteredProviderNames { get; }
Property Value
Methods
Clear()
Declaration
public static void Clear()
Push(IMockingProvider)
Push a provider for the current async context returning a disposable that restores the previous value.
Declaration
public static IDisposable Push(IMockingProvider provider)
Parameters
Returns
Push(string)
Declaration
public static IDisposable Push(string name)
Parameters
| Type |
Name |
Description |
| string |
name |
|
Returns
Register(string, IMockingProvider, bool)
Declaration
public static void Register(string name, IMockingProvider provider, bool setAsDefault = false)
Parameters
SetDefault(string)
Declaration
public static void SetDefault(string name)
Parameters
| Type |
Name |
Description |
| string |
name |
|
TryGet(string, out IMockingProvider)
Declaration
public static bool TryGet(string name, out IMockingProvider provider)
Parameters
Returns
WrapLegacy(object, Type)
Declaration
public static IFastMock WrapLegacy(object legacyMock, Type mockedType)
Parameters
| Type |
Name |
Description |
| object |
legacyMock |
|
| Type |
mockedType |
|
Returns