Testing Times in Java « LShift Ltd.

lshift.net/blog/2009/12/06/testing-times-in-java view page cached page
How do you test a Java application that uses the current date or time as the basis for a calculation? I’ve seen a couple of ways: 1. Make sure all date/time operations use a service class to get the current date, which is then mocked 2. Adjust the system clock



All posts about this link

  • share this page on Twitter
  • rss feed for lshift.net
  • alerts create email alert for lshift.net
Copy and paste this code below into your website:
customize »