public class RunAfterTestExecutionCallbacks extends Statement
RunAfterTestExecutionCallbacks
はカスタム JUnit Statement
であり、提供されている TestContextManager
で afterTestExecution()
を呼び出すことにより、Spring TestContext フレームワークを JUnit 4 実行チェーンにプラグインできます。注意 : このクラスには、JUnit 4.9 以上が必要です。
evaluate()
, RunBeforeTestExecutionCallbacks
コンストラクターと説明 |
---|
RunAfterTestExecutionCallbacks(Statement next, ObjectSE testInstance, MethodSE testMethod, TestContextManager testContextManager) 新しい RunAfterTestExecutionCallbacks ステートメントを作成します。 |
修飾子と型 | メソッドと説明 |
---|---|
void | evaluate() 実行された例外チェーン(通常は RunBeforeTestExecutionCallbacks のインスタンス)の次の Statement を評価し、スローされた例外をキャッチしてから、最初にキャッチされた例外(ある場合)を提供して TestContextManager.afterTestExecution(java.lang.Object, java.lang.reflect.Method, java.lang.Throwable) を呼び出します。 |
cloneSE, equalsSE, finalizeSE, getClassSE, hashCodeSE, notifySE, notifyAllSE, toStringSE, waitSE, waitSE, waitSE
public RunAfterTestExecutionCallbacks(Statement next, ObjectSE testInstance, MethodSE testMethod, TestContextManager testContextManager)
RunAfterTestExecutionCallbacks
ステートメントを作成します。next
- 実行チェーンの次の Statement
testInstance
- 現在のテストインスタンス (非 null
)testMethod
- テストインスタンスで実行されたばかりのテストメソッド testContextManager
- afterTestExecution()
を呼び出す TestContextManager public void evaluate() throws ThrowableSE
RunBeforeTestExecutionCallbacks
のインスタンス)の次の Statement
を評価し、スローされた例外をキャッチしてから、最初にキャッチされた例外(ある場合)を提供して TestContextManager.afterTestExecution(java.lang.Object, java.lang.reflect.Method, java.lang.Throwable)
を呼び出します。afterTestExecution()
の呼び出しが例外をスローした場合、その例外も追跡されます。複数の例外が MultipleFailureException
に結合されます。
Statement
の evaluate
ThrowableSE