I have a 500K+ lines vb.net app, written by 10+ different devs over the past 5 years. Many times it gets the system time and/or date and relies on it.
Now I have to re-run real cases thru the program for regression testing purposes, and it screws up cases where the date/time matter. My fix is easy, just replace all the areas in the program that get current date/time with a sub that gets the current date/time, UNLESS I'm testing, in which case it will return the date/time of the original run.
I have tried searching the sourcecode for the obvious 'current date/time' functions:
Now
DateAndTime.TimeOfDay
Date.ToDay
However, if I miss one, I LOSE.
Can anybody please list more ways to get the current time, that might be hidden in the source code, that I can search for? Note: It's pretty clear none of the 3rd party libs in this system are returning date, well, one is, but I've caught it. so just from .net or vb. Thanks.