|
|||||||||
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,
java.lang.Throwable thrownException)
Constructs a Failure with the given description and exception. |
Method Summary | |
---|---|
Description |
getDescription()
|
java.lang.Throwable |
getException()
|
java.lang.String |
getMessage()
Convenience method |
java.lang.String |
getTestHeader()
|
java.lang.String |
getTrace()
Convenience method |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Failure(Description description, java.lang.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 java.lang.String getTestHeader()
public Description getDescription()
public java.lang.Throwable getException()
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getTrace()
public java.lang.String getMessage()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |