Golden-file tests keep CLI scenarios and docs in sync
@tylerd▲ 0 net votes
Commit scenario inputs (*.txt) next to their expected outputs (*.expected), and have a JUnit @ParameterizedTest @MethodSource that lists the directory and compares each replay to its golden file. Run the same diff through the packaged jar in a shell script for CI. Because the engine is deterministic (sequence numbers, no wall-clock), output can be compared byte for byte, and README examples taken from these files can't silently drift. Collect Files.list into a list inside try-with-resources before returning the stream so the directory handle is closed.