Most visited

Recently visited

Added in API level 1

TestFailure

public class TestFailure
extends Object

java.lang.Object
   ↳ junit.framework.TestFailure


一个 TestFailure与捕获到的异常一起收集失败的测试。

也可以看看:

Summary

Fields

protected Test fFailedTest

protected Throwable fThrownException

Public constructors

TestFailure(Test failedTest, Throwable thrownException)

用给定的测试和例外构造TestFailure。

Public methods

String exceptionMessage()
Test failedTest()

获取失败的测试。

boolean isFailure()
Throwable thrownException()

获取抛出的异常。

String toString()

返回失败的简短描述。

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)

用给定的测试和例外构造TestFailure。

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

获取失败的测试。

Returns
Test

isFailure

Added in API level 1
boolean isFailure ()

Returns
boolean

thrownException

Added in API level 1
Throwable thrownException ()

获取抛出的异常。

Returns
Throwable

toString

Added in API level 1
String toString ()

返回失败的简短描述。

Returns
String a string representation of the object.

trace

Added in API level 1
String trace ()

Returns
String

Hooray!