Currently the utility class OutputAnalyzer can work with streams and process outputs.
I suggest adding a simple ctor that will help working with file:
/**
* Create an OutputAnalyzer, a utility class for verifying output and exit
* value from a Process
*
* @param file a text file to analyze
* @throws IOException If an I/O error occurs.
*/
public OutputAnalyzer(File txt) throws IOException {
this(new String(Files.readAllBytes(Paths.get(txt)));
}
I suggest adding a simple ctor that will help working with file:
/**
* Create an OutputAnalyzer, a utility class for verifying output and exit
* value from a Process
*
* @param file a text file to analyze
* @throws IOException If an I/O error occurs.
*/
public OutputAnalyzer(File txt) throws IOException {
this(new String(Files.readAllBytes(Paths.get(txt)));
}
- duplicates
-
JDK-8222713 Add OutputAnalyzer(Path) constructor
-
- Resolved
-