TestFailure (see Figure B-7) is a class containing a Test and an associated exception. TestResult produces a TestFailure whenever there is a test failure or error.
public class TestFailure extends Object
Constructs a TestFailure for a Test and its exception.
Gets the exception message.
Gets the failed test.
Returns TRUE if the exception is a failure represented by an instance of AssertionFailedError . If FALSE , the test produced an error.
Gets the exception.
Returns a description of the failure consisting of the string Test.toString( ) and the exception message.
Returns the stack trace for the exception.
These attributes contain the Test and the exception.