public class TestClassReport extends AbstractReport<TestClassReport,TestClassReportBuilder> implements WithConfigurationReport
Report
implementation that represents any report information related to a test class.
Apart from the basic implementation it also provides some additional information:
TestClassReport
Constructor and Description |
---|
TestClassReport()
Creates an instance of
TestClassReport |
TestClassReport(String name)
Creates an instance of
TestClassReport with the given String set as a name as UnknownStringKey |
TestClassReport(StringKey name)
Creates an instance of
TestClassReport 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 TestMethodReport class then it adds it into the list of test-method-reports
is any other type of Report class then it adds it into the list of sub-reports
|
ConfigurationReport |
getConfiguration()
Returns the
ConfigurationReport |
Class<TestClassReportBuilder> |
getReportBuilderClass()
Returns a
ReportBuilder class that should be used as a builder for the report implementations |
String |
getStart()
Returns time when the test class execution started
|
String |
getStop()
Returns time when the test class execution stopped
|
List<TestMethodReport> |
getTestMethodReports()
Returns a list of
TestMethodReport s that have been run and are declared in associated test class. |
TestClassReport |
merge(TestClassReport 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 |
setStop(String stop)
Sets the given time as time when an associated test class execution stopped
|
defaultMerge, getEntries, getName, getSubReports, setEntries, setName, setSubReports
public TestClassReport()
TestClassReport
public TestClassReport(StringKey name)
TestClassReport
with the given StringKey
set as a namename
- A StringKey
to be set as a namepublic TestClassReport(String name)
TestClassReport
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 String getStop()
public void setStop(String stop)
stop
- Stop time to be setpublic String getStart()
public List<TestMethodReport> getTestMethodReports()
TestMethodReport
s that have been run and are declared in associated test class.TestMethodReport
s that have been run and are declared in associated test class.public TestClassReport merge(TestClassReport 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 TestClassReport
and adds them into the list of entries and sub-reports respectively withing this
instance of report. In addition, TestClassReport
takes the ConfigurationReport
and merges it with
the current one. The list of TestMethodReport
is taken as well and added into the list contained in this report.
The last thing is that it check if the new report contains stop time and if yes, then it sets it as stop time in this report.merge
in interface Report<TestClassReport,TestClassReportBuilder>
newReport
- A TestClassReport
to be mergedTestClassReport
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-report.TestMethodReport
class then it adds it into the list of test-method-reportsReport
class then it adds it into the list of sub-reportsaddNewReport
in interface Report<TestClassReport,TestClassReportBuilder>
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<TestClassReportBuilder> getReportBuilderClass()
Report
ReportBuilder
class that should be used as a builder for the report implementationsgetReportBuilderClass
in interface Report<TestClassReport,TestClassReportBuilder>
ReportBuilder
class that should be used as a builder for the report implementationsCopyright © 2017 JBoss by Red Hat. All rights reserved.