Hello
I have an SP that makes a comparison between records assesment date and getdate() i.e. for assessment in the past or future
I now want to unit test this such that the same results are returned every time
Problem is, getdate() is dynamic and (as far as i can see) outside of my control
So today, < getdate() will return a result and tomorrow it could differ, and the day after, ...
I'm doing unit testing in Visual Studio and want consistency otherwise testing will fail in the future
Is there a way to control the result of getdate() before calling the SP? or something else?
I believe it comes from the OS, so without changing it there (which I really don't want to do), is there any other way?
Thanks