csharp-tunit

Best practices for writing unit tests with TUnit, including data-driven and advanced testing patterns.

github ↓ 8.7k
Claude Code
View source ↗

What it does

  • Use a separate test project with naming convention [ProjectName].Tests
  • Reference TUnit package and TUnit.Assertions for fluent assertions
  • Create test classes that match the classes being tested (e.g., CalculatorTests for Calculator)
  • Use .NET SDK test commands: dotnet test for running tests
  • TUnit requires .NET 8.0 or higher
  • No test class attributes required (like xUnit/NUnit)
  • Use [Test] attribute for test methods (not [Fact] like xUnit)

Requirements & configuration

  • TUnit requires .NET 8.0 or higher
  • TUnit runs tests in parallel by default (unlike xUnit which requires explicit configuration)

Derived from the skill's own SKILL.md documentation · extracted 2026-07-23

Best practices for writing unit tests with TUnit, including data-driven and advanced testing patterns.

Source

Repository: https://github.com/github/awesome-copilot

csharp-tunit FAQ

What does the csharp-tunit skill do?

Get best practices for TUnit unit testing, including data-driven tests Use a separate test project with naming convention [ProjectName].Tests Reference TUnit package and TUnit.Assertions for fluent assertions

What does csharp-tunit require?

TUnit requires .NET 8.0 or higher TUnit runs tests in parallel by default (unlike xUnit which requires explicit configuration)

How do I install csharp-tunit?

Run: npx -y skills add https://github.com/github/awesome-copilot --skill csharp-tunit --agent claude-code — the source lives at github.com/github/awesome-copilot.

Maintain csharp-tunit?

Let people know it's listed here — add the badge (live metrics, light/dark aware) or a plain link to your README or docs.

csharp-tunit on getagentictools
[![csharp-tunit on getagentictools](https://getagentictools.com/badge/skills/github-awesome-copilot-csharp-tunit.svg)](https://getagentictools.com/skills/github-awesome-copilot-csharp-tunit?ref=badge)
npx agentictools info skills/github-awesome-copilot-csharp-tunit

The second line is the CLI lookup for this page — handy in READMEs and docs.