Interface IFastMock
Non generic abstraction for a created mock instance. Prefer Instance and Reset() for provider-first flows, and treat NativeMock as the provider-native escape hatch.
Namespace: FastMoq.Providers
Assembly: FastMoq.Abstractions.dll
Syntax
public interface IFastMock
Properties
Instance
Gets the usable mocked instance.
In provider-first migrations, this is the tracked replacement for older GetMock<T>().Object access.
Declaration
object Instance { get; }
Property Value
| Type | Description |
|---|---|
| object |
MockedType
Gets the type being mocked.
Declaration
Type MockedType { get; }
Property Value
| Type | Description |
|---|---|
| Type |
NativeMock
Gets the provider-specific underlying mock object. Prefer Instance and provider-first helpers first, and use this only when the test intentionally needs a provider-specific API surface.
Declaration
object NativeMock { get; }
Property Value
| Type | Description |
|---|---|
| object |
Methods
Reset()
Resets or clears tracked mock state through the active provider. Use this provider-first path instead of calling provider-native reset APIs directly when the test can stay provider neutral.
Declaration
void Reset()