·dotnet-testing-unit-test-fundamentals
</>

dotnet-testing-unit-test-fundamentals

kevintsengtw/dotnet-testing-agent-skills

Die .NET-Version wird zuerst heruntergeladen. 當需要建立單元測試, 了解測試基礎, 學習 3A Pattern, 掌握測試最佳實踐時使用. 涵蓋 FIRST 原則、AAA Pattern、Fact/Theory、測試金字塔等。

27Installationen·1Trend·@kevintsengtw

Installation

$npx skills add https://github.com/kevintsengtw/dotnet-testing-agent-skills --skill dotnet-testing-unit-test-fundamentals

SKILL.md

| Arrange | 準備測試所需的物件、資料、Mock | 使用 const 宣告常數值,提高可讀性 | | Act | 執行被測試的方法 | 通常只有一行,呼叫被測方法 | | Assert | 驗證結果 | 每個測試只驗證一個行為 |

| Add輸入1和2應回傳3 | 測試正常輸入 | | Add輸入負數和正數應回傳正確結果 | 測試邊界條件 | | Divide輸入10和0應拋出DivideByZeroException | 測試例外情況 | | IsValidEmail輸入null值應回傳False | 測試無效輸入 | | GetDomain輸入有效Email應回傳網域名稱 | 測試回傳值 |

| Assert.Equal(expected, actual) | 驗證相等 | | Assert.NotEqual(expected, actual) | 驗證不相等 | | Assert.True(condition) | 驗證條件為真 | | Assert.False(condition) | 驗證條件為假 | | Assert.Null(object) | 驗證為 null | | Assert.NotNull(object) | 驗證不為 null | | Assert.Throws (action) | 驗證拋出特定例外 | | Assert.Empty(collection) | 驗證集合為空 | | Assert.Contains(item, collection) | 驗證集合包含項目 |

Die .NET-Version wird zuerst heruntergeladen. 當需要建立單元測試, 了解測試基礎, 學習 3A Pattern, 掌握測試最佳實踐時使用. 涵蓋 FIRST 原則、AAA Pattern、Fact/Theory、測試金字塔等。 Quelle: kevintsengtw/dotnet-testing-agent-skills.

Original anzeigen

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-unit-test-fundamentals
Kategorie
</>Entwicklung
Verifiziert
Erstes Auftreten
2026-02-01
Aktualisiert
2026-02-18

Schnelle Antworten

Was ist dotnet-testing-unit-test-fundamentals?

Die .NET-Version wird zuerst heruntergeladen. 當需要建立單元測試, 了解測試基礎, 學習 3A Pattern, 掌握測試最佳實踐時使用. 涵蓋 FIRST 原則、AAA Pattern、Fact/Theory、測試金字塔等。 Quelle: kevintsengtw/dotnet-testing-agent-skills.

Wie installiere ich dotnet-testing-unit-test-fundamentals?

Ö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-unit-test-fundamentals 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