mirror of
https://github.com/tiennm99/time-mocker.git
synced 2026-08-21 00:25:16 +00:00
docs(readme): add expected output demo with and without time-mocker
This commit is contained in:
@@ -10,6 +10,26 @@ Java test target for [time-mocker](https://github.com/tiennm99/time-mocker) —
|
||||
|
||||
Run alongside `time-mocker` to verify that system time injection works correctly.
|
||||
|
||||
## Expected behavior
|
||||
|
||||
**Without time-mocker** — prints actual current time, ticking every second:
|
||||
|
||||
```
|
||||
2025-01-15T08:30:01
|
||||
2025-01-15T08:30:02
|
||||
2025-01-15T08:30:03
|
||||
```
|
||||
|
||||
**With time-mocker injecting a fake date** (e.g. 2000-06-15T12:00:00) — the same binary prints the mocked time instead:
|
||||
|
||||
```
|
||||
2000-06-15T12:00:01
|
||||
2000-06-15T12:00:02
|
||||
2000-06-15T12:00:03
|
||||
```
|
||||
|
||||
If the output reflects the injected date rather than real system time, the injection is working correctly.
|
||||
|
||||
## License
|
||||
|
||||
Apache-2.0 — see [LICENSE](LICENSE).
|
||||
|
||||
Reference in New Issue
Block a user