Package org.apache.maven.surefire.report
Class SimpleReportEntry
- java.lang.Object
-
- org.apache.maven.surefire.report.SimpleReportEntry
-
- All Implemented Interfaces:
ReportEntry
,TestSetReportEntry
- Direct Known Subclasses:
CategorizedReportEntry
public class SimpleReportEntry extends java.lang.Object implements TestSetReportEntry
- Author:
- Kristian Rosenvold
-
-
Constructor Summary
Constructors Modifier Constructor Description SimpleReportEntry()
SimpleReportEntry(java.lang.String source, java.lang.String name)
SimpleReportEntry(java.lang.String source, java.lang.String name, java.lang.Integer elapsed)
SimpleReportEntry(java.lang.String source, java.lang.String name, java.lang.String message)
SimpleReportEntry(java.lang.String source, java.lang.String name, java.util.Map<java.lang.String,java.lang.String> systemProperties)
SimpleReportEntry(java.lang.String source, java.lang.String name, StackTraceWriter stackTraceWriter, java.lang.Integer elapsed)
protected
SimpleReportEntry(java.lang.String source, java.lang.String name, StackTraceWriter stackTraceWriter, java.lang.Integer elapsed, java.lang.String message, java.util.Map<java.lang.String,java.lang.String> systemProperties)
SimpleReportEntry(java.lang.String source, java.lang.String name, StackTraceWriter stackTraceWriter, java.lang.Integer elapsed, java.util.Map<java.lang.String,java.lang.String> systemProperties)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SimpleReportEntry
assumption(java.lang.String source, java.lang.String name, java.lang.String message)
boolean
equals(java.lang.Object o)
java.lang.Integer
getElapsed()
Gets the runtime for the item.java.lang.String
getGroup()
The group/category of the testcasejava.lang.String
getMessage()
A message relating to a non-successful termination.java.lang.String
getName()
The name of the test casejava.lang.String
getNameWithGroup()
A name of the test case together with the group or category (if any exists).java.lang.String
getSourceName()
The class name of the testStackTraceWriter
getStackTraceWriter()
The group/category of the testcasejava.util.Map<java.lang.String,java.lang.String>
getSystemProperties()
int
hashCode()
static SimpleReportEntry
ignored(java.lang.String source, java.lang.String name, java.lang.String message)
java.lang.String
toString()
static SimpleReportEntry
withException(java.lang.String source, java.lang.String name, StackTraceWriter stackTraceWriter)
-
-
-
Constructor Detail
-
SimpleReportEntry
public SimpleReportEntry()
-
SimpleReportEntry
public SimpleReportEntry(java.lang.String source, java.lang.String name)
-
SimpleReportEntry
public SimpleReportEntry(java.lang.String source, java.lang.String name, java.util.Map<java.lang.String,java.lang.String> systemProperties)
-
SimpleReportEntry
public SimpleReportEntry(java.lang.String source, java.lang.String name, java.lang.Integer elapsed)
-
SimpleReportEntry
public SimpleReportEntry(java.lang.String source, java.lang.String name, java.lang.String message)
-
SimpleReportEntry
protected SimpleReportEntry(java.lang.String source, java.lang.String name, StackTraceWriter stackTraceWriter, java.lang.Integer elapsed, java.lang.String message, java.util.Map<java.lang.String,java.lang.String> systemProperties)
-
SimpleReportEntry
public SimpleReportEntry(java.lang.String source, java.lang.String name, StackTraceWriter stackTraceWriter, java.lang.Integer elapsed)
-
SimpleReportEntry
public SimpleReportEntry(java.lang.String source, java.lang.String name, StackTraceWriter stackTraceWriter, java.lang.Integer elapsed, java.util.Map<java.lang.String,java.lang.String> systemProperties)
-
-
Method Detail
-
assumption
public static SimpleReportEntry assumption(java.lang.String source, java.lang.String name, java.lang.String message)
-
ignored
public static SimpleReportEntry ignored(java.lang.String source, java.lang.String name, java.lang.String message)
-
withException
public static SimpleReportEntry withException(java.lang.String source, java.lang.String name, StackTraceWriter stackTraceWriter)
-
getSourceName
public java.lang.String getSourceName()
Description copied from interface:ReportEntry
The class name of the test- Specified by:
getSourceName
in interfaceReportEntry
- Returns:
- A string with the class name
-
getName
public java.lang.String getName()
Description copied from interface:ReportEntry
The name of the test case- Specified by:
getName
in interfaceReportEntry
- Returns:
- A string describing the test case
-
getGroup
public java.lang.String getGroup()
Description copied from interface:ReportEntry
The group/category of the testcase- Specified by:
getGroup
in interfaceReportEntry
- Returns:
- A string
-
getStackTraceWriter
public StackTraceWriter getStackTraceWriter()
Description copied from interface:ReportEntry
The group/category of the testcase- Specified by:
getStackTraceWriter
in interfaceReportEntry
- Returns:
- A string
-
getElapsed
public java.lang.Integer getElapsed()
Description copied from interface:ReportEntry
Gets the runtime for the item. Optional parameter. If the value is not set, it will be determined within the reporting subsystem. Some providers like to calculate this value themselves, and it gets the most accurate value.- Specified by:
getElapsed
in interfaceReportEntry
- Returns:
- duration of a test in milli seconds
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
getMessage
public java.lang.String getMessage()
Description copied from interface:ReportEntry
A message relating to a non-successful termination. May be the "message" from an exception or the reason for a test being ignored- Specified by:
getMessage
in interfaceReportEntry
- Returns:
- A string that explains an anomaly
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
getNameWithGroup
public java.lang.String getNameWithGroup()
Description copied from interface:ReportEntry
A name of the test case together with the group or category (if any exists).- Specified by:
getNameWithGroup
in interfaceReportEntry
- Returns:
- A string with the test case name and group/category, or just the name.
-
getSystemProperties
public java.util.Map<java.lang.String,java.lang.String> getSystemProperties()
- Specified by:
getSystemProperties
in interfaceTestSetReportEntry
-
-