Skip to main content

In this article

Coding Standards/Csharp/Csharp Tests

Coding Standards/Csharp/Csharp Tests
FieldValue
Kindinstruction
Source.github/instructions/coding-standards/csharp/csharp-tests.instructions.md
InvocationApplied automatically to **/*.cs
InteractiveNo

What it does

C# (CSharp) test code authoring conventions

When to use it

Use these conventions when a C# file defines XUnit tests, fixtures, test data, or mocks. They extend the general C# standards with behavioral naming, Arrange/Act/Assert structure, and NSubstitute patterns; production code should follow the base C# guidance without the test-specific rules.

Example usage

Provide a concrete example that shows the asset in action, including representative input and the resulting output.