csharp-tunit

Write C# unit tests with TUnit using data-driven attributes and async assertions.

Updated Dec 28, 2025
One-click install
npx skills add https://github.com/74nu5/Narratum --skill csharp-tunit
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: csharp-tunit
Source: https://github.com/74nu5/Narratum/tree/main/.github/skills/csharp-tunit
Command: npx skills add https://github.com/74nu5/Narratum --skill csharp-tunit

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps developers write effective unit tests in C# using the TUnit framework, covering both standard and advanced data-driven testing techniques.

Core Features & Use Cases

  • Best Practices: Learn optimal project setup, test structure, and naming conventions.
  • Data-Driven Testing: Implement tests with various data sources using attributes like [Arguments] and [MethodData].
  • Assertions: Utilize fluent and asynchronous assertions for clear and concise test validation.
  • Advanced Features: Explore features like retries, timeouts, parallel execution, and test skipping.
  • Use Case: Improve the reliability and maintainability of your .NET applications by adopting TUnit's powerful testing capabilities.

Quick Start

Use the csharp-tunit skill to learn about TUnit's [Arguments] attribute for data-driven tests.

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 C# using TUnit?

The TUnit framework supports fluent asynchronous assertions, allowing you to validate test outcomes clearly and concisely. This approach simplifies asynchronous test validation without blocking execution.

What is the best way to migrate from xUnit to TUnit?

Migrating from xUnit to TUnit involves mapping equivalent concepts and attributes between the two frameworks. This skill provides direct mappings to transition your existing test suites while adopting TUnit features.

Can I configure parallel execution and timeouts in TUnit?

TUnit includes advanced configuration options for parallel execution, retries, and timeouts. These features help manage long-running or flaky tests by controlling execution flow and failure thresholds.

Does TUnit support skipping tests conditionally?

TUnit provides test skipping capabilities to bypass specific tests under certain conditions. This prevents irrelevant test failures during development without deleting the underlying test code.