4 ms·
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
by rmetzler 12y 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.