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

Since: API Level 1

protected Throwable fThrownException

Since: API Level 1

Public Constructors

public TestFailure (Test failedTest, Throwable thrownException)

Since: API Level 1

Constructs a TestFailure with the given test and exception.

Public Methods

public String exceptionMessage ()

Since: API Level 1

public Test failedTest ()

Since: API Level 1

Gets the failed test.

public boolean isFailure ()

Since: API Level 1

public Throwable thrownException ()

Since: API Level 1

Gets the thrown exception.

public String toString ()

Since: API Level 1

Returns a short description of the failure.

Returns
  • a printable representation of this object.

public String trace ()

Since: API Level 1