macalbert/envilder/dotnet-test-doubles
Claude Code and agent skill by macalbert/envilder
- community
Checking that the SKILL.md file is still in the repository.
Test doubles including Fakes (Bogus), Dummies (AutoFixture), Stubs, Spies, and Mocks (NSubstitute). Use when creating test data, mocking dependencies, or setting up HTTP mocks with WireMock.Net.
Install
npx vskill@latest install macalbert/envilder/dotnet-test-doublesSKILL.md
Test Doubles
This skill defines how to use test doubles (Fakes, Dummies, Stubs, Spies, and Mocks).
Code Style Rules
NEVER write unnecessary comments or XML summaries. Code should be self-explanatory.
| Rule | Example | |
|---|---|---|
Use class not record | public class GroupMother { ... } | |
Always use {} brackets | if (x) { return; } never if (x) return; | |
| Aligned wrapped parameters | Align parameters with opening parenthesis |
Test Doubles Types
1. Fake - Bogus
Use Bogus to create realistic fake data for testing.
Purpose: Generate realistic test data that mimics production data.
Example:
2. Dummy - AutoFixture
Use AutoFixture for dummy objects that fill method parameters.
Purpose: Automatically generate objects without manual setup.
Example:
3. Stub - AutoFixture / NSubstitute
Use AutoFixture or NSubstitute for stubs that return predefined data.
Example with NSubstitute:
4. Spy - NSubstitute
Use NSubstitute to spy on method calls and verify interactions.
Example:
5. Mock - NSubstitute
Use NSubstitute for mocks that verify expected behavior.
Example:
6. HTTP Mocks - WireMock.Net
Use WireMock.Net for mocking HTTP services.
Example:
NSubstitute Patterns
Basic Mocking
Argument Matchers
For more details on AutoFixture and Bogus patterns, see reference.md.
Mother Pattern with Bogus
Summary
- Bogus for realistic fake data
- AutoFixture for dummy and stub objects
- NSubstitute for spies and mocks
- WireMock.Net for HTTP mocks
- Mother pattern for reusable test data builders
- Verify interactions using
.Received() - Argument matchers for flexible verification
When writing tests:
- Use Mother pattern for domain entities
- Use AutoFixture for simple data
- Use Bogus for realistic data
- Use NSubstitute for all mocks/spies
- Always verify mock interactions
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryChecking.github/skills/dotnet-test-doubles/SKILL.md
Popularity
- Repository stars
- 135
- Repository forks
- 4
- 7-day trend score
- 25
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/macalbert/envilder/dotnet-test-doubles)