public class TestMethodReport extends AbstractReport<TestMethodReport,TestMethodReportBuilder> implements WithConfigurationReport
Report
implementation that represents any report information related to a test method.
Apart from the basic implementation it also provides some additional information:
TestMethodReport
Constructor and Description |
---|
TestMethodReport()
Creates an instance of
TestMethodReport |
TestMethodReport(String name)
Creates an instance of
TestMethodReport with the given String set as a name as UnknownStringKey |
TestMethodReport(StringKey name)
Creates an instance of
TestMethodReport with the given StringKey set as a name |
Modifier and Type | Method and Description |
---|---|
Report |
addNewReport(Report newReport,
Class<? extends Report> expectedReportTypeClass)
Takes the given
Report and if the given expectedReportTypeClass:
is a ConfigurationReport class then it adds it into the list of
sub-reports contained in this report's configuration-report
is a FailureReport class then it adds it into the list of
sub-reports contained in this report's failure-report
is any other type of Report class then it adds it into the list of sub-reports
|
ConfigurationReport |
getConfiguration()
Returns the
ConfigurationReport |
FailureReport |
getFailureReport()
Returns the
FailureReport |
Class<TestMethodReportBuilder> |
getReportBuilderClass()
Returns a
ReportBuilder class that should be used as a builder for the report implementations |
String |
getStart()
Returns time when the test method execution started
|
org.jboss.arquillian.test.spi.TestResult.Status |
getStatus()
Returns the
TestResult.Status of a test method execution |
String |
getStop()
Returns time when the test method execution stopped
|
TestMethodReport |
merge(TestMethodReport newReport)
Apart from the default functionality of merging (
AbstractReport.defaultMerge(AbstractReport) )
it also manages the additional types of information. |
void |
setConfiguration(ConfigurationReport configuration)
Sets the given
ConfigurationReport |
void |
setFailureReport(FailureReport failureReport)
Sets the given
FailureReport |
void |
setStatus(org.jboss.arquillian.test.spi.TestResult.Status status)
Sets the given
TestResult.Status as a result of test method execution |
void |
setStop(String stop)
Sets the given time as time when an associated test method execution stopped
|
defaultMerge, getEntries, getName, getSubReports, setEntries, setName, setSubReports
public TestMethodReport()
TestMethodReport
public TestMethodReport(StringKey name)
TestMethodReport
with the given StringKey
set as a namename
- A StringKey
to be set as a namepublic TestMethodReport(String name)
TestMethodReport
with the given String set as a name as UnknownStringKey
name
- A String to be set as a name as UnknownStringKey
public ConfigurationReport getConfiguration()
WithConfigurationReport
ConfigurationReport
getConfiguration
in interface WithConfigurationReport
ConfigurationReport
public void setConfiguration(ConfigurationReport configuration)
WithConfigurationReport
ConfigurationReport
setConfiguration
in interface WithConfigurationReport
configuration
- A ConfigurationReport
to be setpublic org.jboss.arquillian.test.spi.TestResult.Status getStatus()
TestResult.Status
of a test method executionTestResult.Status
of a test method executionpublic void setStatus(org.jboss.arquillian.test.spi.TestResult.Status status)
TestResult.Status
as a result of test method executionstatus
- A TestResult.Status
to be setpublic FailureReport getFailureReport()
FailureReport
FailureReport
public void setFailureReport(FailureReport failureReport)
FailureReport
failureReport
- A FailureReport
to be setpublic String getStop()
public void setStop(String stop)
stop
- Stop time to be setpublic String getStart()
public TestMethodReport merge(TestMethodReport newReport)
AbstractReport.defaultMerge(AbstractReport)
)
it also manages the additional types of information. The default just takes the entries and sub-reports contained
in the given TestMethodReport
and adds them into the list of entries and sub-reports respectively withing this
instance of report. In addition, TestMethodReport
takes the ConfigurationReport
and FailureReport
and merges them with those ones contained in this report.s
The last thing is that it check if the new report contains stop time and TestResult.Status
; if yes,
then it sets them in this report.merge
in interface Report<TestMethodReport,TestMethodReportBuilder>
newReport
- A TestMethodReport
to be mergedTestMethodReport
public Report addNewReport(Report newReport, Class<? extends Report> expectedReportTypeClass)
Report
and if the given expectedReportTypeClass:
ConfigurationReport
class then it adds it into the list of
sub-reports contained in this report's configuration-reportFailureReport
class then it adds it into the list of
sub-reports contained in this report's failure-reportReport
class then it adds it into the list of sub-reportsaddNewReport
in interface Report<TestMethodReport,TestMethodReportBuilder>
newReport
- A Report
to be addedexpectedReportTypeClass
- A Report
class of a type that is expected as the default one of the given reportReport
that has been added, null otherwisepublic Class<TestMethodReportBuilder> getReportBuilderClass()
Report
ReportBuilder
class that should be used as a builder for the report implementationsgetReportBuilderClass
in interface Report<TestMethodReport,TestMethodReportBuilder>
ReportBuilder
class that should be used as a builder for the report implementationsCopyright © 2017 JBoss by Red Hat. All rights reserved.