public final class TestResult
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Class and Description |
---|---|
static class |
TestResult.Status
The test status
|
Modifier and Type | Field and Description |
---|---|
private long |
end |
private ExceptionProxy |
exceptionProxy |
private static long |
serialVersionUID |
private long |
start |
private TestResult.Status |
status |
private java.lang.Throwable |
throwable |
Constructor and Description |
---|
TestResult()
Deprecated.
|
TestResult(TestResult.Status status)
Deprecated.
|
TestResult(TestResult.Status status,
java.lang.Throwable throwable)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
static TestResult |
failed(java.lang.Throwable cause) |
long |
getEnd()
Get the end time.
|
ExceptionProxy |
getExceptionProxy() |
long |
getStart()
Get the start time.
|
TestResult.Status |
getStatus()
Get the status of this test
|
java.lang.Throwable |
getThrowable()
If the test failed, the exception that was thrown.
|
static TestResult |
passed() |
TestResult |
setEnd(long end)
Set the end time of the test.
|
TestResult |
setStart(long start)
Set the start time of the test.
|
TestResult |
setStatus(TestResult.Status status)
Deprecated.
|
TestResult |
setThrowable(java.lang.Throwable throwable) |
static TestResult |
skipped(java.lang.Throwable cause) |
java.lang.String |
toString() |
private static final long serialVersionUID
private TestResult.Status status
private transient java.lang.Throwable throwable
private ExceptionProxy exceptionProxy
private long start
private long end
@Deprecated public TestResult()
@Deprecated public TestResult(TestResult.Status status)
status
- The result status.@Deprecated public TestResult(TestResult.Status status, java.lang.Throwable throwable)
status
- The result status.throwable
- thrown exception if anypublic static TestResult passed()
public static TestResult skipped(java.lang.Throwable cause)
public static TestResult failed(java.lang.Throwable cause)
public TestResult.Status getStatus()
@Deprecated public TestResult setStatus(TestResult.Status status)
public java.lang.Throwable getThrowable()
public TestResult setThrowable(java.lang.Throwable throwable)
public TestResult setStart(long start)
start
- Start time in millisecondspublic long getStart()
public TestResult setEnd(long end)
End
- time in millisecondspublic long getEnd()
public ExceptionProxy getExceptionProxy()
public java.lang.String toString()
toString
in class java.lang.Object