Search

PythonReactSEOPDF
GitHub Skill

dotnet-testing-datetime-testing-timeprovider

使用 Microsoft.Bcl.TimeProvider 測試時間相依邏輯的完整指南。當使用者需要測試與日期時間相關的程式碼(如營業時間判斷、快取過期、排程任務、Token 有效期限)、詢問如何讓 DateTime.Now 可測試、或需要在測試中控制時間流逝時,請使用此技能。涵蓋 TimeProvider 抽象化、FakeTimeProvider 時間控制(凍結、快轉、倒轉)、以及 AutoFixture 整合。

kevintsengtw☆ 17 Repository stars3 Repository forks

Installation

Follow the repository instructions for this skill and your agent. Review the files and dependencies before adding it to your workflow.

View source ↗Guides

Skill instructions

Features and purpose

使用 Microsoft.Bcl.TimeProvider 測試時間相依邏輯的完整指南。當使用者需要測試與日期時間相關的程式碼(如營業時間判斷、快取過期、排程任務、Token 有效期限)、詢問如何讓 DateTime.Now 可測試、或需要在測試中控制時間流逝時,請使用此技能。涵蓋 TimeProvider 抽象化、FakeTimeProvider 時間控制(凍結、快轉、倒轉)、以及 AutoFixture 整合。

Quick start

Follow the repository instructions for this skill and your agent. Review the files and dependencies before adding it to your workflow.

Guides ↗

Examples

Read the usage examples in the source repository.

View source ↗

Source history

Indexed on
2026-01-25
Index updated
2026-03-06
Branch
main

Index and sync dates describe this directory. View the source repository for code history.

GitHub ↗

chat Comments (0)

chat_bubble_outline

No comments yet. Be the first to share your thoughts!