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!