public class TestReport
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
description
The test description.
|
protected java.lang.String |
name
The test name .
|
protected java.lang.String |
reason
The failure reason.
|
protected boolean |
succeeded
The test success.
|
Constructor and Description |
---|
TestReport()
Create a new test report.
|
TestReport(java.lang.String name,
java.lang.String description)
Create a new test report.
|
TestReport(java.lang.String name,
java.lang.String description,
boolean succeded,
java.lang.String reason)
Create a new test report.
|
TestReport(java.lang.String name,
java.lang.String description,
java.lang.Exception reason)
Create a new test report.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getDescription()
Get the description.
|
java.lang.String |
getName()
Get the name.
|
java.lang.String |
getReason()
Get the failure reason.
|
boolean |
isFinished()
Is the test finished, i.e.
|
boolean |
isSucceeded()
Has the test succeeded.
|
void |
setDescription(java.lang.String description)
Set the description.
|
void |
setFailed(java.lang.Exception reason)
Set the report result to failed and set the failure reason.
|
void |
setFailed(java.lang.String reason)
Set the report result to failed and set the failure reason.
|
void |
setName(java.lang.String name)
Set the name.
|
void |
setReason(java.lang.String reason)
Set the failure reason.
|
void |
setSucceeded(boolean succeded)
Set the test success.
|
java.lang.String |
toString()
Returns a string representation of the object.
|
protected java.lang.String name
protected java.lang.String description
protected boolean succeeded
protected java.lang.String reason
public TestReport()
public TestReport(java.lang.String name, java.lang.String description)
public TestReport(java.lang.String name, java.lang.String description, boolean succeded, java.lang.String reason)
public TestReport(java.lang.String name, java.lang.String description, java.lang.Exception reason)
public java.lang.String getName()
public void setName(java.lang.String name)
name
- The name.public java.lang.String getDescription()
public void setDescription(java.lang.String description)
description
- The description.public boolean isSucceeded()
public boolean isFinished()
public void setSucceeded(boolean succeded)
succeded
- True on success.public java.lang.String getReason()
public void setReason(java.lang.String reason)
reason
- The failure reason.public void setFailed(java.lang.Exception reason)
reason
- The failure reason.public void setFailed(java.lang.String reason)
reason
- The failure reason.public java.lang.String toString()
toString
method returns a string that
"textually represents" this object. The result should
be a concise but informative representation that is easy for a
person to read.toString
in class java.lang.Object