-
-
Notifications
You must be signed in to change notification settings - Fork 10
feat: allow setting the used ITimeSystem
#824
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds the ability to configure a custom ITimeSystem when initializing a MockFileSystem, enhancing the testing capabilities by allowing developers to control time behavior in their tests.
- Adds a new
UseTimeSystem()method toMockFileSystemOptionsfor configuring custom time systems - Updates the
MockFileSystemconstructor to use the provided time system instead of always defaulting to current time - Includes comprehensive test coverage to verify the new functionality works correctly
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| Source/Testably.Abstractions.Testing/MockFileSystem.cs | Adds UseTimeSystem() configuration method and updates constructor to use provided time system |
| Tests/Testably.Abstractions.Testing.Tests/MockFileSystemInitializationTests.cs | Adds test coverage for the new time system configuration feature and updates existing test parameter naming |
|
Test Results 37 files ± 0 37 suites ±0 15m 48s ⏱️ -11s Results for commit 4a46b39. ± Comparison against base commit 92988f9. This pull request removes 35631 and adds 35641 tests. Note that renamed tests count towards both.This pull request removes 1754 skipped tests and adds 1754 skipped tests. Note that renamed tests count towards both. |
|
This is addressed in release v4.3.0. |



This PR adds the ability to configure a custom
ITimeSystemwhen initializing aMockFileSystem, enhancing the testing capabilities by allowing developers to control time behavior in their tests.UseTimeSystem()method toMockFileSystemOptionsfor configuring custom time systemsMockFileSystemconstructor to use the provided time system instead of always defaulting to current time