·dotnet-testing-autofixture-nsubstitute-integration
</>

dotnet-testing-autofixture-nsubstitute-integration

kevintsengtw/dotnet-testing-agent-skills

AutoFixture 與 NSubstitute 統合指南 - 現自動模擬 (Auto-Mocking)。 AutoNSubstituteDataAttribute、Frozen 機制、Greedy 構築戦略略。 IMapper(AutoMapper/Mapster)等の特殊な相依存性のゲスト化プロセスを含みます。 適用於複雜相依性注入測試、模擬驗證與行為設定。

12インストール·0トレンド·@kevintsengtw

インストール

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

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 與 NSubstitute 統合指南 - 現自動模擬 (Auto-Mocking)。 AutoNSubstituteDataAttribute、Frozen 機制、Greedy 構築戦略略。 IMapper(AutoMapper/Mapster)等の特殊な相依存性のゲスト化プロセスを含みます。 適用於複雜相依性注入測試、模擬驗證與行為設定。 ソース: kevintsengtw/dotnet-testing-agent-skills。

原文を見る

引用可能な情報

AI/検索での引用用の安定したフィールドとコマンド。

インストールコマンド
npx skills add https://github.com/kevintsengtw/dotnet-testing-agent-skills --skill dotnet-testing-autofixture-nsubstitute-integration
カテゴリ
</>開発ツール
認証済み
初回登録
2026-02-01
更新日
2026-02-18

クイックアンサー

dotnet-testing-autofixture-nsubstitute-integration とは?

AutoFixture 與 NSubstitute 統合指南 - 現自動模擬 (Auto-Mocking)。 AutoNSubstituteDataAttribute、Frozen 機制、Greedy 構築戦略略。 IMapper(AutoMapper/Mapster)等の特殊な相依存性のゲスト化プロセスを含みます。 適用於複雜相依性注入測試、模擬驗證與行為設定。 ソース: kevintsengtw/dotnet-testing-agent-skills。

dotnet-testing-autofixture-nsubstitute-integration のインストール方法は?

ターミナルまたはコマンドラインツール(Terminal、iTerm、Windows Terminal など)を開きます このコマンドをコピーして実行します: npx skills add https://github.com/kevintsengtw/dotnet-testing-agent-skills --skill dotnet-testing-autofixture-nsubstitute-integration インストール後、スキルは自動的に AI コーディング環境に設定され、Claude Code や Cursor で使用できるようになります

ソースリポジトリはどこですか?

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