A collection of functions for testing code which uses java.lang.System.
Install & Compatibility
Where this runs
No compatibility data collected yet for this library.
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
com.github.stefanbirkner.systemlambda.SystemLambda
Captures system output using SystemLambda.tapSystemOut
import com.github.stefanbirkner.systemlambda.SystemLambda;
public class Example {
public static void main(String[] args) throws Exception {
String text = SystemLambda.tapSystemOut(() -> {
System.out.print("Hello");
});
System.out.println(text); // prints "Hello"
}
}
Debug
Known footguns
No known footguns recorded.
Upgrade
Version history
Breaking-change detection hasn't run for this library yet.
Audit
Security & dependencies
CVE tracking and dependency tree are planned for a later release.