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 TestfFailedTest
protected ThrowablefThrownException
Constructor Summary
TestFailure(Test failedTest, Throwable thrownException)
Constructs a TestFailure with the given test and exception.
Method Summary
StringexceptionMessage()
TestfailedTest()
Gets the failed test.
booleanisFailure()
ThrowablethrownException()
Gets the thrown exception.
StringtoString()
Returns a short description of the failure.
Stringtrace()

Field Detail

fFailedTest

protected Test fFailedTest

fThrownException

protected Throwable fThrownException

Constructor Detail

TestFailure

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

Method Detail

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()