class TestMethod extends java.lang.Object implements ConsoleOutputReceiver
Modifier and Type | Field and Description |
---|---|
private ReportEntry |
description |
private long |
endTime |
private ReportEntry |
ignored |
private java.util.concurrent.atomic.AtomicReference<LogicalStream> |
output |
private long |
startTime |
private static java.lang.InheritableThreadLocal<TestMethod> |
TEST_METHOD |
private ReportEntry |
testError |
private ReportEntry |
testFailure |
private TestSet |
testSet |
Constructor and Description |
---|
TestMethod(ReportEntry description,
TestSet testSet) |
Modifier and Type | Method and Description |
---|---|
(package private) void |
attachToThread() |
private ReportEntry |
createReportEntry(ReportEntry reportEntry) |
(package private) void |
detachFromCurrentThread() |
(package private) int |
getElapsed() |
(package private) long |
getEndTime() |
(package private) LogicalStream |
getLogicalStream() |
(package private) long |
getStartTime() |
TestSet |
getTestSet() |
(package private) static TestMethod |
getThreadTestMethod() |
(package private) void |
replay(RunListener reporter) |
private void |
setEndTime() |
(package private) void |
testError(ReportEntry failure) |
(package private) void |
testFailure(ReportEntry failure) |
(package private) void |
testFinished() |
(package private) void |
testIgnored(ReportEntry description) |
void |
writeTestOutput(byte[] buf,
int off,
int len,
boolean stdout)
Forwards process output from the running test-case into the reporting system
|
private static final java.lang.InheritableThreadLocal<TestMethod> TEST_METHOD
private final java.util.concurrent.atomic.AtomicReference<LogicalStream> output
private final ReportEntry description
private final TestSet testSet
private final long startTime
private volatile long endTime
private volatile ReportEntry testFailure
private volatile ReportEntry testError
private volatile ReportEntry ignored
TestMethod(ReportEntry description, TestSet testSet)
void testFinished()
void testIgnored(ReportEntry description)
void testFailure(ReportEntry failure)
void testError(ReportEntry failure)
private void setEndTime()
int getElapsed()
long getStartTime()
long getEndTime()
void replay(RunListener reporter)
private ReportEntry createReportEntry(ReportEntry reportEntry)
void attachToThread()
void detachFromCurrentThread()
static TestMethod getThreadTestMethod()
LogicalStream getLogicalStream()
public void writeTestOutput(byte[] buf, int off, int len, boolean stdout)
ConsoleOutputReceiver
writeTestOutput
in interface ConsoleOutputReceiver
buf
- the buffer to writeoff
- offsetlen
- lenstdout
- Indicates if this is stdoutpublic TestSet getTestSet()