クラス ApplicationEventsTestExecutionListener
java.lang.ObjectSE
org.springframework.test.context.support.AbstractTestExecutionListener
org.springframework.test.context.event.ApplicationEventsTestExecutionListener
- 実装されたすべてのインターフェース:
Ordered
,TestExecutionListener
ApplicationEvents
のサポートを提供する TestExecutionListener
。 このリスナーは、テスト実行ライフサイクル内のさまざまなポイントで現在のスレッドの ApplicationEvents
の登録を管理し、テストクラスの @Autowired
フィールドを介して ApplicationEvents
の現在のインスタンスをテストで使用できるようにします。
テストクラスに @RecordApplicationEvents
でアノテーションが付けられていないか、メタアノテーションが付けられていない場合、このリスナーは実質的に何も行いません。
- 導入:
- 5.3.3
- 作成者:
- Sam Brannen
- 関連事項:
フィールドサマリー
インターフェース org.springframework.core.Ordered から継承されたフィールド
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
コンストラクターのサマリー
メソッドのサマリー
修飾子と型メソッド説明void
afterTestMethod
(TestContext testContext) デフォルトの実装は空です。void
beforeTestMethod
(TestContext testContext) デフォルトの実装は空です。final int
getOrder()
1800
を返します。void
prepareTestInstance
(TestContext testContext) デフォルトの実装は空です。クラス org.springframework.test.context.support.AbstractTestExecutionListener から継承されたメソッド
afterTestClass, afterTestExecution, beforeTestClass, beforeTestExecution
コンストラクターの詳細
ApplicationEventsTestExecutionListener
public ApplicationEventsTestExecutionListener()
メソッドの詳細
getOrder
public final int getOrder()1800
を返します。- 次で指定:
- インターフェース
Ordered
のgetOrder
- オーバーライド:
- クラス
AbstractTestExecutionListener
のgetOrder
- 戻り値:
- オーダー額
- 関連事項:
prepareTestInstance
クラスからコピーされた説明:AbstractTestExecutionListener
デフォルトの実装は空です。必要に応じて、サブクラスでオーバーライドできます。- 次で指定:
- インターフェース
TestExecutionListener
のprepareTestInstance
- オーバーライド:
- クラス
AbstractTestExecutionListener
のprepareTestInstance
- パラメーター:
testContext
- テストのテストコンテキスト。null
- 例外:
ExceptionSE
- 例外の伝播を許可します
beforeTestMethod
クラスからコピーされた説明:AbstractTestExecutionListener
デフォルトの実装は空です。必要に応じて、サブクラスでオーバーライドできます。- 次で指定:
- インターフェース
TestExecutionListener
のbeforeTestMethod
- オーバーライド:
- クラス
AbstractTestExecutionListener
のbeforeTestMethod
- パラメーター:
testContext
- テストメソッドが実行されるテストコンテキスト。非null
- 例外:
ExceptionSE
- 例外の伝播を許可します- 関連事項:
afterTestMethod
クラスからコピーされた説明:AbstractTestExecutionListener
デフォルトの実装は空です。必要に応じて、サブクラスでオーバーライドできます。- 次で指定:
- インターフェース
TestExecutionListener
のafterTestMethod
- オーバーライド:
- クラス
AbstractTestExecutionListener
のafterTestMethod
- パラメーター:
testContext
- テストメソッドが実行されたテストコンテキスト ; 決してnull
- 例外:
ExceptionSE
- 例外の伝播を許可します- 関連事項: