Unit Testing: DateTime.Now

Posted by Pedro on Stack Overflow See other posts from Stack Overflow or by Pedro
Published on 2010-03-11T14:31:56Z Indexed on 2010/03/20 4:01 UTC
Read the original article Hit count: 388

I have some unit tests that expects the 'current time' to be different than DateTime.Now and I don't want to change the computer's time, obviously. What's the best strategy to achieve this?

Thanks

© Stack Overflow or respective owner

Related posts about unit-testing

Related posts about datetime