csharp-nunit by github/awesome-copilot
npx skills add https://github.com/github/awesome-copilot --skill csharp-nunit你的目标是帮助我编写高效的 NUnit 单元测试,涵盖标准和数据驱动测试方法。
[项目名称].TestsCalculator 创建 CalculatorTests)dotnet test 来运行测试[TestFixture] 特性[Test] 特性方法名_场景_预期行为 模式命名测试广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
[SetUp][TearDown][OneTimeSetUp] 和 [OneTimeTearDown] 进行每个类的设置和清理[SetUpFixture] 进行程序集级别的设置和清理[TestCase] 处理内联测试数据[TestCaseSource] 处理程序生成的测试数据[Values] 处理简单的参数组合[ValueSource] 处理基于属性或方法的数据源[Random] 处理随机数值测试值[Range] 处理顺序数值测试值[Combinatorial] 或 [Pairwise] 组合多个参数Assert.That 配合约束模型(首选的 NUnit 风格)Is.EqualTo、Is.SameAs、Contains.Item 等约束Assert.AreEqual 处理简单的值相等性检查(经典风格)CollectionAssert 进行集合比较StringAssert 进行字符串特定的断言Assert.Throws<T> 或 Assert.ThrowsAsync<T> 来测试异常[Category("类别名称")] 进行分类[Order] 来控制测试执行顺序[Author("开发者名称")] 来标明所有权[Description] 来提供额外的测试信息[Explicit][Ignore("原因")] 来临时跳过测试每周安装量
7.3K
代码仓库
GitHub 星标数
26.7K
首次出现
2026年2月25日
安全审计
安装于
codex7.2K
gemini-cli7.2K
opencode7.2K
cursor7.2K
github-copilot7.2K
amp7.2K
Your goal is to help me write effective unit tests with NUnit, covering both standard and data-driven testing approaches.
[ProjectName].TestsCalculatorTests for Calculator)dotnet test for running tests[TestFixture] attribute to test classes[Test] attribute for test methodsMethodName_Scenario_ExpectedBehavior[SetUp] and [TearDown] for per-test setup and teardown[OneTimeSetUp] and [OneTimeTearDown] for per-class setup and teardown[SetUpFixture] for assembly-level setup and teardown[TestCase] for inline test data[TestCaseSource] for programmatically generated test data[Values] for simple parameter combinations[ValueSource] for property or method-based data sources[Random] for random numeric test values[Range] for sequential numeric test values[Combinatorial] or [Pairwise] for combining multiple parametersAssert.That with constraint model (preferred NUnit style)Is.EqualTo, Is.SameAs, Contains.ItemAssert.AreEqual for simple value equality (classic style)CollectionAssert for collection comparisonsStringAssert for string-specific assertionsAssert.Throws<T> or Assert.ThrowsAsync<T> to test exceptions[Category("CategoryName")][Order] to control test execution order when necessary[Author("DeveloperName")] to indicate ownership[Description] to provide additional test information[Explicit] for tests that shouldn't run automatically[Ignore("Reason")] to temporarily skip testsWeekly Installs
7.3K
Repository
GitHub Stars
26.7K
First Seen
Feb 25, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
codex7.2K
gemini-cli7.2K
opencode7.2K
cursor7.2K
github-copilot7.2K
amp7.2K
97,600 周安装