원클릭으로
xunit
Get best practices for XUnit unit testing, including data-driven tests
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Get best practices for XUnit unit testing, including data-driven tests
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Use when building .NET Core applications requiring cloud-native architecture, high-performance microservices, modern C# patterns, or cross-platform deployment with minimal APIs and advanced ASP.NET Core features.
This skill embodies the principles of "Clean Code" by Robert C. Martin (Uncle Bob). Use it to transform "code that works" into "code that is clean."
Provides guidance for generating comprehensive C# unit tests in .NET projects. Use when writing, scaffolding, or improving unit tests for C# code using MSTest, NUnit, or xUnit frameworks. Covers framework detection, test structure, edge-case analysis, mocking rules, and best practices. DO NOT use for integration tests, end-to-end tests, or non-.NET languages.
Use when writing new functions, adding features, fixing bugs, or refactoring by applying TDD principles - write failing tests before implementation code, make them pass, then refactor.
Use during implementation when designing modules, functions, and components requiring SOLID principles for maintainable, flexible architecture.
Use when modifying existing files, refactoring, improving code quality, or touching legacy code by applying the Boy Scout Rule to leave code better than you found it.
| name | xunit |
| description | Get best practices for XUnit unit testing, including data-driven tests |
Your goal is to help me write effective unit tests with XUnit, covering both standard and data-driven testing approaches.
[ProjectName].TestsCalculatorTests for Calculator)dotnet test for running tests[Fact] attribute for simple testsMethodName_Scenario_ExpectedBehaviorIDisposable.Dispose() for teardownIClassFixture<T> for shared context between tests in a classICollectionFixture<T> for shared context between multiple test classes[Theory] combined with data source attributes[InlineData] for inline test data[MemberData] for method-based test data[ClassData] for class-based test dataDataAttribute.ShouldBe for value equality.ShouldBeSameAs for reference equality.ShouldBeTrue/.ShouldBeFalse for boolean conditions.ShouldContain/Assert.ShouldNotContain for collections.ShouldThrow<T> or await .ShouldThrowAsync<T> to test exceptions[Trait("Category", "CategoryName")] for categorizationITestOutputHelper) for test diagnosticsSkip = "reason" in fact/theory attributesMore documentation about xUnit at: https://api.xunit.net/v3/3.2.2/