ScalaTest 0.9.5
|
|
org/scalatest/Report.scala
]
class
Report(val
name : java.lang.String, val
message : java.lang.String, val
throwable : scala.Option[java.lang.Throwable], val
rerunnable : scala.Option[Rerunnable], val
threadName : java.lang.String, val
date : java.util.Date)
extends
AnyRef
Class used to send reports to a Reporter
.
The primary constructor instantiates a new Report
with specified name,
message, optional throwable, optional rerunnable, thread name, and date. This class can be subclassed to send more information
to a reporter.
Extensibility
Report
can be subclassed so that custom information can be passed to the subclass's constructor.
This information can be passed in when the Report
subclass is instantiated, from within
test methods, overridden Suite
methods, or other code. Instances of Report
subclasses
can be passed to any Reporter
, but any custom information they contain will not be presented to the
user except by Reporter
s written with knowledge of the Report
subclass and its custom
information. Thus, when you define a Report
subclass that embeds custom information, you would typically
also define one or more Reporter
classes that present the custom information to the user.
name -
the name of the entity about which this report was generated.message -
a String
message.throwable -
the Throwable
that indicated the problem, or a Throwable
created to capture stack trace information about the problem, or None
. If None
is passed, the problem
is reported without describing a Throwable
.rerunnable -
a Rerunnable
that can be used to rerun a test or other entity (such as a suite), or None
. If None
is passed, the test or other entity can not be rerun.threadName -
a name for the Thread
about whose activity this report was generated.date -
a relevant Date
. For example, the a Date
indicating the time this Report
was generated, or a Date
indicating the time the event reported by this Report
occurred.NullPointerException -
if any of the specified name
, message
, throwable
, or rerunnable
, threadName
, or
date
references are null
.Additional Constructor Summary | |
def
|
this
(name : java.lang.String, message : java.lang.String, throwable : scala.Option[java.lang.Throwable], rerunnable : scala.Option[Rerunnable]) : Report
Constructs a new
Report with specified name,
message, optional throwable, and optional rerunnable. |
def
|
this
(name : java.lang.String, message : java.lang.String) : Report
Constructs a new
Report with specified name
and message. |
Methods inherited from AnyRef | |
getClass, hashCode, equals, clone, toString, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized |
Methods inherited from Any | |
==, !=, isInstanceOf, asInstanceOf |
Additional Constructor Details |
def
this(name : java.lang.String, message : java.lang.String) : Report
Report
with specified name
and message.name -
the name of the entity about which this report was generated.message -
a String
message.NullPointerException -
if either of the specified name
or message
parameters are null
.
def
this(name : java.lang.String, message : java.lang.String, throwable : scala.Option[java.lang.Throwable], rerunnable : scala.Option[Rerunnable]) : Report
Report
with specified name,
message, optional throwable, and optional rerunnable.name -
the name of the entity about which this report was generated.message -
a String
message.throwable -
a relevant Throwable
, or None
. For example, this Throwable
may have indicated a problem being reported by this
Report
, or it may have been created to provide stack trace
information in the Report
.rerunnable -
a Rerunnable
that can be used to rerun a test or other entity, or None
.NullPointerException -
if any of the specified name
, message
, throwable
,
or rerunnable
parameters are null
.
ScalaTest 0.9.5
|
|