Most visited

Recently visited

Added in API level 1

TestFailure

public class TestFailure
extends Object

java.lang.Object
   ↳ junit.framework.TestFailure


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

See also:

Summary

Fields

protected Test fFailedTest

protected Throwable fThrownException

Public constructors

TestFailure(Test failedTest, Throwable thrownException)

Constructs a TestFailure with the given test and exception.

Public methods

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

Inherited methods

From class java.lang.Object

Fields

fFailedTest

Added in API level 1
Test fFailedTest

fThrownException

Added in API level 1
Throwable fThrownException

Public constructors

TestFailure

Added in API level 1
TestFailure (Test failedTest, 
                Throwable thrownException)

Constructs a TestFailure with the given test and exception.

Parameters
failedTest Test
thrownException Throwable

Public methods

exceptionMessage

Added in API level 1
String exceptionMessage ()

Returns
String

failedTest

Added in API level 1
Test failedTest ()

Gets the failed test.

Returns
Test

isFailure

Added in API level 1
boolean isFailure ()

Returns
boolean

thrownException

Added in API level 1
Throwable thrownException ()

Gets the thrown exception.

Returns
Throwable

toString

Added in API level 1
String toString ()

Returns a short description of the failure.

Returns
String a string representation of the object.

trace

Added in API level 1
String trace ()

Returns
String

Hooray!