{"id":"87501d7d-758c-4eb5-95fb-940ed874c76d","shortId":"a9EhtP","kind":"skill","title":"Csharp Nunit","tagline":"Awesome Copilot skill by Github","description":"# 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<T>` or `Assert.ThrowsAsync<T>` 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","tags":["csharp","nunit","awesome","copilot","github"],"capabilities":["skill","source-github","category-awesome-copilot"],"categories":["awesome-copilot"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/github/awesome-copilot/csharp-nunit","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"install_from":"skills.sh"}},"qualityScore":"0.300","qualityRationale":"deterministic score 0.30 from registry signals: · indexed on skills.sh · published under github/awesome-copilot","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill:v1","enrichmentVersion":1,"enrichedAt":"2026-04-22T11:40:19.774Z","embedding":null,"createdAt":"2026-04-18T20:26:04.250Z","updatedAt":"2026-04-22T11:40:19.774Z","lastSeenAt":"2026-04-22T11:40:19.774Z","tsv":"'aaa':93 'act':91 'addit':349 'alongsid':294 'appli':75 'approach':31 'arrang':90 'arrange-act-assert':89 'assembl':129 'assembly-level':128 'assert':92,153,160,235,269,281 'assert.areequal':251 'assert.that':237 'assert.throws':271 'assert.throwsasync':273 'attribut':77,83 'author':340 'automat':360 'avoid':143,177 'awesom':3 'base':210 'behavior':142,146 'best':9 'calcul':62 'calculatortest':60 'case':166 'categori':326,328 'category-awesome-copilot' 'categorynam':329 'clariti':283 'class':52,56,80,121 'classic':256 'clear':152 'collect':261 'collectionassert':259 'combin':202,232 'combinatori':228 'command':67 'comparison':262 'complex':314 'compon':324 'consid':289,308,352 'constraint':239,245 'contain':312 'contains.item':249 'control':333 'convent':41 'copilot':4 'cover':23 'creat':50 'csharp':1 'data':28,181,189,196,211 'data-driven':27,180 'depend':297 'descript':278,346 'developernam':341 'di':311 'dotnet':68 'driven':29,182 'e.g':59 'effect':18 'equal':255 'except':276 'execut':335 'expectedbehavior':102 'explicit':353 'express':155 'facilit':306 'failur':285 'featur':322 'focus':138 'follow':87 'generat':194 'github':7 'goal':12 'group':319 'help':15 'idempot':171 'ignor':362 'includ':157 'independ':169 'indic':343 'inform':351 'inlin':187 'intent':156 'interdepend':179 'interfac':304 'is.equalto':247 'is.sameas':248 'isol':288,299 'keep':136 'level':130 'like':246 'make':167 'match':54 'messag':279 'method':86,150,209 'method-bas':208 'methodnam':100 'microsoft.net.test.sdk':45 'mock':286,296,307 'model':240 'moq':291 'multipl':145,233 'name':40,95 'necessari':338 'need':161 'net':64 'nsubstitut':293 'numer':217,224 'nunit':2,8,22,46,242,295 'nunit3testadapter':48 'one':148 'onetimesetup':115 'onetimeteardown':117 'order':176,331,336 'organ':318 'ownership':344 'packag':49 'pairwis':230 'paramet':201,234 'pattern':94,99 'per':109,120 'per-class':119 'per-test':108 'practic':10 'prefer':241 'programmat':193 'project':32,38 'projectnam':42 'properti':206 'provid':348 'random':214,216 'rang':221 'reason':363 'refer':44 'run':71,173,359 'scenario':101 'sdk':65 'separ':36 'sequenti':223 'setup':33,104,111,122,131,316 'setupfixtur':126 'shouldn':357 'simpl':200,253 'singl':141 'skill':5 'skip':366 'sourc':212 'source-github' 'specif':268 'standard':25,134 'string':267 'string-specif':266 'stringassert':264 'structur':74 'style':243,257 'teardown':106,113,124,133 'temporarili':365 'test':20,30,37,43,51,58,66,69,72,73,79,82,85,96,110,135,137,144,149,165,168,178,183,188,195,218,225,275,302,315,317,320,334,350,355,367 'testcas':185 'testcasesourc':191 'testfixtur':76 'unit':19,300 'use':34,63,81,97,103,114,125,151,184,190,197,203,213,220,227,236,244,250,258,263,270,277,290,303,309,325,330,339,345,361 'valu':198,219,226,254 'valuesourc':204 'verifi':163 'write':17","prices":[{"id":"64d40457-f3be-4dd9-93d5-200f233c6834","listingId":"87501d7d-758c-4eb5-95fb-940ed874c76d","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"github","category":"awesome-copilot","install_from":"skills.sh"},"createdAt":"2026-04-18T20:26:04.250Z"}],"sources":[{"listingId":"87501d7d-758c-4eb5-95fb-940ed874c76d","source":"github","sourceId":"github/awesome-copilot/csharp-nunit","sourceUrl":"https://github.com/github/awesome-copilot/tree/main/skills/csharp-nunit","isPrimary":false,"firstSeenAt":"2026-04-18T21:49:01.454Z","lastSeenAt":"2026-04-22T06:52:18.929Z"},{"listingId":"87501d7d-758c-4eb5-95fb-940ed874c76d","source":"skills_sh","sourceId":"github/awesome-copilot/csharp-nunit","sourceUrl":"https://skills.sh/github/awesome-copilot/csharp-nunit","isPrimary":true,"firstSeenAt":"2026-04-18T20:26:04.250Z","lastSeenAt":"2026-04-22T11:40:19.774Z"}],"details":{"listingId":"87501d7d-758c-4eb5-95fb-940ed874c76d","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"github","slug":"csharp-nunit","source":"skills_sh","category":"awesome-copilot","skills_sh_url":"https://skills.sh/github/awesome-copilot/csharp-nunit"},"updatedAt":"2026-04-22T11:40:19.774Z"}}