[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6F4J84G4Y4BVF8DHC32XSGY":3,"skill-same:01M6F4J84G4Y4BVF8DHC32XSGY":58},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":30,"linkOnly":31,"markdownContent":32,"markdownBody":33,"frontMatter":34,"refName":35,"commitSha":36,"skillDirectory":37,"forksCount":38,"repositoryHtmlUrl":39,"repositoryHomepageUrl":40,"ownerHtmlUrl":41,"ownerBlogUrl":6,"ownerDescription":42,"updatedAt":43,"install":44,"resources":57},"01M6F4J84G4Y4BVF8DHC32XSGY","csharp-nunit",null,"Get best practices for NUnit unit testing, including data-driven tests","ComeOnOliver\u002Fskillshub","ComeOnOliver","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F43215937?v=4","01M6E5JNFECJAAVFE0W7SMWWD2","Haoran Shu","01M6E5JNNDQS7AJZDYFQ8TPZCK",67,"MIT","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fgithub\u002Fawesome-copilot\u002Fcsharp-nunit\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29],"csharp","csharp nunit","nunit","testing","best practices","data","unit testing","get","tests","driven","unit","2026-11-10 10:12:30",false,"---\nname: csharp-nunit\ndescription: 'Get best practices for NUnit unit testing, including data-driven tests'\n---\n\n# NUnit Best Practices\n\nYour goal is to help me write effective unit tests with NUnit, covering both standard and data-driven testing approaches.\n\n## Project Setup\n\n- Use a separate test project with naming convention `[ProjectName].Tests`\n- Reference Microsoft.NET.Test.Sdk, NUnit, and NUnit3TestAdapter packages\n- Create test classes that match the classes being tested (e.g., `CalculatorTests` for `Calculator`)\n- Use .NET SDK test commands: `dotnet test` for running tests\n\n## Test Structure\n\n- Apply `[TestFixture]` attribute to test classes\n- Use `[Test]` attribute for test methods\n- Follow the Arrange-Act-Assert (AAA) pattern\n- Name tests using the pattern `MethodName_Scenario_ExpectedBehavior`\n- Use `[SetUp]` and `[TearDown]` for per-test setup and teardown\n- Use `[OneTimeSetUp]` and `[OneTimeTearDown]` for per-class setup and teardown\n- Use `[SetUpFixture]` for assembly-level setup and teardown\n\n## Standard Tests\n\n- Keep tests focused on a single behavior\n- Avoid testing multiple behaviors in one test method\n- Use clear assertions that express intent\n- Include only the assertions needed to verify the test case\n- Make tests independent and idempotent (can run in any order)\n- Avoid test interdependencies\n\n## Data-Driven Tests\n\n- Use `[TestCase]` for inline test data\n- Use `[TestCaseSource]` for programmatically generated test data\n- Use `[Values]` for simple parameter combinations\n- Use `[ValueSource]` for property or method-based data sources\n- Use `[Random]` for random numeric test values\n- Use `[Range]` for sequential numeric test values\n- Use `[Combinatorial]` or `[Pairwise]` for combining multiple parameters\n\n## Assertions\n\n- Use `Assert.That` with constraint model (preferred NUnit style)\n- Use constraints like `Is.EqualTo`, `Is.SameAs`, `Contains.Item`\n- Use `Assert.AreEqual` for simple value equality (classic style)\n- Use `CollectionAssert` for collection comparisons\n- Use `StringAssert` for string-specific assertions\n- Use `Assert.Throws\u003CT>` or `Assert.ThrowsAsync\u003CT>` to test exceptions\n- Use descriptive messages in assertions for clarity on failure\n\n## Mocking and Isolation\n\n- Consider using Moq or NSubstitute alongside NUnit\n- Mock dependencies to isolate units under test\n- Use interfaces to facilitate mocking\n- Consider using a DI container for complex test setups\n\n## Test Organization\n\n- Group tests by feature or component\n- Use categories with `[Category(\"CategoryName\")]`\n- Use `[Order]` to control test execution order when necessary\n- Use `[Author(\"DeveloperName\")]` to indicate ownership\n- Use `[Description]` to provide additional test information\n- Consider `[Explicit]` for tests that shouldn't run automatically\n- Use `[Ignore(\"Reason\")]` to temporarily skip tests\n\n","# NUnit Best Practices\n\nYour goal is to help me write effective unit tests with NUnit, covering both standard and data-driven testing approaches.\n\n## Project Setup\n\n- Use a separate test project with naming convention `[ProjectName].Tests`\n- Reference Microsoft.NET.Test.Sdk, NUnit, and NUnit3TestAdapter packages\n- Create test classes that match the classes being tested (e.g., `CalculatorTests` for `Calculator`)\n- Use .NET SDK test commands: `dotnet test` for running tests\n\n## Test Structure\n\n- Apply `[TestFixture]` attribute to test classes\n- Use `[Test]` attribute for test methods\n- Follow the Arrange-Act-Assert (AAA) pattern\n- Name tests using the pattern `MethodName_Scenario_ExpectedBehavior`\n- Use `[SetUp]` and `[TearDown]` for per-test setup and teardown\n- Use `[OneTimeSetUp]` and `[OneTimeTearDown]` for per-class setup and teardown\n- Use `[SetUpFixture]` for assembly-level setup and teardown\n\n## Standard Tests\n\n- Keep tests focused on a single behavior\n- Avoid testing multiple behaviors in one test method\n- Use clear assertions that express intent\n- Include only the assertions needed to verify the test case\n- Make tests independent and idempotent (can run in any order)\n- Avoid test interdependencies\n\n## Data-Driven Tests\n\n- Use `[TestCase]` for inline test data\n- Use `[TestCaseSource]` for programmatically generated test data\n- Use `[Values]` for simple parameter combinations\n- Use `[ValueSource]` for property or method-based data sources\n- Use `[Random]` for random numeric test values\n- Use `[Range]` for sequential numeric test values\n- Use `[Combinatorial]` or `[Pairwise]` for combining multiple parameters\n\n## Assertions\n\n- Use `Assert.That` with constraint model (preferred NUnit style)\n- Use constraints like `Is.EqualTo`, `Is.SameAs`, `Contains.Item`\n- Use `Assert.AreEqual` for simple value equality (classic style)\n- Use `CollectionAssert` for collection comparisons\n- Use `StringAssert` for string-specific assertions\n- Use `Assert.Throws\u003CT>` or `Assert.ThrowsAsync\u003CT>` to test exceptions\n- Use descriptive messages in assertions for clarity on failure\n\n## Mocking and Isolation\n\n- Consider using Moq or NSubstitute alongside NUnit\n- Mock dependencies to isolate units under test\n- Use interfaces to facilitate mocking\n- Consider using a DI container for complex test setups\n\n## Test Organization\n\n- Group tests by feature or component\n- Use categories with `[Category(\"CategoryName\")]`\n- Use `[Order]` to control test execution order when necessary\n- Use `[Author(\"DeveloperName\")]` to indicate ownership\n- Use `[Description]` to provide additional test information\n- Consider `[Explicit]` for tests that shouldn't run automatically\n- Use `[Ignore(\"Reason\")]` to temporarily skip tests\n\n",{"name":5,"description":7},"main","def8531e65114c0fca8fb8551c1871ee0eed705c","skills\u002Fgithub\u002Fawesome-copilot\u002Fcsharp-nunit",24,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub","https:\u002F\u002Fskillshub.wtf","https:\u002F\u002Fgithub.com\u002FComeOnOliver","AI & Blockchain Engineer\r\n","2026-06-24 22:07:19",{"source":8,"skillName":5,"commands":45,"prompt":55,"zipAvailable":56},[46,49,52],{"tool":47,"command":48},"npx","npx skills add ComeOnOliver\u002Fskillshub --skill csharp-nunit",{"tool":50,"command":51},"bunx","bunx skills add ComeOnOliver\u002Fskillshub --skill csharp-nunit",{"tool":53,"command":54},"pnpm","pnpm dlx skills add ComeOnOliver\u002Fskillshub --skill csharp-nunit","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fgithub\u002Fawesome-copilot\u002Fcsharp-nunit\u002FSKILL.md",true,[],[59,68,77,86,92,98],{"skillNo":60,"name":61,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":62,"categories":63,"keywords":64,"publishedAt":30},"01M6FKJN13GMG4KY57J3QD8GY5","model-hierarchy-skill","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzscole\u002Fmodel-hierarchy-skill\u002Fmodel-hierarchy-skill\u002FSKILL.md",[],[65,66,67],"model","model hierarchy","model hierarchy skill",{"skillNo":69,"name":70,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":30},"01M6FKJJJ6GCAMR4PPPRD12M5X","zoom-mcp","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-mcp\u002FSKILL.md",[],[74,75,76],"MCP","zoom","zoom mcp",{"skillNo":78,"name":79,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":30},"01M6FKJE3KYT3KPEZMEEHYKA6K","zoom-apps-sdk","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-apps-sdk\u002FSKILL.md",[],[83,84,85,75],"sdk","zoom apps sdk","apps",{"skillNo":87,"name":88,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":30},"01M6FKJ9EDH9Q5VWDF8HAJRSP0","windows","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwindows\u002FSKILL.md",[],[88],{"skillNo":93,"name":94,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":95,"categories":96,"keywords":97,"publishedAt":30},"01M6FKJ666BEEFC3AE9GJ72Q93","whiteboard","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwhiteboard\u002FSKILL.md",[],[94],{"skillNo":99,"name":100,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":101,"categories":102,"keywords":103,"publishedAt":30},"01M6FKJ21WFCDGTJQ2Q91T9DVW","websockets","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwebsockets\u002FSKILL.md",[],[100]]