Skip to content
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
Closed

StubClock could probably use an auto-advance option #72

GoogleCodeExporter opened this issue Mar 15, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

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
Copy link
Author

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant