FastMoq
Search Results for

    FastMoq Documentation

    Welcome to the comprehensive FastMoq documentation! This documentation is designed to help you get the most out of FastMoq, from your first test to advanced enterprise scenarios.

    πŸ†• Release Highlights Since 3.0.0

    If you are coming from the last public 3.0.0 package, the biggest changes in the current line are:

    • provider-first architecture with explicit provider registration and selection
    • new package split across abstractions, database helpers, and provider-specific adapters
    • provider-neutral verification with TimesSpec, Verify(...), and VerifyLogged(...)
    • fluent Scenario.With(...).When(...).Then(...).Verify(...) support
    • explicit policy surfaces for constructor fallback, method fallback, known-type resolution, and optional-parameter behavior
    • expanded migration guidance, executable examples, and generated API coverage

    πŸ“š Documentation Structure

    πŸš€ Getting Started

    Perfect for developers new to FastMoq. Learn the basics and write your first test in minutes.

    • Installation and setup
    • Your first FastMoq test
    • Provider selection and setup
    • Provider capabilities matrix
    • Repo-native testing guide
    • Web helper guidance for controller and request tests
    • Executable testing examples
    • Understanding the architecture
    • Common patterns and best practices
    • Troubleshooting guide

    πŸ“Š Feature Parity

    Comprehensive comparison of FastMoq with other popular mocking frameworks.

    • Side-by-side feature comparison
    • Migration guides from Moq and NSubstitute
    • Performance and memory usage analysis
    • When to choose FastMoq vs alternatives

    πŸ‘¨β€πŸ³ Cookbook

    Practical recipes for real-world testing scenarios.

    • API Controller testing
    • Entity Framework Core with DbContext
    • Background Services and hosted services
    • HttpClient and external API integration
    • Configuration and Options patterns
    • Logging verification
    • Azure Services integration
    • File system operations

    πŸ—οΈ Sample Applications

    Complete, runnable examples demonstrating FastMoq in production-like scenarios.

    • E-Commerce Order Processing - Complete sample documentation under docs/samples/ecommerce-orders
    • Executable Testing Examples - Smaller repo-local service tests that track current FastMoq guidance

    πŸ“ˆ Benchmarks

    Performance analysis and productivity improvements.

    • Execution speed comparisons
    • Memory usage analysis
    • Developer productivity metrics
    • Real-world impact studies
    • ROI calculations

    πŸ—ΊοΈ Roadmap Notes

    Current provider-first direction, active architectural work, and intentionally deferred items.

    πŸ†• What's New Since 3.0.0

    Summary of the major architecture, packaging, API, and documentation changes after the May 12, 2025 3.0.0 baseline.

    ⚠️ Breaking Changes

    Intentional v4 breaking changes, with migration notes for changed behavior.

    πŸ”„ Migration Guide

    Practical guidance for moving from the 3.0.0 public release toward the current v4 provider-first patterns.

    🎯 Quick Navigation

    By Experience Level

    Experience Start Here Next Steps
    New to Mocking Getting Started Simple Cookbook Examples
    Coming from Moq Feature Parity Migration Guide
    Enterprise Teams Sample Applications Performance notes coming in a future published docs pass

    By Use Case

    Use Case Documentation Sample Code
    Web APIs API Controller Testing E-Commerce Sample
    Web helper migration Migration Guide web-helper section Repo-native testing guide
    Database Testing EF Core Testing Repository Patterns
    Azure Integration Sample Applications Complete Azure App
    Background Jobs Background Services Executable Testing Examples
    Blazor Apps Getting Started Executable Testing Examples

    Package note: FastMoq is the aggregate package. Provider contracts live in FastMoq.Abstractions, FastMoq.Core stays lighter, EF-specific helpers live in FastMoq.Database, provider-specific adapters live in FastMoq.Provider.*, and web helpers live in FastMoq.Web while the primary calls stay in the FastMoq namespace.

    Web helper note: if your test project references the aggregate FastMoq package, the web helpers are already included. If your test project references FastMoq.Core directly, add FastMoq.Web before using helpers such as CreateHttpContext(...), CreateControllerContext(...), SetupClaimsPrincipal(...), AddHttpContext(...), or AddHttpContextAccessor(...).

    See Getting Started package choices when you need the full install matrix instead of a quick reminder.

    πŸ† Key Advantages

    FastMoq is designed for developer productivity and maintainable tests:

    πŸ“ Less Code, More Testing

    • 70% reduction in test setup code
    • Automatic dependency injection eliminates boilerplate
    • Fluent API for readable test scenarios

    ⚑ Better Performance

    • 50% faster test execution
    • 60% less memory usage
    • Better scalability for large test suites

    πŸŽ›οΈ Modern .NET Patterns

    • Built-in support for EF Core, HttpClient, IFileSystem
    • Azure services integration
    • Configuration and Options patterns
    • Blazor and Web testing

    πŸ”§ Enterprise Ready

    • Comprehensive logging verification
    • Advanced scenarios support
    • Team productivity improvements
    • Migration tools from other frameworks

    πŸ“– Learning Path

    1. Foundation (30 minutes)

    1. Read Getting Started
    2. Try the first test example
    3. Understand MockerTestBase

    2. Practical Application (1 hour)

    1. Pick a relevant cookbook recipe
    2. Try it in your own project
    3. Explore advanced setup options

    3. Production Readiness (2-3 hours)

    1. Study a complete sample application
    2. Review the current sample and migration guidance
    3. Plan your migration strategy

    4. Mastery (Ongoing)

    1. Explore all cookbook patterns
    2. Adapt sample applications to your domain
    3. Contribute back to the community

    🀝 Community and Support

    Getting Help

    • Documentation: You're here! Start with the most relevant section above
    • Issues: GitHub Issues for bugs and feature requests
    • Discussions: GitHub Discussions for questions and community help
    • API Reference: Complete API Documentation

    Contributing

    We welcome contributions! See our:

    • Contributing Guide
    • Code of Conduct
    • Getting Started

    Stay Updated

    • ⭐ Star the repository for updates
    • πŸ“‹ Watch releases for new versions
    • 🐦 Follow discussions for community insights

    πŸ”— External Links

    • NuGet Package: FastMoq on NuGet
    • GitHub Repository: cwinland/FastMoq
    • API Documentation: Complete API Reference
    • Release Notes: GitHub Releases

    🏷️ Version Information

    This documentation tracks the current post-3.0.0 FastMoq v4 release line.


    Ready to get started? Jump to Getting Started or pick a specific topic from the navigation above!

    In this article
    Back to top
    Generated 2026-04-08 12:38 UTC