Hacker News new | ask | show | jobs
by rmetzler 4250 days ago
Yes, a method is usually much easier to test, if the method gets the current date passed as an argument. The same goes for methods calculating on random values. Passing these to the method enables testing.