csharp-testing

Generate xUnit test classes for ASP.NET Core services with FluentAssertions and NSubstitute.

1|Updated Apr 6, 2026
One-click install
npx skills add https://github.com/vrcms/everything-qwen-code --skill csharp-testing-vrcms
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: csharp-testing
Source: https://github.com/vrcms/everything-qwen-code/tree/main/.qwen/skills/csharp-testing
Command: npx skills add https://github.com/vrcms/everything-qwen-code --skill csharp-testing-vrcms

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill addresses the complexity of maintaining high-quality, reliable .NET codebases by providing standardized patterns for unit and integration testing.

Core Features & Use Cases

  • Standardized Testing Patterns: Implements Arrange-Act-Assert structures using xUnit and FluentAssertions for consistent, readable test suites.
  • Advanced Integration Testing: Provides templates for WebApplicationFactory and Testcontainers to ensure reliable testing of database and API layers.
  • Use Case: When developing a new ASP.NET Core service, use this skill to quickly scaffold unit tests for business logic and integration tests for database repositories using real infrastructure containers.

Quick Start

Use the csharp-testing skill to generate a new xUnit test class for the OrderService using FluentAssertions and NSubstitute.

Frequently Asked Questions about csharp-testing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up integration tests for .NET repositories with Testcontainers?

Mocking dependencies in .NET unit testing is handled using NSubstitute to isolate business logic during testing. This ensures your unit tests remain focused on the service logic without relying on external dependencies or database connections.

What is the best way to structure a .NET test suite for maintainability?

The best way to structure a .NET test suite is by adhering to the Arrange-Act-Assert pattern and using FluentAssertions for readable assertions. This standardizes testing patterns and helps maintain high-quality, reliable .NET codebases.

Can I use Testcontainers with WebApplicationFactory for ASP.NET Core integration testing?

Yes, you can use Testcontainers with WebApplicationFactory for ASP.NET Core integration testing to spin up real infrastructure containers. This combination ensures reliable testing of database and API layers within your .NET applications.

Does this testing approach support scaffolding tests for existing business logic?

Yes, this testing approach supports scaffolding tests for existing business logic by providing standardized patterns using xUnit and FluentAssertions. You can quickly generate test classes for services like OrderService while mocking dependencies with NSubstitute.