Package edu.pdx.cs.joy
Class InvokeMainTestCase.MainMethodResult
java.lang.Object
edu.pdx.cs.joy.InvokeMainTestCase.MainMethodResult
- Enclosing class:
InvokeMainTestCase
Invokes the
main method of a class and captures information about the invocation such as the data
written to standard out and standard error and the exit code.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the data written to standard errReturns the data written to standard outinvoke(boolean allowMutableStaticFields) Invokes the main method
-
Constructor Details
-
MainMethodResult
MainMethodResult(Class<?> mainClass, String[] args)
-
-
Method Details
-
invoke
Invokes the main method- Returns:
- This
MainMethodResult
-
getTextWrittenToStandardOut
Returns the data written to standard out- Returns:
- the data written to standard out
-
getTextWrittenToStandardError
Returns the data written to standard err- Returns:
- the data written to standard err
-