·dotnet-testing-autofixture-basics
</>

dotnet-testing-autofixture-basics

kevintsengtw/dotnet-testing-agent-skills

使用 AutoFixture 自動產生測試資料的基礎技能。 當需要快速產生測試物件、減少樣板程式碼、實現匿名測試時使用。 涵蓋 Fixture.Create、CreateMany、循環參考處理、與 xUnit 整合等。

12Installs·0Trend·@kevintsengtw

Installation

$npx skills add https://github.com/kevintsengtw/dotnet-testing-agent-skills --skill dotnet-testing-autofixture-basics

SKILL.md

AutoFixture 是一個為 .NET 平台設計的測試資料自動產生工具,它的核心理念是「匿名測試」(Anonymous Testing)。這個概念認為,大部分的測試都不應該依賴於特定的資料值,而應該專注於驗證程式邏輯的正確性。

AutoFixture 可以看作是 Test Data Builder Pattern 的自動化進化版,能自動產生複雜的測試資料,讓我們專注於測試邏輯本身。

| 程式碼行數 | 40+ 行 Builder + 測試 | 5 行測試 | | 維護成本 | 物件改變需更新 Builder | 自動適應變化 | | 開發時間 | 先寫 Builder 再寫測試 | 直接寫測試 | | 大量資料 | 需要迴圈 | CreateMany(100) | | 可讀性 | 業務語意明確 | 需理解 AutoFixture |

使用 AutoFixture 自動產生測試資料的基礎技能。 當需要快速產生測試物件、減少樣板程式碼、實現匿名測試時使用。 涵蓋 Fixture.Create、CreateMany、循環參考處理、與 xUnit 整合等。 Source: kevintsengtw/dotnet-testing-agent-skills.

View raw

Facts (cite-ready)

Stable fields and commands for AI/search citations.

Install command
npx skills add https://github.com/kevintsengtw/dotnet-testing-agent-skills --skill dotnet-testing-autofixture-basics
Category
</>Dev Tools
Verified
First Seen
2026-02-01
Updated
2026-02-18

Quick answers

What is dotnet-testing-autofixture-basics?

使用 AutoFixture 自動產生測試資料的基礎技能。 當需要快速產生測試物件、減少樣板程式碼、實現匿名測試時使用。 涵蓋 Fixture.Create、CreateMany、循環參考處理、與 xUnit 整合等。 Source: kevintsengtw/dotnet-testing-agent-skills.

How do I install dotnet-testing-autofixture-basics?

Open your terminal or command line tool (Terminal, iTerm, Windows Terminal, etc.) Copy and run this command: npx skills add https://github.com/kevintsengtw/dotnet-testing-agent-skills --skill dotnet-testing-autofixture-basics Once installed, the skill will be automatically configured in your AI coding environment and ready to use in Claude Code or Cursor

Where is the source repository?

https://github.com/kevintsengtw/dotnet-testing-agent-skills