クラス ApplicationEventsTestExecutionListener

java.lang.ObjectSE
org.springframework.test.context.support.AbstractTestExecutionListener
org.springframework.test.context.event.ApplicationEventsTestExecutionListener
実装されたすべてのインターフェース:
OrderedTestExecutionListener

public class ApplicationEventsTestExecutionListener extends AbstractTestExecutionListener
ApplicationEvents のサポートを提供する TestExecutionListener

このリスナーは、テスト実行ライフサイクル内のさまざまなポイントで現在のスレッドの ApplicationEvents の登録を管理し、テストクラスの @Autowired フィールドを介して ApplicationEvents の現在のインスタンスをテストで使用できるようにします。

テストクラスに @RecordApplicationEvents でアノテーションが付けられていないか、メタアノテーションが付けられていない場合、このリスナーは実質的に何も行いません。

導入:
5.3.3
作成者:
Sam Brannen
関連事項: