| java.lang.Object org.junit.runner.notification.Failure
Failure | public class Failure (Code) | | A Failure holds a description of the failed test and the
exception that was thrown while running it. In most cases the
org.junit.runner.Description will be of a single test. However, if problems are encountered while constructing the
test (for example, if a
org.junit.BeforeClass method is not static), it may describe
something other than a single test.
|
Constructor Summary | |
public | Failure(Description description, Throwable thrownException) Constructs a Failure with the given description and exception. |
Failure | public Failure(Description description, Throwable thrownException)(Code) | | Constructs a Failure with the given description and exception.
Parameters: description - a org.junit.runner.Description of the test that failed Parameters: thrownException - the exception that was thrown while running the test |
getDescription | public Description getDescription()(Code) | | the raw description of the context of the failure. |
getMessage | public String getMessage()(Code) | | Convenience method
the message of the thrown exception |
getTestHeader | public String getTestHeader()(Code) | | a user-understandable label for the test |
getTrace | public String getTrace()(Code) | | Convenience method
the printed form of the exception |
|
|