affaan-m/everything-claude-code/csharp-testing
Trust tier 2
- community
Source check pending
Checking that the SKILL.md file is still in the repository.
C# and .NET testing patterns with xUnit, FluentAssertions, mocking, integration tests, and test organization best practices. Use when writing or reviewing xUnit tests, mocks, or integration tests in a C# / .NET project.
Install
npx vskill@latest install affaan-m/everything-claude-code/csharp-testingSKILL.md
C# Testing Patterns
Comprehensive testing patterns for .NET applications using xUnit, FluentAssertions, and modern testing practices.
When to Activate
- Writing new tests for C# code
- Reviewing test quality and coverage
- Setting up test infrastructure for .NET projects
- Debugging flaky or slow tests
Test Framework Stack
| Tool | Purpose | |
|---|---|---|
| xUnit | Test framework (preferred for .NET) | |
| FluentAssertions | Readable assertion syntax | |
| NSubstitute or Moq | Mocking dependencies | |
| Testcontainers | Real infrastructure in integration tests | |
| WebApplicationFactory | ASP.NET Core integration tests | |
| Bogus | Realistic test data generation |
Unit Test Structure
Arrange-Act-Assert
Parameterized Tests with Theory
Mocking with NSubstitute
ASP.NET Core Integration Tests
WebApplicationFactory Setup
Testing with Testcontainers
Test Organization
Test Data Builders
Common Anti-Patterns
| Anti-Pattern | Fix | |
|---|---|---|
| Testing implementation details | Test behavior and outcomes | |
| Shared mutable test state | Fresh instance per test (xUnit does this via constructors) | |
Thread.Sleep in async tests | Use Task.Delay with timeout, or polling helpers | |
Asserting on ToString() output | Assert on typed properties | |
| One giant assertion per test | One logical assertion per test | |
| Test names describing implementation | Name by behavior: Method_ExpectedResult_WhenCondition | |
Ignoring CancellationToken | Always pass and verify cancellation |
Running Tests
Security
- Security scanPassed, 96 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/csharp-testing/SKILL.md
Popularity
- Repository stars
- 170,085
- Repository forks
- 26,352
- Repository npm downloads, 7 days
- 1,548
- 7-day trend score
- 78
Stars and forks are for the whole GitHub repository, not this skill alone. Downloads are for the repository's npm package. Refreshed 26 Apr 2026, 6 months ago.
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/affaan-m/everything-claude-code/csharp-testing)