Skip to content

FastMoq v4: introduce provider-first architecture, package split, and migration docs#65

Merged
cwinland merged 45 commits into
masterfrom
IProvider
Apr 7, 2026
Merged

FastMoq v4: introduce provider-first architecture, package split, and migration docs#65
cwinland merged 45 commits into
masterfrom
IProvider

Conversation

@cwinland
Copy link
Copy Markdown
Owner

@cwinland cwinland commented Apr 7, 2026

Summary

This PR captures the FastMoq v4 release line relative to tag 3.0.0.

Compared to 3.0.0, FastMoq now moves from Moq-centric internals to a provider-first architecture, introduces a clearer package split, adds provider-neutral verification and scenario-building APIs, and expands the migration and release documentation needed to adopt the new model.

What changed

  • introduced provider-first abstractions and registry support through IMockingProvider, IMockingProviderCapabilities, IFastMock<T>, and MockingProviderRegistry
  • added the built-in reflection provider plus provider packages for Moq and NSubstitute
  • split the package layout so provider contracts live in FastMoq.Abstractions, EF/DbContext helpers live in FastMoq.Database, and provider-specific adapters live in FastMoq.Provider.*
  • moved DbContext-specific implementation details out of core while preserving the main FastMoq namespace call shape for end users
  • added provider-neutral verification and logging helpers, including Verify(...), VerifyLogged(...), and TimesSpec
  • added fluent scenario-building support with Scenario.With(...).When(...).Then(...).Verify(...)
  • replaced older coupled option flows with more explicit creation, invocation, and policy surfaces such as InstanceCreationFlags, InvocationOptions, BuiltInTypeResolutionFlags, and known-type registration support
  • narrowed compatibility behavior around Strict, kept MockOptional as an obsolete bridge, and moved Moq-specific HTTP compatibility helpers into FastMoq.Provider.Moq
  • expanded test coverage, executable examples, generated API documentation, migration guidance, and release notes for the v4 line

Breaking / migration notes

  • Strict is no longer the old all-in-one strictness switch; broader preset behavior should use the explicit preset APIs
  • strict IFileSystem behavior now stays enriched through FastMoq's built-in known-type pipeline instead of behaving like a raw empty Moq mock
  • older Moq-oriented HTTP setup helpers remain available for migration, but now come from FastMoq.Provider.Moq
  • existing suites can stay on the compatibility path, while new or actively refactored tests can move toward GetOrCreateMock(...), provider-neutral verification, and explicit provider selection

Documentation

  • refreshed the post-3.0.0 release summary
  • aligned the repo and docs landing pages with the new package and release framing
  • kept the migration and breaking-change guidance pointed at the same release story

Notes

This is a major release delta from 3.0.0, not a small compatibility patch. The focus is to preserve a practical migration path for existing Moq-heavy suites while establishing the provider-neutral architecture and package boundaries for v4 and beyond.

@cwinland
Copy link
Copy Markdown
Owner Author

Fixes #39
Fixes #45
Fixes #40
Fixes #26
Fixes #48
Fixes #21

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant