Agent skill · Testing & QA

csharp-testing

C# and .NET testing patterns with xUnit, FluentAssertions, mocking, integration tests, and test organization best practices.

mturacgithub.com/mturacGitHub ↗
codexcopilotcursorMIT
Install
npx skills add mturac/everything-openai-codex --skill csharp-testing --agent codex

Same command for any agent — swap --agent for claude-code, cursor, copilot.

Facts
Files in the skill folder: 1
SKILL.md size: 8 KB
Bundled scripts: none
Path: skills/csharp-testing/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 84
Language: JavaScript

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.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 ```csharp 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); } [Fact] public async Task PlaceOrderAsync_ReturnsSuccess_WhenRequestIsValid() { // Arrange var request = new CreateOrder

What's inside
Steps it walks through
  1. When to Activate
  2. Test Framework Stack
  3. Unit Test Structure
  4. Arrange-Act-Assert
  5. Parameterized Tests with Theory
  6. Mocking with NSubstitute
  7. ASP.NET Core Integration Tests
  8. WebApplicationFactory Setup
  9. Testing with Testcontainers
  10. Test Organization
  11. Test Data Builders
  12. Common Anti-Patterns
  13. Running Tests
Commands it runs
Run all tests
dotnet test
Run with coverage
dotnet test --collect:"XPlat Code Coverage"
Run specific project
dotnet test tests/MyApp.UnitTests/
Filter by test name
dotnet test --filter "FullyQualifiedName~OrderService"
Watch mode during development
dotnet watch test --project tests/MyApp.UnitTests/
More from everything-openai-codex
All skills →
About this skill
What does the csharp-testing skill do?

C# and .NET testing patterns with xUnit, FluentAssertions, mocking, integration tests, and test organization best practices.

How do I install it?

Run `npx skills add mturac/everything-openai-codex --skill csharp-testing --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From mturac/everything-openai-codex, a repository with 84 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going