Csharp Testing
C# and .NET testing patterns using xUnit, FluentAssertions, mocking, and integration test setups.
- CCM score
- 73 of 100
- skills.sh installs
- 10.7K
- GitHub stars
- 312.6K
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers unit test structure with Arrange-Act-Assert, parameterized
[Theory]tests, and NSubstitute mocking - Includes ASP.NET Core integration tests via
WebApplicationFactoryand database tests via Testcontainers - Guides test project layout across unit, integration, and shared helper projects, plus test data builders
- Designed for reviewing or writing xUnit tests, mocks, or integration tests in C# and .NET projects
Install
$ npx -y skills add affaan-m/ecc --skill csharp-testing -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
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
public sealed class OrderServiceTests
{
private readonly IOrderRepository _repository = Substitute.For<IOrderRepository>();
private readonly ILogger<OrderService> _logger = Substitute.For<ILogger<OrderService>>();
private readonly OrderService _sut;
public OrderServiceTests()
{
_sut = new OrderService(_repository, _logger);
}
Details
- Repository
- github.com/affaan-m/ecc
- Categories
- .NET & C#, Testing & QA
- First seen
- Jul 14, 2026
Questions
What is the csharp-testing skill for?
The csharp-testing skill provides C# and .NET testing patterns using xUnit, FluentAssertions, mocking, integration tests and test organization practices. It covers arrange-act-assert unit tests, parameterized Theory tests, NSubstitute mocking, and ASP.NET Core integration tests with WebApplicationFactory and Testcontainers.
Where does csharp-testing rank among .NET and C# skills?
On the .NET and C# category page, csharp-testing ranks in the top 10. It sits alongside skills such as dotnet-backend-patterns, dotnet-best-practices and nuget-manager, and it focuses specifically on writing and reviewing tests.
How do I install the csharp-testing skill?
Run npx -y skills add affaan-m/ecc --skill csharp-testing -y in your project. Once installed, the agent can write and review xUnit tests, mocks and integration tests for your C# or .NET code.
Which tools does csharp-testing use for testing?
The skill builds on xUnit as the test framework, FluentAssertions for readable assertions, and NSubstitute or Moq for mocking dependencies. It also uses Testcontainers for real infrastructure in integration tests, WebApplicationFactory for ASP.NET Core, and Bogus for realistic test data.
More from affaan-m/ecc
All 257- Opensource Pipeline10.7K
- Hipaa Compliance10.7K
- Connections Optimizer10.6K
- Project Flow Ops10.6K
- Research Ops10.6K
- Automation Audit Ops10.6K
- Social Graph Ranker10.6K
- Email Ops10.5K
- Defi Amm Security10.5K
- Ecc Tools Cost Audit10.4K
- Unified Notifications Ops10.4K
- Messages Ops10.4K
- Hookify Rules10.4K
- Evm Token Decimals10.4K
- Gateguard10.1K
- Frontend Design Direction9.9K
- Fastapi Patterns9.4K
- Hermes Imports9.3K
- Blender Motion State Inspection9.3K
- Vite Patterns9.2K
- Agent Architecture Audit9.1K
- Error Handling9.1K
- Windows Desktop E2e9.1K
- Redis Patterns9.1K
Similar to Csharp Testing
More .NET & C#csharp-xunitgithub/awesome-copilot10.5K installsPractical XUnit guidance covering standard facts, data-driven theories, and assertion and isolation conventions for C# tests.
csharp-nunitgithub/awesome-copilot9K installsBest-practice guide for NUnit unit tests, covering standard tests and data-driven patterns in C#.
dotnet-xunitwshaddix/dotnet-skills625 installsCovers xUnit v3 testing for .NET: Fact and Theory attributes, fixtures, parallelism, and IAsyncLifetime setup.
dotnet-testing-strategywshaddix/dotnet-skills625 installsDecision framework for choosing test types, organizing test projects, and picking test doubles in .NET.