
Csharp Nunit
A solid reference for NUnit testing patterns that covers the practical stuff you actually need. Walks you through proper test project setup with the right NuGet packages, explains the AAA pattern and good naming conventions, and shows you how to use TestCase and TestCaseSource for data-driven tests. The constraint model assertions (Assert.That with Is.EqualTo) are well-explained since they're more readable than the classic style. Good coverage of attributes like SetUp, TearDown, and Category for organizing tests. If you're moving from MSTest or just want to write cleaner NUnit tests, this hits the common scenarios without getting lost in edge cases.
- skills.sh installs
- 9K
- GitHub stars
- 41K
- last updated
- Aug 21, 2026
Install
$ npx -y skills add github/awesome-copilot --skill csharp-nunit --agent claude-codeInstalls into .claude/skills of the current project.
Files
NUnit Best Practices
Your goal is to help me write effective unit tests with NUnit, covering both standard and data-driven testing approaches.
Project Setup
- Use a separate test project with naming convention
[ProjectName].Tests - Reference Microsoft.NET.Test.Sdk, NUnit, and NUnit3TestAdapter packages
- Create test classes that match the classes being tested (e.g.,
CalculatorTestsforCalculator) - Use .NET SDK test commands:
dotnet testfor running tests
Test Structure
- Apply
[TestFixture]attribute to test classes - Use
[Test]attribute for test methods - Follow the Arrange-Act-Assert (AAA) pattern
- Name tests using the pattern
MethodName_Scenario_ExpectedBehavior - Use
[SetUp]and[TearDown]for per-test setup and teardown - Use
[OneTimeSetUp]and[OneTimeTearDown]for per-class setup and teardown - Use
[SetUpFixture]for assembly-level setup and teardown
Standard Tests
Sponsors
Details
- Repository
- github.com/github/awesome-copilot
- Categories
- Testing & QA, Git & Pull Requests, AI & Agent Building, .NET & C#
More from github/awesome-copilot
All 318- Copilot Instructions Blueprint Generator9K
- Breakdown Epic Arch9K
- Remember Interactive Programming9K
- Convert Plaintext To Md9K
- Github Copilot Starter9K
- Repo Story Time9K
- Create Github Issues For Unmet Specification Requirements8.9K
- Create Github Pull Request From Specification8.9K
- What Context Needed8.9K
- Update Markdown File Index8.9K
- Azure Static Web Apps8.9K
- Generate Custom Instructions From Codebase8.9K
- Java Refactoring Remove Parameter8.9K
- Suggest Awesome Github Copilot Skills8.9K
- Create Github Issue Feature From Specification8.9K
- Legacy Circuit Mockups8.9K
- Power Bi Performance Troubleshooting8.9K
- Containerize Aspnetcore8.9K
- Php Mcp Server Generator8.9K
- Terraform Azurerm Set Diff Analyzer8.9K
- Vscode Ext Localization8.9K
- Make Skill Template8.9K
- Csharp Mstest8.9K
- Comment Code Generate A Tutorial8.9K