Skip to main content

tunit-mocking

星标1
分支0
更新时间2026年6月4日 17:42

TUnit's source-generated, AOT-compatible mocking framework — TUnit.Mocks. Use whenever the user is mocking dependencies in TUnit tests, references Mock.Of<T>(), `.Mock()` extension methods, `Any()`, `Is<T>(...)`, `WasCalled(Times.Once)`, or asks how to stub HttpClient/ILogger/ILogger<T> in TUnit. Also use when the user mentions the TUnit.Mocks, TUnit.Mocks.Http, or TUnit.Mocks.Logging packages, or asks how to verify mock calls without Moq/NSubstitute. Covers mock creation, setup (Returns/Throws/Callback/sequences/properties), argument matchers, call verification with the Times constraints, ordered verification, HTTP request matching and verification, and ILogger entry assertions.

安装

用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。

SKILL.md
readonly