d/dotnetAahmadAug 16, 2026
TimeProvider abstraction — do you inject it for testability?

DateTime.Now in tests is a known smell, and TimeProvider is the official fix. But it threads through every layer. Is the ceremony worth it for code that doesn't do much time math?

17
0 comments

Comments (0)