csharp-tunit

Generate TUnit unit test best practices for .NET 8.0+ with async assertions and data-driven patterns.

Updated Mar 23, 2026
One-click install
npx skills add https://github.com/rodoHasArrived/Meridian-main --skill csharp-tunit-rodohasarrived
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: csharp-tunit
Source: https://github.com/rodoHasArrived/Meridian-main/tree/main/.claude/plugins/csharp-dotnet-development/skills/csharp-tunit
Command: npx skills add https://github.com/rodoHasArrived/Meridian-main --skill csharp-tunit-rodohasarrived

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you avoid flaky, hard-to-maintain unit tests by guiding you toward consistent TUnit patterns, including best practices for async assertions and data-driven test design.

Core Features & Use Cases

  • Async-Friendly Assertions: Use async fluent assertions so test failures clearly reflect awaited behavior.
  • Lifecycle Organization: Structure setup and teardown with hooks like [Before(Test)], [After(Test)], [Before(Class)], and [After(Class)] to keep tests isolated and readable.
  • Data-Driven Testing: Apply [Arguments], [MethodData], and [ClassData] to cover multiple cases without duplicating test logic, and use features like [Retry], [Repeat], [ParallelLimit], and [DependsOn] when appropriate.

Quick Start

Ask the AI to generate a clean TUnit test suite for your async method using data-driven cases and appropriate lifecycle hooks.

Frequently Asked Questions about csharp-tunit

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

FAQPage Schema
How do I write data-driven unit tests in .NET using TUnit?

TUnit data-driven unit tests use [Arguments], [MethodData], and [ClassData] attributes to supply parameterized inputs, allowing you to cover multiple test cases without duplicating test logic.

What is the best way to structure setup and teardown in TUnit tests?

TUnit setup and teardown are structured using lifecycle hooks like [Before(Test)], [After(Test)], [Before(Class)], and [After(Class)] to keep unit tests isolated and readable.

Does TUnit support async fluent assertions for .NET 8.0+?

Yes, TUnit supports async fluent assertions for .NET 8.0+ projects, ensuring test failures clearly reflect the awaited asynchronous behavior of your methods.

How do I control parallel execution in TUnit to prevent flaky tests?

Control TUnit parallel execution using NotInParallel constraints or explicit ParallelLimit settings, and optionally apply [Retry], [Repeat], or [DependsOn] constructs to manage test reliability.

When should I use lifecycle hooks in my TUnit test suites?

Use TUnit lifecycle hooks like [Before(Test)] and [After(Class)] when you need organized setup and teardown to maintain isolation and readability across complex, data-driven test scenarios.