junit.framework

Class TestFailure


public class TestFailure
extends Object

A TestFailure collects a failed test together with the caught exception.

See Also:
TestResult

Field Summary

protected Test
fFailedTest
protected Throwable
fThrownException

Constructor Summary

TestFailure(Test failedTest, Throwable thrownException)
Constructs a TestFailure with the given test and exception.

Method Summary

String
exceptionMessage()
Test
failedTest()
Gets the failed test.
boolean
isFailure()
Throwable
thrownException()
Gets the thrown exception.
String
toString()
Returns a short description of the failure.
String
trace()

Field Details

fFailedTest

protected Test fFailedTest


fThrownException

protected Throwable fThrownException

Constructor Details

TestFailure

public TestFailure(Test failedTest,
                   Throwable thrownException)
Constructs a TestFailure with the given test and exception.

Method Details

exceptionMessage

public String exceptionMessage()


failedTest

public Test failedTest()
Gets the failed test.


isFailure

public boolean isFailure()


thrownException

public Throwable thrownException()
Gets the thrown exception.


toString

public String toString()
Returns a short description of the failure.


trace

public String trace()