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
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.

Show comment
Hide comment
@GoogleCodeExporter

GoogleCodeExporter Mar 15, 2015

Done in change d8f9a1bdb580.

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

  • Changed state: Fixed
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