C# - A good library to fake Time.Now?
- by Amokrane
Hi,
In order to Unit-Test a feature, I need to fake DateTime.Now. Something like:
SupposeNowIs(new DateTime(..));
I can either use a third library that does it, or write my own little class.
What do you recommand? Do you know any good library for this purpose?
How would you fake time in C#? By changing DateTime.Now? (I suppose it's read only?).
Thank you!