Skip to main content
Back to registry

csharp-xunit

github/awesome-copilot

Your goal is to help me write effective unit tests with XUnit, covering both standard and data-driven testing approaches.

Installs7
Install command
npx skills add https://github.com/github/awesome-copilot --skill csharp-xunit
Security audits
Gen Agent Trust HubPASS
SocketPASS
SnykPASS
About this skill
Your goal is to help me write effective unit tests with XUnit, covering both standard and data-driven testing approaches. - Use a separate test project with naming convention [ProjectName].Tests - Reference Microsoft.NET.Test.Sdk, xunit, and xunit.runner.visualstudio packages - Create test classes that match the classes being tested (e.g., CalculatorTests for Calculator ) - Use .NET SDK test commands: dotnet test for running tests - No test class attributes required (unlike MSTest/NUnit) - Use fact-based tests with [Fact] attribute for simple tests - Follow the Arrange-Act-Assert (AAA) pattern - Name tests using the pattern MethodName_Scenario_ExpectedBehavior - Use constructor for setup and IDisposable.Dispose() for teardown - Use IClassFixture for shared context between tests in a class - Use ICollectionFixture for shared context between multiple test classes - Keep tests focused on a single behavior - Avoid testing multiple behaviors in one test method - Use clear assertions that express intent - Include only the assertions needed to verify the test case - Make tests independent and idempotent (can run in any order) - Avoid test interdependencies - Use [Theory] combined with data source attributes - Use [InlineData] for inline test data - Use [MemberData] for method-based test data - Use [ClassData] for class-based test data - Create custom data attributes by implementing...

Source description provided by the upstream skill listing. Community reviews and install context appear in the sections below.

Community Reviews

Latest reviews

Sign in to review

No community reviews yet. Be the first to review.

Browse this skill in context
FAQ
What does csharp-xunit do?

Your goal is to help me write effective unit tests with XUnit, covering both standard and data-driven testing approaches.

Is csharp-xunit good?

csharp-xunit does not have approved reviews yet, so SkillJury cannot publish a community verdict.

What agent does csharp-xunit work with?

csharp-xunit currently lists compatibility with Agent compatibility has not been published yet..

What are alternatives to csharp-xunit?

Skills in the same category include telegram-bot-builder, flutter-app-size, sharp-edges, iterative-retrieval.

How do I install csharp-xunit?

npx skills add https://github.com/github/awesome-copilot --skill csharp-xunit

Related skills

More from github/awesome-copilot

Related skills

Alternatives in Software Engineering