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