mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-09-17 16:39:29 +00:00
Polishing
This commit is contained in:
+11
-8
@@ -39,7 +39,6 @@ import org.springframework.test.context.transaction.TransactionalTestExecutionLi
|
||||
import org.springframework.test.context.web.ServletTestExecutionListener;
|
||||
import org.springframework.util.ClassUtils;
|
||||
|
||||
import static java.util.Arrays.asList;
|
||||
import static java.util.stream.Collectors.toList;
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
|
||||
@@ -65,7 +64,8 @@ class TestExecutionListenersTests {
|
||||
|
||||
@Test
|
||||
void defaultListeners() {
|
||||
List<Class<?>> expected = asList(ServletTestExecutionListener.class,//
|
||||
List<Class<?>> expected = List.of(//
|
||||
ServletTestExecutionListener.class,//
|
||||
DirtiesContextBeforeModesTestExecutionListener.class,//
|
||||
ApplicationEventsTestExecutionListener.class,//
|
||||
BeanOverrideTestExecutionListener.class,//
|
||||
@@ -86,7 +86,8 @@ class TestExecutionListenersTests {
|
||||
*/
|
||||
@Test
|
||||
void defaultListenersMergedWithCustomListenerPrepended() {
|
||||
List<Class<?>> expected = asList(QuuxTestExecutionListener.class,//
|
||||
List<Class<?>> expected = List.of(//
|
||||
QuuxTestExecutionListener.class,//
|
||||
ServletTestExecutionListener.class,//
|
||||
DirtiesContextBeforeModesTestExecutionListener.class,//
|
||||
ApplicationEventsTestExecutionListener.class,//
|
||||
@@ -108,7 +109,8 @@ class TestExecutionListenersTests {
|
||||
*/
|
||||
@Test
|
||||
void defaultListenersMergedWithCustomListenerAppended() {
|
||||
List<Class<?>> expected = asList(ServletTestExecutionListener.class,//
|
||||
List<Class<?>> expected = List.of(//
|
||||
ServletTestExecutionListener.class,//
|
||||
DirtiesContextBeforeModesTestExecutionListener.class,//
|
||||
ApplicationEventsTestExecutionListener.class,//
|
||||
BeanOverrideTestExecutionListener.class,//
|
||||
@@ -120,7 +122,7 @@ class TestExecutionListenersTests {
|
||||
SqlScriptsTestExecutionListener.class,//
|
||||
EventPublishingTestExecutionListener.class,//
|
||||
MockitoResetTestExecutionListener.class,//
|
||||
BazTestExecutionListener.class
|
||||
BazTestExecutionListener.class//
|
||||
);
|
||||
assertRegisteredListeners(MergedDefaultListenersWithCustomListenerAppendedTestCase.class, expected);
|
||||
}
|
||||
@@ -130,7 +132,8 @@ class TestExecutionListenersTests {
|
||||
*/
|
||||
@Test
|
||||
void defaultListenersMergedWithCustomListenerInserted() {
|
||||
List<Class<?>> expected = asList(ServletTestExecutionListener.class,//
|
||||
List<Class<?>> expected = List.of(//
|
||||
ServletTestExecutionListener.class,//
|
||||
DirtiesContextBeforeModesTestExecutionListener.class,//
|
||||
ApplicationEventsTestExecutionListener.class,//
|
||||
BeanOverrideTestExecutionListener.class,//
|
||||
@@ -157,7 +160,7 @@ class TestExecutionListenersTests {
|
||||
assertRegisteredListeners(InheritedDefaultListenersTestCase.class, List.of(QuuxTestExecutionListener.class));
|
||||
assertRegisteredListeners(SubInheritedDefaultListenersTestCase.class, List.of(QuuxTestExecutionListener.class));
|
||||
assertRegisteredListeners(SubSubInheritedDefaultListenersTestCase.class,
|
||||
asList(QuuxTestExecutionListener.class, EnigmaTestExecutionListener.class));
|
||||
List.of(QuuxTestExecutionListener.class, EnigmaTestExecutionListener.class));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -168,7 +171,7 @@ class TestExecutionListenersTests {
|
||||
@Test
|
||||
void customListenersDeclaredOnInterface() {
|
||||
assertRegisteredListeners(ExplicitListenersOnTestInterfaceTestCase.class,
|
||||
asList(FooTestExecutionListener.class, BarTestExecutionListener.class));
|
||||
List.of(FooTestExecutionListener.class, BarTestExecutionListener.class));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user