用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/foxminchan/BookWorm --skill csharp-tunit命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Enforces Behavior Driven Development. Use when: implementing new features, making significant code changes, adding functionality, refactoring behavior. Requires writing a Gherkin feature file first, getting user approval, then implementing.
Turborepo monorepo build system guidance. Triggers on: turbo.json, task pipelines, dependsOn, caching, remote cache, the "turbo" CLI, --filter, --affected, CI optimization, environment variables, internal packages, monorepo structure/best practices, and boundaries. Use when user: configures tasks/workflows/pipelines, creates packages, sets up monorepo, shares code between apps, runs changed/affected packages, debugs cache, or has apps/packages directories.
Generates EventCatalog documentation files (systems, services, agents, events, commands, queries, domains, flows, channels, containers, ADRs, data products, entities, diagrams) with correct frontmatter, folder structure, and best practices. Use when user asks to "document a system", "document a service", "document an agent", "document an AI agent", "create EventCatalog files", "add an event to the catalog", "document my architecture", "generate catalog documentation", "create documentation for my microservice", "document a database", "create an ADR", "document a data product", or "document an entity".
基于 SOC 职业分类
正在显示 SKILL.md
| name | csharp-tunit |
| description | Get best practices for TUnit unit testing, including data-driven tests |
Your goal is to help me write effective unit tests with TUnit, covering both standard and data-driven testing approaches.
[ProjectName].[TestType] (e.g., MyApp.UnitTests)CalculatorTests for Calculator)dotnet test for running tests[Test] attribute for test methods (not [Fact] like xUnit)Given[Condition]_When[Action]_Then[ExpectedResult] for clarity[Before(Test)] for setup and [After(Test)] for teardown[Before(Class)] and [After(Class)] for shared context between tests in a class[Before(Assembly)] and [After(Assembly)] for shared context across test classes[Before(TestSession)] and [After(TestSession)]actual.ShouldBe(expected))[DependsOn] attribute if needed)[Arguments] attribute for inline test data (equivalent to xUnit's [InlineData])[MethodData] for method-based test data (equivalent to xUnit's [MemberData])[ClassData] for class-based test dataITestDataSource[Arguments] attributes can be applied to the same test methodactual.ShouldBe(expected) for value equalityactual.ShouldBeSameAs(expected) for reference equalityactual.ShouldBeTrue() or actual.ShouldBeFalse() for boolean conditionsactual.ShouldBeNull() or actual.ShouldNotBeNull() for null checksactual.ShouldContain(item) or actual.ShouldNotContain(item) for collectionsactual.ShouldContain("substring") for string containmentactual.ShouldMatch(pattern) for regex pattern matchingactual.ShouldBeGreaterThan(value), actual.ShouldBeLessThan(value) for comparisonsactual.ShouldBeOfType<T>() for type assertionsactual.ShouldBeEmpty() or actual.ShouldNotBeEmpty() for collections and stringsShould.Throw<TException>(() => action) for sync exception testingShould.Throw<TException>(async () => await asyncAction) for async exception testingShould.NotThrow(() => action) to verify no exception is thrownawait needed except for async exception testing)[Repeat(n)] to repeat tests multiple times[Retry(n)] for automatic retry on failure[ParallelLimit<T>] to control parallel execution limits[Skip("reason")] to skip tests conditionally[DependsOn(nameof(OtherTest))] to create test dependencies[Timeout(milliseconds)] to set test timeouts[Category("CategoryName")] for test categorization[DisplayName("Custom Test Name")] for custom test namesTestContext for test diagnostics and information[WindowsOnly] for platform-specific tests[NotInParallel] to disable parallel execution for specific tests[ParallelLimit<T>] with custom limit classes to control concurrency[Repeat(n)] with [ParallelLimit<T>] for load testing scenarios[Fact] with [Test][Theory] with [Test] and use [Arguments] for data[InlineData] with [Arguments][MemberData] with [MethodData]Assert.Equal with actual.ShouldBe(expected)Assert.True with condition.ShouldBeTrue()Assert.Throws<T> with Should.Throw<T>(() => action)[Before(Test)]/[After(Test)]IClassFixture<T> with [Before(Class)]/[After(Class)]Why TUnit over xUnit?
TUnit offers a modern, fast, and flexible testing experience with advanced features not present in xUnit, such as asynchronous assertions, more refined lifecycle hooks, and improved data-driven testing capabilities. TUnit's fluent assertions provide clearer and more expressive test validation, making it especially suitable for complex .NET projects.