FastMoq Quick Reference
Use this page when you already know the type name and want to jump straight to the API page.
Most-used starting points
- Mocker
- MockerTestBase<TComponent>
- ScenarioBuilder<T>
- MockingProviderRegistry
- MockerBlazorTestBase<T>
Core test entry points
Arrange and creation
Use the Mocker page for the tracked and standalone creation APIs: GetOrCreateMock<T>(), CreateFastMock<T>(), and CreateStandaloneFastMock<T>().
Provider APIs
If you are writing your own provider instead of using the bundled ones, start with IMockingProvider, then IMockingProviderCapabilities, then MockingProviderRegistry.
Detached provider-first creation and verification also live on MockingProviderRegistry: use CreateMock<T>(), Verify(...), and VerifyNoOtherCalls(...) there when the IFastMock<T> handle is not tracked inside a Mocker.
Reflection-provider reminder: its verification is best-effort and only compares direct constant arguments with Equals(...); it is not equivalent to richer provider-native matcher semantics.
Logging and verification
Extension helpers
- MockerCreationExtensions
- TestClassExtensions
- MockerHttpExtensions
- MockerBooleanExtensions
- ObjectExtensions
Framework helpers
Database helpers
- DbContextMockerExtensions
- DbContextHandle<TContext>
- DbContextHandleOptions<TContext>
- DbContextTestMode
Common models and helper types
Tracked models and provider escape hatches
MockModel equality is type-based, not instance-based. Use it to reason about mocked service types, not to decide whether two provider-native doubles are the same object.
Blazor and web
Fast ways to find a type
- Use the search box in the top-right and search for the exact type name, such as
MockerorMockerTestBase. - Use the site navigation to jump into Core namespace when you know the type is in the main FastMoq namespace.
- Use API overview when you want package-level entry points before drilling into a type.
Typical navigation paths
- Starting a new service test: MockerTestBase<TComponent> then Mocker
- Configuring provider behavior: MockingProviderRegistry then IMockingProvider
- Writing a custom provider: IMockingProvider then IMockingProviderCapabilities then MockingProviderRegistry
- Verifying interactions: TimesSpec then TestClassExtensions
- Wiring Azure Functions worker tests: FunctionContextTestExtensions then Mocker
- Working with Blazor components: MockerBlazorTestBase<T> then IMockerBlazorTestHelpers<T>