Skip to content

Commit 8b0bffb

Browse files
committed
Flesh out Javadoc
1 parent 79e6d7c commit 8b0bffb

File tree

2 files changed

+281
-16
lines changed

2 files changed

+281
-16
lines changed

README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Java 8's `Clock` class is a big step in the right direction for testability, but it's still a pain. You can
22
test using `Clock.fixed()` but that's immutable so you can't test how your code responds to the passage of time.
3-
You can use a mocking library to stub the `instant()` method, but that's still awkward and indirect.
3+
You can use a mocking library to stub the `instant()` and `getZone()` methods, but that's still awkward and indirect.
44

55
This library provides a mutable `MockClock` class that can be constructed as of a given date and time, then adjusted as
66
needed. Here's an example of how to use it:
@@ -17,3 +17,5 @@ needed. Here's an example of how to use it:
1717
clock.advanceBySeconds(30);
1818

1919
assertThat(testSubject.someMethod(), is(expectedValueAfter30Seconds));
20+
21+
© 2015 State Machine Systems Ltd. [Apache Licence, Version 2.0]( http://www.apache.org/licenses/LICENSE-2.0)

0 commit comments

Comments
 (0)