Android APIs
public class

TestFailure

extends Object
java.lang.Object
   ↳ junit.framework.TestFailure

Class Overview

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()
[Expand]
Inherited Methods
From class java.lang.Object

Fields

protected Test fFailedTest

Added in API level 1

protected Throwable fThrownException

Added in API level 1

Public Constructors

public TestFailure (Test failedTest, Throwable thrownException)

Added in API level 1

Constructs a TestFailure with the given test and exception.

Parameters
failedTest Test
thrownException Throwable

Public Methods

public String exceptionMessage ()

Added in API level 1

Returns
String

public Test failedTest ()

Added in API level 1

Gets the failed test.

Returns
Test

public boolean isFailure ()

Added in API level 1

Returns
boolean

public Throwable thrownException ()

Added in API level 1

Gets the thrown exception.

Returns
Throwable

public String toString ()

Added in API level 1

Returns a short description of the failure.

Returns
String a printable representation of this object.

public String trace ()

Added in API level 1

Returns
String