@ -1,5 +1,5 @@
@@ -1,5 +1,5 @@
/ *
* Copyright 2002 - 2020 the original author or authors .
* Copyright 2002 - 2022 the original author or authors .
*
* Licensed under the Apache License , Version 2 . 0 ( the "License" ) ;
* you may not use this file except in compliance with the License .
@ -23,6 +23,7 @@ import java.util.List;
@@ -23,6 +23,7 @@ import java.util.List;
import org.junit.jupiter.api.Test ;
import org.springframework.core.Ordered ;
import org.springframework.core.annotation.AliasFor ;
import org.springframework.core.annotation.AnnotationConfigurationException ;
import org.springframework.test.context.event.ApplicationEventsTestExecutionListener ;
import org.springframework.test.context.event.EventPublishingTestExecutionListener ;
@ -209,7 +210,7 @@ class TestExecutionListenersTests {
@@ -209,7 +210,7 @@ class TestExecutionListenersTests {
private void assertNumRegisteredListeners ( Class < ? > testClass , int expected ) {
TestContextManager testContextManager = new TestContextManager ( testClass ) ;
assertThat ( testContextManager . getTestExecutionListeners ( ) . size ( ) ) . as ( "Num registered TELs for " + testClass ) . isEqualTo ( expected ) ;
assertThat ( testContextManager . getTestExecutionListeners ( ) ) . as ( "Num registered TELs for " + testClass ) . hasSize ( expected ) ;
}
@ -294,6 +295,7 @@ class TestExecutionListenersTests {
@@ -294,6 +295,7 @@ class TestExecutionListenersTests {
@Retention ( RetentionPolicy . RUNTIME )
@interface MetaListenersWithOverrides {
@AliasFor ( annotation = TestExecutionListeners . class )
Class < ? extends TestExecutionListener > [ ] listeners ( ) default
{ FooTestExecutionListener . class , BarTestExecutionListener . class } ;
}
@ -302,8 +304,10 @@ class TestExecutionListenersTests {
@@ -302,8 +304,10 @@ class TestExecutionListenersTests {
@Retention ( RetentionPolicy . RUNTIME )
@interface MetaInheritedListenersWithOverrides {
@AliasFor ( annotation = TestExecutionListeners . class )
Class < ? extends TestExecutionListener > [ ] listeners ( ) default QuuxTestExecutionListener . class ;
@AliasFor ( annotation = TestExecutionListeners . class )
boolean inheritListeners ( ) default true ;
}
@ -311,8 +315,10 @@ class TestExecutionListenersTests {
@@ -311,8 +315,10 @@ class TestExecutionListenersTests {
@Retention ( RetentionPolicy . RUNTIME )
@interface MetaNonInheritedListenersWithOverrides {
@AliasFor ( annotation = TestExecutionListeners . class )
Class < ? extends TestExecutionListener > [ ] listeners ( ) default QuuxTestExecutionListener . class ;
@AliasFor ( annotation = TestExecutionListeners . class )
boolean inheritListeners ( ) default false ;
}