You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
.Net: [.NET] TimePlugin: add TimeProvider injection for testability #14111
TimePlugin currently calls DateTimeOffset.Now directly in all methods, making unit tests depend on the real clock. The test file already has a // TODO: allow clock injection and test all functions comment acknowledging this gap.
Proposed fix: accept a TimeProvider constructor parameter (defaulting to TimeProvider.System), which is the standard .NET pattern for clock abstraction since .NET 8.
I have an implementation ready and will submit a PR shortly.
changed the title [-][.NET] TimePlugin: add TimeProvider injection for testability[/-][+].Net: [.NET] TimePlugin: add TimeProvider injection for testability[/+]on Jun 23, 2026
Activity
[-][.NET] TimePlugin: add TimeProvider injection for testability[/-][+].Net: [.NET] TimePlugin: add TimeProvider injection for testability[/+].Net: [.NET] Add TimeProvider injection to TimePlugin for determinist…