|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.junit.runner.notification.Failure
public class Failure
A Failure
holds a description of the failed test and the
exception that was thrown while running it. In most cases the Description
will be of a single test. However, if problems are encountered while constructing the
test (for example, if a BeforeClass
method is not static), it may describe
something other than a single test.
Constructor Summary | |
---|---|
Failure(Description description,
Throwable thrownException)
Constructs a Failure with the given description and exception. |
Method Summary | |
---|---|
Description |
getDescription()
|
Throwable |
getException()
|
String |
getMessage()
Convenience method |
String |
getTestHeader()
|
String |
getTrace()
Convenience method |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Failure(Description description, Throwable thrownException)
Failure
with the given description and exception.
description
- a Description
of the test that failedthrownException
- the exception that was thrown while running the testMethod Detail |
---|
public String getTestHeader()
public Description getDescription()
public Throwable getException()
public String toString()
toString
in class Object
public String getTrace()
public String getMessage()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |