dotnet-testing-autofixture-customization
CommunityDeterministic test data with AutoFixture.
System Documentation
What problem does it solve?
This skill provides a structured approach to generating realistic and varied test data in .NET unit tests by building custom ISpecimenBuilder implementations and fluent extensions for AutoFixture, enabling deterministic ranges and targeted property control.
Core Features & Use Cases
- Custom ISpecimenBuilder implementations to precisely control specific property types (for example DateTime ranges and numeric ranges) and extend AutoFixture behavior.
- Predicate-based targeting and fluent extensions that compose rules for complex models, ensuring consistent data across tests and scenarios.
- Practical templates and examples demonstrating integration with xUnit and FluentAssertions to validate generated data.
Quick Start
Review the templates under templates/ for representative samples, then adapt them into your test project. Add your own custom builders via fixture.Customizations.Add or the provided AddRandomRange extensions. Run tests to verify generated data respects defined constraints.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: dotnet-testing-autofixture-customization Download link: https://github.com/kevintsengtw/dotnet-testing-agent-skills/archive/main.zip#dotnet-testing-autofixture-customization Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.