·dotnet-testing-fluentvalidation-testing
</>

dotnet-testing-fluentvalidation-testing

kevintsengtw/dotnet-testing-agent-skills

測試 FluentValidation 驗證器的專門技能。 當需要為 Validator 類別建立測試、驗證業務規則、測試錯誤訊息時使用。 涵蓋 FluentValidation.TestHelper 完整使用、ShouldHaveValidationErrorFor、非同步驗證、跨欄位邏輯等。

15安装·0热度·@kevintsengtw

安装

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

SKILL.md

此技能專注於使用 FluentValidation.TestHelper 測試資料驗證邏輯,涵蓋基本驗證、複雜業務規則、非同步驗證和測試最佳實踐。

| TestValidate(model) | 執行同步驗證 | validator.TestValidate(request) | | TestValidateAsync(model) | 執行非同步驗證 | await validator.TestValidateAsync(request) |

| ShouldHaveValidationErrorFor(x => x.Property) | 斷言該屬性應該有錯誤 | result.ShouldHaveValidationErrorFor(x => x.Username) | | ShouldNotHaveValidationErrorFor(x => x.Property) | 斷言該屬性不應該有錯誤 | result.ShouldNotHaveValidationErrorFor(x => x.Email) | | ShouldNotHaveAnyValidationErrors() | 斷言整個物件沒有任何錯誤 | result.ShouldNotHaveAnyValidationErrors() |

測試 FluentValidation 驗證器的專門技能。 當需要為 Validator 類別建立測試、驗證業務規則、測試錯誤訊息時使用。 涵蓋 FluentValidation.TestHelper 完整使用、ShouldHaveValidationErrorFor、非同步驗證、跨欄位邏輯等。 来源:kevintsengtw/dotnet-testing-agent-skills。

查看原文

可引用信息

为搜索与 AI 引用准备的稳定字段与命令。

安装命令
npx skills add https://github.com/kevintsengtw/dotnet-testing-agent-skills --skill dotnet-testing-fluentvalidation-testing
分类
</>开发工具
认证
收录时间
2026-02-01
更新时间
2026-02-18

快速解答

什么是 dotnet-testing-fluentvalidation-testing?

測試 FluentValidation 驗證器的專門技能。 當需要為 Validator 類別建立測試、驗證業務規則、測試錯誤訊息時使用。 涵蓋 FluentValidation.TestHelper 完整使用、ShouldHaveValidationErrorFor、非同步驗證、跨欄位邏輯等。 来源:kevintsengtw/dotnet-testing-agent-skills。

如何安装 dotnet-testing-fluentvalidation-testing?

打开你的终端或命令行工具(如 Terminal、iTerm、Windows Terminal 等) 复制并运行以下命令:npx skills add https://github.com/kevintsengtw/dotnet-testing-agent-skills --skill dotnet-testing-fluentvalidation-testing 安装完成后,技能将自动配置到你的 AI 编程环境中,可以在 Claude Code 或 Cursor 中使用

这个 Skill 的源码在哪?

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