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