How to set a (future) test-only date during a debug? (visual studio)

Asked

Viewed 17 times

-1

I have to test the system with some special dates. I currently do this manually, IE, where there is a "Datetime.Now" put a breakpoint and Seto the date I want. Another way is by changing the windows date / time. But it takes a lot of work.

Is there an easier way to do that? Suddenly setting directly in the visual studio, or in the code / project / Solution???

PS.: Test during Debug and not using automated testing.

  • Do you say "test" by running the program and seeing things? Or by using an automated test? In the second case, it should be possible to mock. Click [Edit] to make your question clearer.

  • During debug, keep seeing things. The system has no unit tests

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.