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

dotnet-testing-autofixture-nsubstitute-integration

kevintsengtw/dotnet-testing-agent-skills

AutoFixture 與 NSubstitute 整合指南 - 實現自動模擬(자동 조롱)。 涵蓋 AutoNSubstituteDataAttribute、Frozen 機제、Greedy 建構策略。 包含 IMapper(AutoMapper/Mapster)는 等特殊依性的客製化處리입니다. 適用於複雜依性注入測試、Mock 驗證與行為設定.

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 整合指南 - 實現自動模擬(자동 조롱)。 涵蓋 AutoNSubstituteDataAttribute、Frozen 機제、Greedy 建構策略。 包含 IMapper(AutoMapper/Mapster)는 等特殊依性的客製化處리입니다. 適用於複雜依性注入測試、Mock 驗證與行為設定. 출처: 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 整合指南 - 實現自動模擬(자동 조롱)。 涵蓋 AutoNSubstituteDataAttribute、Frozen 機제、Greedy 建構策略。 包含 IMapper(AutoMapper/Mapster)는 等特殊依性的客製化處리입니다. 適用於複雜依性注入測試、Mock 驗證與行為設定. 출처: 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