java.lang.Object
com.agentforge4j.testkit.capture.CapturingFileSink
- All Implemented Interfaces:
FileSink
In-memory
FileSink that captures every write instead of touching disk, so a test can
assert which files a run produced.
Writes are captured verbatim — including any path-traversal attempt — because there is no filesystem to protect; traversal rejection is exercised at the command layer, not here.
-
Field Summary
Fields inherited from interface com.agentforge4j.runtime.command.FileSink
NO_OP_FILE_SINK -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the captured writes in the order they occurred.voidAccept a file produced by an agent.
-
Constructor Details
-
CapturingFileSink
public CapturingFileSink()
-
-
Method Details
-
write
Description copied from interface:FileSinkAccept a file produced by an agent. Implementations are responsible for their own path-traversal protection when the target is a real filesystem. -
capturedFiles
Returns the captured writes in the order they occurred.- Returns:
- an immutable snapshot of the captured files
-