generate-testability-wrappers · AI Skill 用途与安装 · iSkills.cc

为难以测试的静态依赖生成可注入的包装器代码。

分类:编程开发

来源仓库:dotnet/skills

适合用来做什么

  • 为这个C#类生成一个测试性包装。
  • 创建一个控制台包装来测试这个方法。

不适合的情况

  • DO NOT USE when the target already consumes an injected interface or built-in abstraction such as IFileSystem or TimeProvider, even if the request says "generate a wrapper"; no new wrapper i
  • For an > instantiable class, prefer constructor injection and compose it explicitly or > show the requested registration.

安装 generate-testability-wrappers

npx skills add https://www.iskills.cc/skills/dotnet/skills/generate-testability-wrappers/SKILL.md

在本机终端执行安装命令。安装前请阅读原始说明,确认所需工具、账号和权限。

查看安装步骤 · 查看常见问题