Visual studio feeds

All Visual Studio blogs in one place

Subscribe

Enter your email address:

Delivered by FeedBurner

Increase your website traffic with Attracta.com

Google+

Contact

Email:
Subject:
Message:
Anti-spam: How many eyes has a typical person?

Follow us on FB

Search

Mock C# DateTime.Now in NUnit tests using Moles

AddThis Social Bookmark Button
We needed to test code which uses the current date. To create unit tests it is desirerable to test with different dates. To do this we needed something to mock .net class DateTime. First thing that came to mind was to create our own interface to get the system time and implement different versions. But [...] Share on Facebook Retweet this
Home : Blog List : BroersA Blog : Mock C# DateTime.Now in NUnit tests using Moles