FastMoq Testing Examples
This project is the smallest repo-local place to see FastMoq patterns in executable form.
Real-world examples
OrderProcessingServiceExamplesshows a business workflow with repository, inventory, payment, and logger dependencies.CustomerImportServiceExamplesshows the built-inIFileSystemsupport withMockFileSystemplus parser and repository collaborators.InvoiceReminderServiceScenarioExamplesshows the fluentScenario.With(...).When(...).Then(...).Verify(...)style.OptionalParameterResolutionExamplesshows the explicit optional-parameter model throughComponentCreationFlagsandInvocationOptions.
Basic examples
ExampleTests.cskeeps the smaller constructor andMockerTestBase<T>samples for quick orientation.
How to use this project
- Read the service under test first in
RealWorldExampleServices.cs. - Open the matching tests in
RealWorldExampleTests.csto see FastMoq setup and verification patterns. - Run
dotnet test .\FastMoq.TestingExample\FastMoq.TestingExample.csprojafter changes to keep the examples trustworthy.