New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

StubClock could probably use an auto-advance option #72

Closed
GoogleCodeExporter opened this Issue Mar 15, 2015 · 1 comment

Comments

Projects
None yet
1 participant
@GoogleCodeExporter

GoogleCodeExporter commented Mar 15, 2015

One advantage of using a fake clock implementation is that tests are easy to 
write because the time doesn't change.  One disadvantage is that it's not 
possible to then test operations that rely on time advancing (e.g. retrying 
operations).

One option is to use a mock clock, but programming the expectations is tedious. 
A simpler solution is to use an automatically advancing fake, such that each 
read advances time by a specified amount.

It seems like it would be useful for StubClock to provide an AutoAdvanceBy 
optional Duration (or Nullable<Duration>?) property that could be set to a 
value to opt-in to this behaviour.

Original issue reported on code.google.com by malcolm.rowe on 21 Apr 2012 at 9:33

@GoogleCodeExporter

This comment has been minimized.

GoogleCodeExporter commented Mar 15, 2015

Done in change d8f9a1bdb580.

Original comment by jonathan.skeet on 28 Jun 2012 at 9:19

  • Changed state: Fixed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment