Rename TestAotMappings to AotTestContextInitializers
- for consistency with AotTestAttributes and similar classes See gh-28205, gh-28204
This commit is contained in:
@@ -31,7 +31,7 @@ abstract class AbstractAotTests {
|
||||
|
||||
static final String[] expectedSourceFilesForBasicSpringTests = {
|
||||
// Global
|
||||
"org/springframework/test/context/aot/TestAotMappings__Generated.java",
|
||||
"org/springframework/test/context/aot/AotTestContextInitializers__Generated.java",
|
||||
"org/springframework/test/context/aot/AotTestAttributes__Generated.java",
|
||||
// BasicSpringJupiterSharedConfigTests
|
||||
"org/springframework/context/event/DefaultEventListenerFactory__TestContext001_BeanDefinitions.java",
|
||||
|
||||
@@ -74,7 +74,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
|
||||
import static org.springframework.test.web.servlet.setup.MockMvcBuilders.webAppContextSetup;
|
||||
|
||||
/**
|
||||
* Tests for {@link TestContextAotGenerator}, {@link TestAotMappings},
|
||||
* Tests for {@link TestContextAotGenerator}, {@link AotTestContextInitializers},
|
||||
* {@link AotTestAttributes}, {@link AotContextLoader}, and run-time hints.
|
||||
*
|
||||
* @author Sam Brannen
|
||||
@@ -126,11 +126,11 @@ class TestContextAotGeneratorTests extends AbstractAotTests {
|
||||
assertThat(aotAttributes.getString("bogus")).isNull();
|
||||
assertThat(aotAttributes.getBoolean("bogus")).isFalse();
|
||||
|
||||
TestAotMappings testAotMappings = new TestAotMappings();
|
||||
AotTestContextInitializers aotContextInitializers = new AotTestContextInitializers();
|
||||
for (Class<?> testClass : testClasses) {
|
||||
MergedContextConfiguration mergedConfig = buildMergedContextConfiguration(testClass);
|
||||
ApplicationContextInitializer<ConfigurableApplicationContext> contextInitializer =
|
||||
testAotMappings.getContextInitializer(testClass);
|
||||
aotContextInitializers.getContextInitializer(testClass);
|
||||
assertThat(contextInitializer).isNotNull();
|
||||
ApplicationContext context = ((AotContextLoader) mergedConfig.getContextLoader())
|
||||
.loadContextForAotRuntime(mergedConfig, contextInitializer);
|
||||
@@ -153,7 +153,7 @@ class TestContextAotGeneratorTests extends AbstractAotTests {
|
||||
}
|
||||
|
||||
private static void assertRuntimeHints(RuntimeHints runtimeHints) {
|
||||
assertReflectionRegistered(runtimeHints, TestAotMappings.GENERATED_MAPPINGS_CLASS_NAME, INVOKE_PUBLIC_METHODS);
|
||||
assertReflectionRegistered(runtimeHints, AotTestContextInitializers.GENERATED_MAPPINGS_CLASS_NAME, INVOKE_PUBLIC_METHODS);
|
||||
assertReflectionRegistered(runtimeHints, AotTestAttributesCodeGenerator.GENERATED_ATTRIBUTES_CLASS_NAME, INVOKE_PUBLIC_METHODS);
|
||||
|
||||
Stream.of(
|
||||
@@ -356,7 +356,7 @@ class TestContextAotGeneratorTests extends AbstractAotTests {
|
||||
|
||||
private static final String[] expectedSourceFiles = {
|
||||
// Global
|
||||
"org/springframework/test/context/aot/TestAotMappings__Generated.java",
|
||||
"org/springframework/test/context/aot/AotTestContextInitializers__Generated.java",
|
||||
"org/springframework/test/context/aot/AotTestAttributes__Generated.java",
|
||||
// BasicSpringJupiterSharedConfigTests
|
||||
"org/springframework/context/event/DefaultEventListenerFactory__TestContext001_BeanDefinitions.java",
|
||||
|
||||
Reference in New Issue
Block a user