csharp-testing
Provides patterns and tool recommendations for testing .NET applications, including mocking, integration, and data generation.
Install
mkdir -p .claude/skills/csharp-testing && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/17211" && unzip -o skill.zip -d .claude/skills/csharp-testing && rm skill.zipInstalls to .claude/skills/csharp-testing
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
C# and .NET testing patterns with xUnit, FluentAssertions, mocking, integration tests, and test organization best practices.Key capabilities
- →Write unit tests using xUnit and FluentAssertions
- →Implement parameterized tests with Theory and InlineData/MemberData
- →Mock dependencies using NSubstitute
- →Set up ASP.NET Core integration tests with WebApplicationFactory
- →Conduct integration tests with Testcontainers for real infrastructure
- →Organize test files and use test data builders
How it works
The skill provides patterns and examples for writing C# tests using xUnit, FluentAssertions, NSubstitute, WebApplicationFactory, and Testcontainers, covering unit and integration testing.
Inputs & outputs
When to use csharp-testing
- →Writing C# unit tests
- →Configuring test infrastructure
- →Integration testing with databases
- →Generating realistic test data
About csharp-testing
Offers a comprehensive guide for testing .NET projects, including setup of xUnit, FluentAssertions, mocking libraries like NSubstitute/Moq, and integration testing with Testcontainers.
C# and .NET testing patterns with xUnit, FluentAssertions, mocking, integration tests, and test organization best practices.
When not to use it
- →When testing non-C# or non-.NET applications
- →When a different test framework is mandated
Limitations
- →The patterns are specific to C# and .NET
- →Relies on specific testing frameworks and libraries (xUnit, FluentAssertions, NSubstitute/Moq, Testcontainers)
- →Focuses on the Arrange-Act-Assert pattern
How it compares
This workflow offers a complete, opinionated guide to modern C# testing practices, standardizing test structure and tool usage, unlike ad-hoc testing approaches.
Compared to similar skills
csharp-testing side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| csharp-testing (this skill) | 0 | 6mo | Review | Intermediate |
| csharp-pro | 9 | 7mo | No flags | Intermediate |
| performance-benchmark | 3 | 8mo | No flags | Intermediate |
| backend-testing | 3 | 4mo | No flags | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
You might also like
csharp-pro
sickn33
Write modern C# code with advanced features like records, pattern matching, and async/await. Optimizes .NET applications, implements enterprise patterns, and ensures comprehensive testing. Use PROACTIVELY for C# refactoring, performance optimization, or complex .NET solutions.
performance-benchmark
dotnet
Generate and run ad hoc performance benchmarks to validate code changes. Use this when asked to benchmark, profile, or validate the performance impact of a code change in dotnet/runtime.
backend-testing
exceptionless
Backend testing with xUnit, Foundatio.Xunit, integration tests with AppWebHostFactory, FluentClient, ProxyTimeProvider for time manipulation, and test data builders. Keywords: xUnit, Fact, Theory, integration tests, AppWebHostFactory, FluentClient, ProxyTimeProvider, TimeProvider, Foundatio.Xunit, TestWithLoggingBase, test data builders
dotnet-dev
GitTools
Expert guidance for .NET development in this repository. Use this skill for building, testing, debugging, and understanding project structure, coding conventions, dependency injection patterns, and testing practices.
mutation-testing
SebastienDegodez
Use when running mutation testing, killing mutants, verifying test quality, checking mutation score, or analyzing survivors after the test baseline is green
quality-ci
managedcode
Set up or refine open-source .NET code-quality gates for CI: formatting, `.editorconfig`, SDK analyzers, third-party analyzers, coverage, mutation testing, architecture tests, and security scanning. USE FOR: .NET quality gates in CI; analyzer, coverage, mutation, and architecture-test choices; stand