Google is committed to advancing racial equity for Black communities. See how.
Added in API level 1

TestFailure

open class TestFailure
kotlin.Any
   ↳ junit.framework.TestFailure

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

Summary

Public constructors

<init>(failedTest: Test!, thrownException: Throwable!)

Constructs a TestFailure with the given test and exception.

Public methods

open String!

open Test!

Gets the failed test.

open Boolean

open Throwable!

Gets the thrown exception.

open String

Returns a short description of the failure.

open String!

Properties

Test!

Throwable!

Public constructors

<init>

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

Constructs a TestFailure with the given test and exception.

Public methods

exceptionMessage

Added in API level 1
open fun exceptionMessage(): String!

failedTest

Added in API level 1
open fun failedTest(): Test!

Gets the failed test.

isFailure

Added in API level 1
open fun isFailure(): Boolean

thrownException

Added in API level 1
open fun thrownException(): Throwable!

Gets the thrown exception.

toString

Added in API level 1
open fun toString(): String

Returns a short description of the failure.

Return
String a string representation of the object.

trace

Added in API level 1
open fun trace(): String!

Properties

fFailedTest

Added in API level 1
protected var fFailedTest: Test!

fThrownException

Added in API level 1
protected var fThrownException: Throwable!