Simple can be harder than complex
  • Home
  • LinkedIn
  • Event-Driven

Unit Tests

A collection of 1 post

.NET

DateTime is nondeterministic - make DateTime testable

How do you make DateTime testable in .NET? Once you use DateTime.UtcNow in the body of a method and you did not pass it as a parameter you no longer have control

  • Jens Gheerardyn
1 min read
Simple can be harder than complex © 2025
Latest Posts Twitter Ghost