Interface JUnitTaskMirror.JUnitTestRunnerMirror
- All Known Implementing Classes:
JUnitTestRunner
- Enclosing interface:
JUnitTaskMirror
public static interface JUnitTaskMirror.JUnitTestRunnerMirror
Interface that test runners implement.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
An error occurred.static final int
Some tests failed.static final String
Used in formatter arguments as a placeholder for the basename of the output file (which gets replaced by a test specific output file name later).static final int
No problems with this test. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Add a formatter to the test.int
Returns what System.exit() would return in the standalone version.void
handleErrorFlush
(String output) Handle output sent to System.err.void
handleErrorOutput
(String output) Handle output sent to System.err.void
handleFlush
(String output) Handle output sent to System.out.int
handleInput
(byte[] buffer, int offset, int length) Handle an input request.void
handleOutput
(String output) Handle output sent to System.out.void
run()
Run the test.void
setPermissions
(Permissions perm) Permissions for the test run.
-
Field Details
-
IGNORED_FILE_NAME
Used in formatter arguments as a placeholder for the basename of the output file (which gets replaced by a test specific output file name later).- Since:
- Ant 1.6.3
- See Also:
-
SUCCESS
static final int SUCCESSNo problems with this test.- See Also:
-
FAILURES
static final int FAILURESSome tests failed.- See Also:
-
ERRORS
static final int ERRORSAn error occurred.- See Also:
-
-
Method Details
-
setPermissions
Permissions for the test run.- Parameters:
perm
- the permissions to use.
-
run
void run()Run the test. -
addFormatter
Add a formatter to the test.- Parameters:
formatter
- the formatter to use.
-
getRetCode
int getRetCode()Returns what System.exit() would return in the standalone version.- Returns:
- 2 if errors occurred, 1 if tests failed else 0.
-
handleErrorFlush
Handle output sent to System.err.- Parameters:
output
- coming from System.err
-
handleErrorOutput
Handle output sent to System.err.- Parameters:
output
- output for System.err
-
handleOutput
Handle output sent to System.out.- Parameters:
output
- output for System.out.
-
handleInput
Handle an input request.- Parameters:
buffer
- the buffer into which data is to be read.offset
- the offset into the buffer at which data is stored.length
- the amount of data to read.- Returns:
- the number of bytes read.
- Throws:
IOException
- if the data cannot be read.
-
handleFlush
Handle output sent to System.out.- Parameters:
output
- output for System.out.
-