dotnet-testing-autofixture-nsubstitute-integration
✓AutoFixture mit NSubstitute-Funktion – Auto-Mocking-Funktion. Die Funktion „AutoNSubstituteDataAttribute“, „Frozen“ und „Greedy“ wird verwendet. 包含 IMapper (AutoMapper/Mapster) 特殊相依性的客製化處理. 適用於複雜相依性注入測試、Mock 驗證與行為設定.
Installation
SKILL.md
本技能介紹如何整合 AutoFixture 與 NSubstitute,透過 AutoFixture.AutoNSubstitute 套件實現自動模擬(Auto-Mocking)功能。這種整合方式可以大幅簡化具有多個相依性的服務類別測試,讓開發者專注於測試邏輯本身,而非繁瑣的物件建立過程。
| AutoFixture.AutoNSubstitute | AutoFixture 與 NSubstitute 整合 | nuget.org | | AutoFixture.Xunit2 | xUnit 整合(AutoData 屬性) | nuget.org | | NSubstitute | 模擬框架 | nuget.org |
| 服務層測試 | 通常有多個相依性,自動模擬效益最大 | | 複雜相依圖 | AutoFixture 自動處理多層相依性 | | 參數化測試 | 結合固定值與自動產生資料 | | 需要大量測試資料 | 減少手動建立測試資料的工作 | | 快速迭代開發 | 建構函式變更時測試通常不需修改 |
AutoFixture mit NSubstitute-Funktion – Auto-Mocking-Funktion. Die Funktion „AutoNSubstituteDataAttribute“, „Frozen“ und „Greedy“ wird verwendet. 包含 IMapper (AutoMapper/Mapster) 特殊相依性的客製化處理. 適用於複雜相依性注入測試、Mock 驗證與行為設定. Quelle: kevintsengtw/dotnet-testing-agent-skills.
Fakten (zitierbereit)
Stabile Felder und Befehle für KI/Such-Zitate.
- Installationsbefehl
npx skills add https://github.com/kevintsengtw/dotnet-testing-agent-skills --skill dotnet-testing-autofixture-nsubstitute-integration- Kategorie
- </>Entwicklung
- Verifiziert
- ✓
- Erstes Auftreten
- 2026-02-01
- Aktualisiert
- 2026-02-18
Schnelle Antworten
Was ist dotnet-testing-autofixture-nsubstitute-integration?
AutoFixture mit NSubstitute-Funktion – Auto-Mocking-Funktion. Die Funktion „AutoNSubstituteDataAttribute“, „Frozen“ und „Greedy“ wird verwendet. 包含 IMapper (AutoMapper/Mapster) 特殊相依性的客製化處理. 適用於複雜相依性注入測試、Mock 驗證與行為設定. Quelle: kevintsengtw/dotnet-testing-agent-skills.
Wie installiere ich dotnet-testing-autofixture-nsubstitute-integration?
Öffnen Sie Ihr Terminal oder Kommandozeilen-Tool (Terminal, iTerm, Windows Terminal, etc.) Kopieren Sie diesen Befehl und führen Sie ihn aus: npx skills add https://github.com/kevintsengtw/dotnet-testing-agent-skills --skill dotnet-testing-autofixture-nsubstitute-integration Nach der Installation wird der Skill automatisch in Ihrer KI-Programmierumgebung konfiguriert und ist bereit zur Verwendung in Claude Code oder Cursor
Wo ist das Quell-Repository?
https://github.com/kevintsengtw/dotnet-testing-agent-skills
Details
- Kategorie
- </>Entwicklung
- Quelle
- skills.sh
- Erstes Auftreten
- 2026-02-01