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)protectedSimpleReportEntry(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 SimpleReportEntryassumption(java.lang.String source, java.lang.String name, java.lang.String message)booleanequals(java.lang.Object o)java.lang.IntegergetElapsed()Gets the runtime for the item.java.lang.StringgetGroup()The group/category of the testcasejava.lang.StringgetMessage()A message relating to a non-successful termination.java.lang.StringgetName()The name of the test casejava.lang.StringgetNameWithGroup()A name of the test case together with the group or category (if any exists).java.lang.StringgetSourceName()The class name of the testStackTraceWritergetStackTraceWriter()The group/category of the testcasejava.util.Map<java.lang.String,java.lang.String>getSystemProperties()inthashCode()static SimpleReportEntryignored(java.lang.String source, java.lang.String name, java.lang.String message)java.lang.StringtoString()static SimpleReportEntrywithException(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:ReportEntryThe class name of the test- Specified by:
getSourceNamein interfaceReportEntry- Returns:
- A string with the class name
-
getName
public java.lang.String getName()
Description copied from interface:ReportEntryThe name of the test case- Specified by:
getNamein interfaceReportEntry- Returns:
- A string describing the test case
-
getGroup
public java.lang.String getGroup()
Description copied from interface:ReportEntryThe group/category of the testcase- Specified by:
getGroupin interfaceReportEntry- Returns:
- A string
-
getStackTraceWriter
public StackTraceWriter getStackTraceWriter()
Description copied from interface:ReportEntryThe group/category of the testcase- Specified by:
getStackTraceWriterin interfaceReportEntry- Returns:
- A string
-
getElapsed
public java.lang.Integer getElapsed()
Description copied from interface:ReportEntryGets 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:
getElapsedin interfaceReportEntry- Returns:
- duration of a test in milli seconds
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getMessage
public java.lang.String getMessage()
Description copied from interface:ReportEntryA message relating to a non-successful termination. May be the "message" from an exception or the reason for a test being ignored- Specified by:
getMessagein interfaceReportEntry- Returns:
- A string that explains an anomaly
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
getNameWithGroup
public java.lang.String getNameWithGroup()
Description copied from interface:ReportEntryA name of the test case together with the group or category (if any exists).- Specified by:
getNameWithGroupin 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:
getSystemPropertiesin interfaceTestSetReportEntry
-
-