How can we make an acceptance/integration test on a feature that depends on date something happens?
For simplicity, let's assume this feature: we monitor a folder, and add items to a ListView corresponding to the received file. The colour of the listview item will depend on the date it is received. Say, if it's received on sunday, the colour is red, monday, it's blue, etc.
How can we make an test code on this feature without needing a week to run? Should the test code modify system date (But I'm afraid this will cause weirdness in the testing framework and report)? For information, the application is a .net and the developer uses DateTime.Now to get the receive time.
Note that this is not a unit test, this is an acceptance test that mimics the user interaction.
However, this will not test the full, true implementation and is more of a unit test. If you are indeed talking about end to end integration testing, then yes, you will need to modify the system time.