junit.framework
クラス TestFailure

java.lang.Object
  |
  +--junit.framework.TestFailure

public class TestFailure
extends java.lang.Object

検証に失敗したTestオブジェクトとスローされた例外を格納するクラスです。

関連項目:
TestResult

フィールドの概要
protected  Test fFailedTest
          検証に失敗したTestオブジェクト
protected  java.lang.Throwable fThrownException
          スローされた例外オブジェクト
 
コンストラクタの概要
TestFailure(Test failedTest, java.lang.Throwable thrownException)
          検証に失敗したTestオブジェクトとスローされた例外を元に、
TestFailureオブジェクトを生成します。
 
メソッドの概要
 java.lang.String exceptionMessage()
          スローされた例外のメッセージのみを返却します。
 Test failedTest()
          検証に失敗したTestオブジェクトを取得します。
 boolean isFailure()
          スローされた例外が、AssertionFailedErrorクラスのオブジェクト、または
AssertionFailedErrorのサブクラスのオブジェクトであるかどうかを判定します。
 java.lang.Throwable thrownException()
          スローされた例外を取得します。
 java.lang.String toString()
          検証失敗に関する短いコメントを返却します。
 java.lang.String trace()
          スローされた例外の全てのStackTraceを、文字列として返却します。
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

フィールドの詳細

fFailedTest

protected Test fFailedTest
検証に失敗したTestオブジェクト


fThrownException

protected java.lang.Throwable fThrownException
スローされた例外オブジェクト

コンストラクタの詳細

TestFailure

public TestFailure(Test failedTest,
                   java.lang.Throwable thrownException)
検証に失敗したTestオブジェクトとスローされた例外を元に、
TestFailureオブジェクトを生成します。

メソッドの詳細

failedTest

public Test failedTest()
検証に失敗したTestオブジェクトを取得します。


thrownException

public java.lang.Throwable thrownException()
スローされた例外を取得します。


toString

public java.lang.String toString()
検証失敗に関する短いコメントを返却します。

オーバーライド:
クラス java.lang.Object 内の toString

trace

public java.lang.String trace()
スローされた例外の全てのStackTraceを、文字列として返却します。


exceptionMessage

public java.lang.String exceptionMessage()
スローされた例外のメッセージのみを返却します。


isFailure

public boolean isFailure()
スローされた例外が、AssertionFailedErrorクラスのオブジェクト、または
AssertionFailedErrorのサブクラスのオブジェクトであるかどうかを判定します。

戻り値:
AssertionFailedErrorクラスのオブジェクト、またはサブクラスのオブジェクトの場合true