⇒ Index (Frames) |  ⇒ Index (No Frames) |  ⇒ Package |  ⇒ Package Tree |  ⇒ Full Tree 
junit.framework

Class TestFailure

Object
|
+--junit.framework.TestFailure


public class TestFailure
extends Object

A TestFailure collects a failed test together with the caught exception.
See Also:
TestResult

Field Summary

Test

fFailedTest

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

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

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

See Also:
TestResult

fThrownException

protected Throwable fThrownException

Constructor Details

TestFailure

public TestFailure(Test failedTest, Throwable thrownException)

Constructs a TestFailure with the given test and exception.

Parameters:
failedTest
thrownException

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