diff --git a/spring-aop/src/test/java/org/springframework/aop/scope/ScopedProxyBeanRegistrationAotProcessorTests.java b/spring-aop/src/test/java/org/springframework/aop/scope/ScopedProxyBeanRegistrationAotProcessorTests.java index 1ce8b798680..b4a9feec953 100644 --- a/spring-aop/src/test/java/org/springframework/aop/scope/ScopedProxyBeanRegistrationAotProcessorTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/scope/ScopedProxyBeanRegistrationAotProcessorTests.java @@ -28,8 +28,6 @@ import org.springframework.aop.framework.AopInfrastructureBean; import org.springframework.aot.generate.MethodReference; import org.springframework.aot.generate.MethodReference.ArgumentCodeGenerator; import org.springframework.aot.test.generate.TestGenerationContext; -import org.springframework.aot.test.generate.compile.Compiled; -import org.springframework.aot.test.generate.compile.TestCompiler; import org.springframework.beans.factory.BeanCreationException; import org.springframework.beans.factory.aot.AotServices; import org.springframework.beans.factory.aot.BeanFactoryInitializationAotContribution; @@ -43,6 +41,8 @@ import org.springframework.beans.factory.support.RootBeanDefinition; import org.springframework.beans.testfixture.beans.factory.aot.MockBeanFactoryInitializationCode; import org.springframework.beans.testfixture.beans.factory.generator.factory.NumberHolder; import org.springframework.core.ResolvableType; +import org.springframework.core.test.tools.Compiled; +import org.springframework.core.test.tools.TestCompiler; import org.springframework.javapoet.CodeBlock; import org.springframework.javapoet.MethodSpec; import org.springframework.javapoet.ParameterizedTypeName; diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/annotation/AutowiredAnnotationBeanRegistrationAotContributionTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/annotation/AutowiredAnnotationBeanRegistrationAotContributionTests.java index 6cdb0392c54..bfa95b3c8ac 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/annotation/AutowiredAnnotationBeanRegistrationAotContributionTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/annotation/AutowiredAnnotationBeanRegistrationAotContributionTests.java @@ -27,9 +27,6 @@ import org.springframework.aot.generate.MethodReference; import org.springframework.aot.generate.MethodReference.ArgumentCodeGenerator; import org.springframework.aot.hint.predicate.RuntimeHintsPredicates; import org.springframework.aot.test.generate.TestGenerationContext; -import org.springframework.aot.test.generate.compile.CompileWithForkedClassLoader; -import org.springframework.aot.test.generate.compile.Compiled; -import org.springframework.aot.test.generate.compile.TestCompiler; import org.springframework.beans.factory.aot.BeanRegistrationAotContribution; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.support.RegisteredBean; @@ -37,6 +34,9 @@ import org.springframework.beans.factory.support.RootBeanDefinition; import org.springframework.beans.testfixture.beans.factory.aot.MockBeanRegistrationCode; import org.springframework.core.env.Environment; import org.springframework.core.env.StandardEnvironment; +import org.springframework.core.test.tools.CompileWithForkedClassLoader; +import org.springframework.core.test.tools.Compiled; +import org.springframework.core.test.tools.TestCompiler; import org.springframework.javapoet.CodeBlock; import org.springframework.javapoet.MethodSpec; import org.springframework.javapoet.ParameterizedTypeName; diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/aot/BeanDefinitionMethodGeneratorTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/aot/BeanDefinitionMethodGeneratorTests.java index 9bc165da2f7..aacf2f0f2fd 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/aot/BeanDefinitionMethodGeneratorTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/aot/BeanDefinitionMethodGeneratorTests.java @@ -32,10 +32,6 @@ import org.springframework.aot.generate.GenerationContext; import org.springframework.aot.generate.MethodReference; import org.springframework.aot.generate.MethodReference.ArgumentCodeGenerator; import org.springframework.aot.test.generate.TestGenerationContext; -import org.springframework.aot.test.generate.compile.CompileWithForkedClassLoader; -import org.springframework.aot.test.generate.compile.Compiled; -import org.springframework.aot.test.generate.compile.TestCompiler; -import org.springframework.aot.test.generate.file.SourceFile; import org.springframework.beans.factory.config.BeanDefinition; import org.springframework.beans.factory.config.ConstructorArgumentValues.ValueHolder; import org.springframework.beans.factory.support.BeanDefinitionBuilder; @@ -49,6 +45,10 @@ import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.beans.testfixture.beans.factory.aot.MockBeanRegistrationsCode; import org.springframework.core.ResolvableType; import org.springframework.core.mock.MockSpringFactoriesLoader; +import org.springframework.core.test.tools.CompileWithForkedClassLoader; +import org.springframework.core.test.tools.Compiled; +import org.springframework.core.test.tools.SourceFile; +import org.springframework.core.test.tools.TestCompiler; import org.springframework.javapoet.CodeBlock; import org.springframework.javapoet.MethodSpec; import org.springframework.javapoet.ParameterizedTypeName; diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/aot/BeanDefinitionPropertiesCodeGeneratorTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/aot/BeanDefinitionPropertiesCodeGeneratorTests.java index 7e0d4dc6eda..e62354651f5 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/aot/BeanDefinitionPropertiesCodeGeneratorTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/aot/BeanDefinitionPropertiesCodeGeneratorTests.java @@ -30,8 +30,6 @@ import org.junit.jupiter.api.Test; import org.springframework.aot.generate.GeneratedClass; import org.springframework.aot.hint.predicate.RuntimeHintsPredicates; import org.springframework.aot.test.generate.TestGenerationContext; -import org.springframework.aot.test.generate.compile.Compiled; -import org.springframework.aot.test.generate.compile.TestCompiler; import org.springframework.beans.factory.FactoryBean; import org.springframework.beans.factory.config.BeanDefinition; import org.springframework.beans.factory.config.BeanReference; @@ -44,6 +42,8 @@ import org.springframework.beans.factory.support.ManagedMap; import org.springframework.beans.factory.support.ManagedSet; import org.springframework.beans.factory.support.RootBeanDefinition; import org.springframework.beans.testfixture.beans.factory.aot.DeferredTypeBuilder; +import org.springframework.core.test.tools.Compiled; +import org.springframework.core.test.tools.TestCompiler; import org.springframework.javapoet.CodeBlock; import org.springframework.javapoet.MethodSpec; import org.springframework.javapoet.ParameterizedTypeName; diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/aot/BeanDefinitionPropertyValueCodeGeneratorTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/aot/BeanDefinitionPropertyValueCodeGeneratorTests.java index 11fd98eee3a..ce2dec4a67f 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/aot/BeanDefinitionPropertyValueCodeGeneratorTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/aot/BeanDefinitionPropertyValueCodeGeneratorTests.java @@ -35,8 +35,6 @@ import org.junit.jupiter.api.Test; import org.springframework.aot.generate.GeneratedClass; import org.springframework.aot.test.generate.TestGenerationContext; -import org.springframework.aot.test.generate.compile.Compiled; -import org.springframework.aot.test.generate.compile.TestCompiler; import org.springframework.beans.factory.config.BeanReference; import org.springframework.beans.factory.config.RuntimeBeanNameReference; import org.springframework.beans.factory.config.RuntimeBeanReference; @@ -45,6 +43,8 @@ import org.springframework.beans.factory.support.ManagedMap; import org.springframework.beans.factory.support.ManagedSet; import org.springframework.beans.testfixture.beans.factory.aot.DeferredTypeBuilder; import org.springframework.core.ResolvableType; +import org.springframework.core.test.tools.Compiled; +import org.springframework.core.test.tools.TestCompiler; import org.springframework.javapoet.CodeBlock; import org.springframework.javapoet.MethodSpec; import org.springframework.javapoet.ParameterizedTypeName; diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/aot/BeanRegistrationsAotContributionTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/aot/BeanRegistrationsAotContributionTests.java index bd2bba145e9..dcc280c4d48 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/aot/BeanRegistrationsAotContributionTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/aot/BeanRegistrationsAotContributionTests.java @@ -34,15 +34,15 @@ import org.springframework.aot.generate.MethodReference; import org.springframework.aot.generate.MethodReference.ArgumentCodeGenerator; import org.springframework.aot.test.generate.TestGenerationContext; import org.springframework.aot.test.generate.TestTarget; -import org.springframework.aot.test.generate.compile.Compiled; -import org.springframework.aot.test.generate.compile.TestCompiler; -import org.springframework.aot.test.generate.file.SourceFile; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.support.RegisteredBean; import org.springframework.beans.factory.support.RootBeanDefinition; import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.beans.testfixture.beans.factory.aot.MockBeanFactoryInitializationCode; import org.springframework.core.mock.MockSpringFactoriesLoader; +import org.springframework.core.test.tools.Compiled; +import org.springframework.core.test.tools.SourceFile; +import org.springframework.core.test.tools.TestCompiler; import org.springframework.javapoet.CodeBlock; import org.springframework.javapoet.MethodSpec; import org.springframework.javapoet.ParameterizedTypeName; diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/aot/InstanceSupplierCodeGeneratorTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/aot/InstanceSupplierCodeGeneratorTests.java index e6c555020ea..b18bc015f35 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/aot/InstanceSupplierCodeGeneratorTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/aot/InstanceSupplierCodeGeneratorTests.java @@ -31,8 +31,6 @@ import org.springframework.aot.hint.ExecutableMode; import org.springframework.aot.hint.ReflectionHints; import org.springframework.aot.hint.TypeHint; import org.springframework.aot.test.generate.TestGenerationContext; -import org.springframework.aot.test.generate.compile.Compiled; -import org.springframework.aot.test.generate.compile.TestCompiler; import org.springframework.beans.factory.config.BeanDefinition; import org.springframework.beans.factory.support.BeanDefinitionBuilder; import org.springframework.beans.factory.support.DefaultListableBeanFactory; @@ -51,6 +49,8 @@ import org.springframework.beans.testfixture.beans.factory.generator.factory.Num import org.springframework.beans.testfixture.beans.factory.generator.factory.SampleFactory; import org.springframework.beans.testfixture.beans.factory.generator.injection.InjectionComponent; import org.springframework.core.env.StandardEnvironment; +import org.springframework.core.test.tools.Compiled; +import org.springframework.core.test.tools.TestCompiler; import org.springframework.javapoet.CodeBlock; import org.springframework.javapoet.MethodSpec; import org.springframework.javapoet.ParameterizedTypeName; diff --git a/spring-context/src/test/java/org/springframework/context/annotation/ConfigurationClassPostProcessorAotContributionTests.java b/spring-context/src/test/java/org/springframework/context/annotation/ConfigurationClassPostProcessorAotContributionTests.java index 1c772b61541..38bb25c051d 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/ConfigurationClassPostProcessorAotContributionTests.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/ConfigurationClassPostProcessorAotContributionTests.java @@ -31,8 +31,6 @@ import org.springframework.aot.generate.MethodReference; import org.springframework.aot.generate.MethodReference.ArgumentCodeGenerator; import org.springframework.aot.hint.ResourcePatternHint; import org.springframework.aot.test.generate.TestGenerationContext; -import org.springframework.aot.test.generate.compile.Compiled; -import org.springframework.aot.test.generate.compile.TestCompiler; import org.springframework.beans.BeansException; import org.springframework.beans.factory.InitializingBean; import org.springframework.beans.factory.aot.BeanFactoryInitializationAotContribution; @@ -49,6 +47,8 @@ import org.springframework.context.testfixture.context.generator.annotation.Impo import org.springframework.core.Ordered; import org.springframework.core.env.ConfigurableEnvironment; import org.springframework.core.io.ResourceLoader; +import org.springframework.core.test.tools.Compiled; +import org.springframework.core.test.tools.TestCompiler; import org.springframework.core.type.AnnotationMetadata; import org.springframework.javapoet.CodeBlock; import org.springframework.javapoet.MethodSpec; diff --git a/spring-context/src/test/java/org/springframework/context/aot/ApplicationContextAotGeneratorTests.java b/spring-context/src/test/java/org/springframework/context/aot/ApplicationContextAotGeneratorTests.java index 22e84a63cc4..a41db3d0449 100644 --- a/spring-context/src/test/java/org/springframework/context/aot/ApplicationContextAotGeneratorTests.java +++ b/spring-context/src/test/java/org/springframework/context/aot/ApplicationContextAotGeneratorTests.java @@ -32,8 +32,6 @@ import org.springframework.aot.hint.RuntimeHints; import org.springframework.aot.hint.TypeReference; import org.springframework.aot.hint.predicate.RuntimeHintsPredicates; import org.springframework.aot.test.generate.TestGenerationContext; -import org.springframework.aot.test.generate.compile.Compiled; -import org.springframework.aot.test.generate.compile.TestCompiler; import org.springframework.beans.BeansException; import org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor; import org.springframework.beans.factory.aot.BeanFactoryInitializationAotContribution; @@ -66,6 +64,8 @@ import org.springframework.core.env.ConfigurableEnvironment; import org.springframework.core.env.Environment; import org.springframework.core.env.PropertySource; import org.springframework.core.io.ResourceLoader; +import org.springframework.core.test.tools.Compiled; +import org.springframework.core.test.tools.TestCompiler; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-context/src/test/java/org/springframework/context/generator/ApplicationContextAotGeneratorRuntimeHintsTests.java b/spring-context/src/test/java/org/springframework/context/generator/ApplicationContextAotGeneratorRuntimeHintsTests.java index 7e0f274f910..6c5eec06913 100644 --- a/spring-context/src/test/java/org/springframework/context/generator/ApplicationContextAotGeneratorRuntimeHintsTests.java +++ b/spring-context/src/test/java/org/springframework/context/generator/ApplicationContextAotGeneratorRuntimeHintsTests.java @@ -25,7 +25,6 @@ import org.springframework.aot.test.agent.EnabledIfRuntimeHintsAgent; import org.springframework.aot.test.agent.RuntimeHintsInvocations; import org.springframework.aot.test.agent.RuntimeHintsRecorder; import org.springframework.aot.test.generate.TestGenerationContext; -import org.springframework.aot.test.generate.compile.TestCompiler; import org.springframework.beans.factory.support.BeanDefinitionBuilder; import org.springframework.beans.factory.support.RootBeanDefinition; import org.springframework.context.ApplicationContextInitializer; @@ -35,6 +34,7 @@ import org.springframework.context.support.GenericApplicationContext; import org.springframework.context.testfixture.context.generator.SimpleComponent; import org.springframework.context.testfixture.context.generator.annotation.AutowiredComponent; import org.springframework.context.testfixture.context.generator.annotation.InitDestroyComponent; +import org.springframework.core.test.tools.TestCompiler; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-core-test/src/main/java/org/springframework/aot/test/generate/file/package-info.java b/spring-core-test/src/main/java/org/springframework/aot/test/generate/file/package-info.java deleted file mode 100644 index 02e9edfe63a..00000000000 --- a/spring-core-test/src/main/java/org/springframework/aot/test/generate/file/package-info.java +++ /dev/null @@ -1,9 +0,0 @@ -/** - * Support classes for running assertions on generated files. - */ -@NonNullApi -@NonNullFields -package org.springframework.aot.test.generate.file; - -import org.springframework.lang.NonNullApi; -import org.springframework.lang.NonNullFields; diff --git a/spring-core-test/src/main/java/org/springframework/aot/test/generate/file/ClassFile.java b/spring-core-test/src/main/java/org/springframework/core/test/tools/ClassFile.java similarity index 98% rename from spring-core-test/src/main/java/org/springframework/aot/test/generate/file/ClassFile.java rename to spring-core-test/src/main/java/org/springframework/core/test/tools/ClassFile.java index f3b680bf7dd..67fd32a6cac 100644 --- a/spring-core-test/src/main/java/org/springframework/aot/test/generate/file/ClassFile.java +++ b/spring-core-test/src/main/java/org/springframework/core/test/tools/ClassFile.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.aot.test.generate.file; +package org.springframework.core.test.tools; import java.io.IOException; diff --git a/spring-core-test/src/main/java/org/springframework/aot/test/generate/file/ClassFiles.java b/spring-core-test/src/main/java/org/springframework/core/test/tools/ClassFiles.java similarity index 98% rename from spring-core-test/src/main/java/org/springframework/aot/test/generate/file/ClassFiles.java rename to spring-core-test/src/main/java/org/springframework/core/test/tools/ClassFiles.java index c17759c87ec..28f1bd6538f 100644 --- a/spring-core-test/src/main/java/org/springframework/aot/test/generate/file/ClassFiles.java +++ b/spring-core-test/src/main/java/org/springframework/core/test/tools/ClassFiles.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.aot.test.generate.file; +package org.springframework.core.test.tools; import java.util.Arrays; import java.util.Collections; diff --git a/spring-core-test/src/main/java/org/springframework/aot/test/generate/compile/CompilationException.java b/spring-core-test/src/main/java/org/springframework/core/test/tools/CompilationException.java similarity index 84% rename from spring-core-test/src/main/java/org/springframework/aot/test/generate/compile/CompilationException.java rename to spring-core-test/src/main/java/org/springframework/core/test/tools/CompilationException.java index 5ddf615fad5..1bbc7bf9c01 100644 --- a/spring-core-test/src/main/java/org/springframework/aot/test/generate/compile/CompilationException.java +++ b/spring-core-test/src/main/java/org/springframework/core/test/tools/CompilationException.java @@ -14,12 +14,7 @@ * limitations under the License. */ -package org.springframework.aot.test.generate.compile; - -import org.springframework.aot.test.generate.file.ResourceFile; -import org.springframework.aot.test.generate.file.ResourceFiles; -import org.springframework.aot.test.generate.file.SourceFile; -import org.springframework.aot.test.generate.file.SourceFiles; +package org.springframework.core.test.tools; /** * Exception thrown when code cannot compile. diff --git a/spring-core-test/src/main/java/org/springframework/aot/test/generate/compile/CompileWithForkedClassLoader.java b/spring-core-test/src/main/java/org/springframework/core/test/tools/CompileWithForkedClassLoader.java similarity index 96% rename from spring-core-test/src/main/java/org/springframework/aot/test/generate/compile/CompileWithForkedClassLoader.java rename to spring-core-test/src/main/java/org/springframework/core/test/tools/CompileWithForkedClassLoader.java index 630f0ee291a..35307a2716a 100644 --- a/spring-core-test/src/main/java/org/springframework/aot/test/generate/compile/CompileWithForkedClassLoader.java +++ b/spring-core-test/src/main/java/org/springframework/core/test/tools/CompileWithForkedClassLoader.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.aot.test.generate.compile; +package org.springframework.core.test.tools; import java.lang.annotation.Documented; import java.lang.annotation.ElementType; diff --git a/spring-core-test/src/main/java/org/springframework/aot/test/generate/compile/CompileWithForkedClassLoaderClassLoader.java b/spring-core-test/src/main/java/org/springframework/core/test/tools/CompileWithForkedClassLoaderClassLoader.java similarity index 98% rename from spring-core-test/src/main/java/org/springframework/aot/test/generate/compile/CompileWithForkedClassLoaderClassLoader.java rename to spring-core-test/src/main/java/org/springframework/core/test/tools/CompileWithForkedClassLoaderClassLoader.java index d755979da88..3ff0513a8ca 100644 --- a/spring-core-test/src/main/java/org/springframework/aot/test/generate/compile/CompileWithForkedClassLoaderClassLoader.java +++ b/spring-core-test/src/main/java/org/springframework/core/test/tools/CompileWithForkedClassLoaderClassLoader.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.aot.test.generate.compile; +package org.springframework.core.test.tools; import java.io.IOException; import java.io.InputStream; diff --git a/spring-core-test/src/main/java/org/springframework/aot/test/generate/compile/CompileWithForkedClassLoaderExtension.java b/spring-core-test/src/main/java/org/springframework/core/test/tools/CompileWithForkedClassLoaderExtension.java similarity index 98% rename from spring-core-test/src/main/java/org/springframework/aot/test/generate/compile/CompileWithForkedClassLoaderExtension.java rename to spring-core-test/src/main/java/org/springframework/core/test/tools/CompileWithForkedClassLoaderExtension.java index 91d9fea7b5e..27027b14e5a 100644 --- a/spring-core-test/src/main/java/org/springframework/aot/test/generate/compile/CompileWithForkedClassLoaderExtension.java +++ b/spring-core-test/src/main/java/org/springframework/core/test/tools/CompileWithForkedClassLoaderExtension.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.aot.test.generate.compile; +package org.springframework.core.test.tools; import java.lang.reflect.Method; diff --git a/spring-core-test/src/main/java/org/springframework/aot/test/generate/compile/Compiled.java b/spring-core-test/src/main/java/org/springframework/core/test/tools/Compiled.java similarity index 94% rename from spring-core-test/src/main/java/org/springframework/aot/test/generate/compile/Compiled.java rename to spring-core-test/src/main/java/org/springframework/core/test/tools/Compiled.java index c1b692691f6..a42a82b7698 100644 --- a/spring-core-test/src/main/java/org/springframework/aot/test/generate/compile/Compiled.java +++ b/spring-core-test/src/main/java/org/springframework/core/test/tools/Compiled.java @@ -14,17 +14,13 @@ * limitations under the License. */ -package org.springframework.aot.test.generate.compile; +package org.springframework.core.test.tools; import java.lang.reflect.Constructor; import java.util.ArrayList; import java.util.Collections; import java.util.List; -import org.springframework.aot.test.generate.file.ResourceFile; -import org.springframework.aot.test.generate.file.ResourceFiles; -import org.springframework.aot.test.generate.file.SourceFile; -import org.springframework.aot.test.generate.file.SourceFiles; import org.springframework.lang.Nullable; import org.springframework.util.Assert; diff --git a/spring-core-test/src/main/java/org/springframework/aot/test/generate/compile/DynamicClassFileObject.java b/spring-core-test/src/main/java/org/springframework/core/test/tools/DynamicClassFileObject.java similarity index 97% rename from spring-core-test/src/main/java/org/springframework/aot/test/generate/compile/DynamicClassFileObject.java rename to spring-core-test/src/main/java/org/springframework/core/test/tools/DynamicClassFileObject.java index 92bfb365338..6640ed72746 100644 --- a/spring-core-test/src/main/java/org/springframework/aot/test/generate/compile/DynamicClassFileObject.java +++ b/spring-core-test/src/main/java/org/springframework/core/test/tools/DynamicClassFileObject.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.aot.test.generate.compile; +package org.springframework.core.test.tools; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; diff --git a/spring-core-test/src/main/java/org/springframework/aot/test/generate/compile/DynamicClassLoader.java b/spring-core-test/src/main/java/org/springframework/core/test/tools/DynamicClassLoader.java similarity index 95% rename from spring-core-test/src/main/java/org/springframework/aot/test/generate/compile/DynamicClassLoader.java rename to spring-core-test/src/main/java/org/springframework/core/test/tools/DynamicClassLoader.java index ff6bc1a8c65..15109ebf597 100644 --- a/spring-core-test/src/main/java/org/springframework/aot/test/generate/compile/DynamicClassLoader.java +++ b/spring-core-test/src/main/java/org/springframework/core/test/tools/DynamicClassLoader.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.aot.test.generate.compile; +package org.springframework.core.test.tools; import java.io.ByteArrayInputStream; import java.io.IOException; @@ -29,10 +29,6 @@ import java.util.Map; import java.util.function.Function; import java.util.function.Supplier; -import org.springframework.aot.test.generate.file.ClassFile; -import org.springframework.aot.test.generate.file.ClassFiles; -import org.springframework.aot.test.generate.file.ResourceFile; -import org.springframework.aot.test.generate.file.ResourceFiles; import org.springframework.lang.Nullable; import org.springframework.util.ReflectionUtils; diff --git a/spring-core-test/src/main/java/org/springframework/aot/test/generate/file/DynamicFile.java b/spring-core-test/src/main/java/org/springframework/core/test/tools/DynamicFile.java similarity index 97% rename from spring-core-test/src/main/java/org/springframework/aot/test/generate/file/DynamicFile.java rename to spring-core-test/src/main/java/org/springframework/core/test/tools/DynamicFile.java index 14681acadd6..c64a1e1675b 100644 --- a/spring-core-test/src/main/java/org/springframework/aot/test/generate/file/DynamicFile.java +++ b/spring-core-test/src/main/java/org/springframework/core/test/tools/DynamicFile.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.aot.test.generate.file; +package org.springframework.core.test.tools; import java.io.IOException; import java.nio.charset.StandardCharsets; diff --git a/spring-core-test/src/main/java/org/springframework/aot/test/generate/file/DynamicFileAssert.java b/spring-core-test/src/main/java/org/springframework/core/test/tools/DynamicFileAssert.java similarity index 97% rename from spring-core-test/src/main/java/org/springframework/aot/test/generate/file/DynamicFileAssert.java rename to spring-core-test/src/main/java/org/springframework/core/test/tools/DynamicFileAssert.java index ecb86800dd8..24fce586249 100644 --- a/spring-core-test/src/main/java/org/springframework/aot/test/generate/file/DynamicFileAssert.java +++ b/spring-core-test/src/main/java/org/springframework/core/test/tools/DynamicFileAssert.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.aot.test.generate.file; +package org.springframework.core.test.tools; import org.assertj.core.api.AbstractAssert; diff --git a/spring-core-test/src/main/java/org/springframework/aot/test/generate/file/DynamicFiles.java b/spring-core-test/src/main/java/org/springframework/core/test/tools/DynamicFiles.java similarity index 98% rename from spring-core-test/src/main/java/org/springframework/aot/test/generate/file/DynamicFiles.java rename to spring-core-test/src/main/java/org/springframework/core/test/tools/DynamicFiles.java index 92cc7273115..01359ec16c9 100644 --- a/spring-core-test/src/main/java/org/springframework/aot/test/generate/file/DynamicFiles.java +++ b/spring-core-test/src/main/java/org/springframework/core/test/tools/DynamicFiles.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.aot.test.generate.file; +package org.springframework.core.test.tools; import java.util.Arrays; import java.util.Collections; diff --git a/spring-core-test/src/main/java/org/springframework/aot/test/generate/compile/DynamicJavaFileManager.java b/spring-core-test/src/main/java/org/springframework/core/test/tools/DynamicJavaFileManager.java similarity index 93% rename from spring-core-test/src/main/java/org/springframework/aot/test/generate/compile/DynamicJavaFileManager.java rename to spring-core-test/src/main/java/org/springframework/core/test/tools/DynamicJavaFileManager.java index 228ec53adc9..e5780b4c70a 100644 --- a/spring-core-test/src/main/java/org/springframework/aot/test/generate/compile/DynamicJavaFileManager.java +++ b/spring-core-test/src/main/java/org/springframework/core/test/tools/DynamicJavaFileManager.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.aot.test.generate.compile; +package org.springframework.core.test.tools; import java.io.IOException; import java.util.ArrayList; @@ -30,10 +30,6 @@ import javax.tools.JavaFileManager; import javax.tools.JavaFileObject; import javax.tools.JavaFileObject.Kind; -import org.springframework.aot.test.generate.file.ClassFile; -import org.springframework.aot.test.generate.file.ClassFiles; -import org.springframework.aot.test.generate.file.ResourceFile; -import org.springframework.aot.test.generate.file.ResourceFiles; import org.springframework.util.ClassUtils; /** diff --git a/spring-core-test/src/main/java/org/springframework/aot/test/generate/compile/DynamicJavaFileObject.java b/spring-core-test/src/main/java/org/springframework/core/test/tools/DynamicJavaFileObject.java similarity index 91% rename from spring-core-test/src/main/java/org/springframework/aot/test/generate/compile/DynamicJavaFileObject.java rename to spring-core-test/src/main/java/org/springframework/core/test/tools/DynamicJavaFileObject.java index 86f1b970844..f6cd2a66e0b 100644 --- a/spring-core-test/src/main/java/org/springframework/aot/test/generate/compile/DynamicJavaFileObject.java +++ b/spring-core-test/src/main/java/org/springframework/core/test/tools/DynamicJavaFileObject.java @@ -14,15 +14,13 @@ * limitations under the License. */ -package org.springframework.aot.test.generate.compile; +package org.springframework.core.test.tools; import java.net.URI; import javax.tools.JavaFileObject; import javax.tools.SimpleJavaFileObject; -import org.springframework.aot.test.generate.file.SourceFile; - /** * Adapts a {@link SourceFile} instance to a {@link JavaFileObject}. * diff --git a/spring-core-test/src/main/java/org/springframework/aot/test/generate/compile/DynamicResourceFileObject.java b/spring-core-test/src/main/java/org/springframework/core/test/tools/DynamicResourceFileObject.java similarity index 97% rename from spring-core-test/src/main/java/org/springframework/aot/test/generate/compile/DynamicResourceFileObject.java rename to spring-core-test/src/main/java/org/springframework/core/test/tools/DynamicResourceFileObject.java index e8de4da4a2b..dcebb24e870 100644 --- a/spring-core-test/src/main/java/org/springframework/aot/test/generate/compile/DynamicResourceFileObject.java +++ b/spring-core-test/src/main/java/org/springframework/core/test/tools/DynamicResourceFileObject.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.aot.test.generate.compile; +package org.springframework.core.test.tools; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; diff --git a/spring-core-test/src/main/java/org/springframework/aot/test/generate/file/ResourceFile.java b/spring-core-test/src/main/java/org/springframework/core/test/tools/ResourceFile.java similarity index 98% rename from spring-core-test/src/main/java/org/springframework/aot/test/generate/file/ResourceFile.java rename to spring-core-test/src/main/java/org/springframework/core/test/tools/ResourceFile.java index 4d4b50aad89..954587a257c 100644 --- a/spring-core-test/src/main/java/org/springframework/aot/test/generate/file/ResourceFile.java +++ b/spring-core-test/src/main/java/org/springframework/core/test/tools/ResourceFile.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.aot.test.generate.file; +package org.springframework.core.test.tools; import java.io.InputStreamReader; import java.nio.charset.StandardCharsets; diff --git a/spring-core-test/src/main/java/org/springframework/aot/test/generate/file/ResourceFileAssert.java b/spring-core-test/src/main/java/org/springframework/core/test/tools/ResourceFileAssert.java similarity index 94% rename from spring-core-test/src/main/java/org/springframework/aot/test/generate/file/ResourceFileAssert.java rename to spring-core-test/src/main/java/org/springframework/core/test/tools/ResourceFileAssert.java index 4534f5187a6..305a566c51b 100644 --- a/spring-core-test/src/main/java/org/springframework/aot/test/generate/file/ResourceFileAssert.java +++ b/spring-core-test/src/main/java/org/springframework/core/test/tools/ResourceFileAssert.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.aot.test.generate.file; +package org.springframework.core.test.tools; /** * Assertion methods for {@code ResourceFile} instances. diff --git a/spring-core-test/src/main/java/org/springframework/aot/test/generate/file/ResourceFiles.java b/spring-core-test/src/main/java/org/springframework/core/test/tools/ResourceFiles.java similarity index 98% rename from spring-core-test/src/main/java/org/springframework/aot/test/generate/file/ResourceFiles.java rename to spring-core-test/src/main/java/org/springframework/core/test/tools/ResourceFiles.java index 772524c62dd..8805b9ab921 100644 --- a/spring-core-test/src/main/java/org/springframework/aot/test/generate/file/ResourceFiles.java +++ b/spring-core-test/src/main/java/org/springframework/core/test/tools/ResourceFiles.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.aot.test.generate.file; +package org.springframework.core.test.tools; import java.util.Iterator; import java.util.stream.Stream; diff --git a/spring-core-test/src/main/java/org/springframework/aot/test/generate/file/SourceFile.java b/spring-core-test/src/main/java/org/springframework/core/test/tools/SourceFile.java similarity index 99% rename from spring-core-test/src/main/java/org/springframework/aot/test/generate/file/SourceFile.java rename to spring-core-test/src/main/java/org/springframework/core/test/tools/SourceFile.java index e9d7dd0f3a4..ca0848d3a4c 100644 --- a/spring-core-test/src/main/java/org/springframework/aot/test/generate/file/SourceFile.java +++ b/spring-core-test/src/main/java/org/springframework/core/test/tools/SourceFile.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.aot.test.generate.file; +package org.springframework.core.test.tools; import java.io.File; import java.io.FileInputStream; diff --git a/spring-core-test/src/main/java/org/springframework/aot/test/generate/file/SourceFileAssert.java b/spring-core-test/src/main/java/org/springframework/core/test/tools/SourceFileAssert.java similarity index 94% rename from spring-core-test/src/main/java/org/springframework/aot/test/generate/file/SourceFileAssert.java rename to spring-core-test/src/main/java/org/springframework/core/test/tools/SourceFileAssert.java index b991c72a595..4778ac4dd9c 100644 --- a/spring-core-test/src/main/java/org/springframework/aot/test/generate/file/SourceFileAssert.java +++ b/spring-core-test/src/main/java/org/springframework/core/test/tools/SourceFileAssert.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.aot.test.generate.file; +package org.springframework.core.test.tools; /** * Assertion methods for {@code SourceFile} instances. diff --git a/spring-core-test/src/main/java/org/springframework/aot/test/generate/file/SourceFiles.java b/spring-core-test/src/main/java/org/springframework/core/test/tools/SourceFiles.java similarity index 98% rename from spring-core-test/src/main/java/org/springframework/aot/test/generate/file/SourceFiles.java rename to spring-core-test/src/main/java/org/springframework/core/test/tools/SourceFiles.java index 5aeb8ce0303..15b428fcd56 100644 --- a/spring-core-test/src/main/java/org/springframework/aot/test/generate/file/SourceFiles.java +++ b/spring-core-test/src/main/java/org/springframework/core/test/tools/SourceFiles.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.aot.test.generate.file; +package org.springframework.core.test.tools; import java.util.Iterator; import java.util.Objects; diff --git a/spring-core-test/src/main/java/org/springframework/aot/test/generate/compile/TestCompiler.java b/spring-core-test/src/main/java/org/springframework/core/test/tools/TestCompiler.java similarity index 96% rename from spring-core-test/src/main/java/org/springframework/aot/test/generate/compile/TestCompiler.java rename to spring-core-test/src/main/java/org/springframework/core/test/tools/TestCompiler.java index 44720df328b..5d45c6ab5ab 100644 --- a/spring-core-test/src/main/java/org/springframework/aot/test/generate/compile/TestCompiler.java +++ b/spring-core-test/src/main/java/org/springframework/core/test/tools/TestCompiler.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.aot.test.generate.compile; +package org.springframework.core.test.tools; import java.io.PrintStream; import java.util.ArrayList; @@ -35,13 +35,6 @@ import javax.tools.ToolProvider; import org.springframework.aot.generate.GeneratedFiles.Kind; import org.springframework.aot.generate.InMemoryGeneratedFiles; -import org.springframework.aot.test.generate.file.ClassFile; -import org.springframework.aot.test.generate.file.ClassFiles; -import org.springframework.aot.test.generate.file.ResourceFile; -import org.springframework.aot.test.generate.file.ResourceFiles; -import org.springframework.aot.test.generate.file.SourceFile; -import org.springframework.aot.test.generate.file.SourceFiles; -import org.springframework.aot.test.generate.file.WritableContent; import org.springframework.lang.Nullable; /** diff --git a/spring-core-test/src/main/java/org/springframework/aot/test/generate/file/WritableContent.java b/spring-core-test/src/main/java/org/springframework/core/test/tools/WritableContent.java similarity index 95% rename from spring-core-test/src/main/java/org/springframework/aot/test/generate/file/WritableContent.java rename to spring-core-test/src/main/java/org/springframework/core/test/tools/WritableContent.java index a2b538815bf..877fa19159e 100644 --- a/spring-core-test/src/main/java/org/springframework/aot/test/generate/file/WritableContent.java +++ b/spring-core-test/src/main/java/org/springframework/core/test/tools/WritableContent.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.aot.test.generate.file; +package org.springframework.core.test.tools; import java.io.IOException; diff --git a/spring-core-test/src/main/java/org/springframework/aot/test/generate/compile/package-info.java b/spring-core-test/src/main/java/org/springframework/core/test/tools/package-info.java similarity index 77% rename from spring-core-test/src/main/java/org/springframework/aot/test/generate/compile/package-info.java rename to spring-core-test/src/main/java/org/springframework/core/test/tools/package-info.java index 08968b64cd2..a541c066c4c 100644 --- a/spring-core-test/src/main/java/org/springframework/aot/test/generate/compile/package-info.java +++ b/spring-core-test/src/main/java/org/springframework/core/test/tools/package-info.java @@ -3,7 +3,7 @@ */ @NonNullApi @NonNullFields -package org.springframework.aot.test.generate.compile; +package org.springframework.core.test.tools; import org.springframework.lang.NonNullApi; import org.springframework.lang.NonNullFields; diff --git a/spring-core-test/src/test/java/org/springframework/aot/test/generate/file/ClassFileTests.java b/spring-core-test/src/test/java/org/springframework/core/test/tools/ClassFileTests.java similarity index 97% rename from spring-core-test/src/test/java/org/springframework/aot/test/generate/file/ClassFileTests.java rename to spring-core-test/src/test/java/org/springframework/core/test/tools/ClassFileTests.java index cb18a4330e7..353c9dbdae5 100644 --- a/spring-core-test/src/test/java/org/springframework/aot/test/generate/file/ClassFileTests.java +++ b/spring-core-test/src/test/java/org/springframework/core/test/tools/ClassFileTests.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.aot.test.generate.file; +package org.springframework.core.test.tools; import org.junit.jupiter.api.Test; diff --git a/spring-core-test/src/test/java/org/springframework/aot/test/generate/file/ClassFilesTests.java b/spring-core-test/src/test/java/org/springframework/core/test/tools/ClassFilesTests.java similarity index 98% rename from spring-core-test/src/test/java/org/springframework/aot/test/generate/file/ClassFilesTests.java rename to spring-core-test/src/test/java/org/springframework/core/test/tools/ClassFilesTests.java index fd46e2602e3..c43522bf066 100644 --- a/spring-core-test/src/test/java/org/springframework/aot/test/generate/file/ClassFilesTests.java +++ b/spring-core-test/src/test/java/org/springframework/core/test/tools/ClassFilesTests.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.aot.test.generate.file; +package org.springframework.core.test.tools; import java.util.Iterator; diff --git a/spring-core-test/src/test/java/org/springframework/aot/test/generate/compile/CompilationExceptionTests.java b/spring-core-test/src/test/java/org/springframework/core/test/tools/CompilationExceptionTests.java similarity index 85% rename from spring-core-test/src/test/java/org/springframework/aot/test/generate/compile/CompilationExceptionTests.java rename to spring-core-test/src/test/java/org/springframework/core/test/tools/CompilationExceptionTests.java index 6ed7209ed69..724da13bed3 100644 --- a/spring-core-test/src/test/java/org/springframework/aot/test/generate/compile/CompilationExceptionTests.java +++ b/spring-core-test/src/test/java/org/springframework/core/test/tools/CompilationExceptionTests.java @@ -14,16 +14,12 @@ * limitations under the License. */ -package org.springframework.aot.test.generate.compile; +package org.springframework.core.test.tools; import org.junit.jupiter.api.Test; -import org.springframework.aot.test.generate.file.ResourceFiles; -import org.springframework.aot.test.generate.file.SourceFiles; - import static org.assertj.core.api.Assertions.assertThat; - /** * Tests for {@link CompilationException}. * diff --git a/spring-core-test/src/test/java/org/springframework/aot/test/generate/compile/CompiledTests.java b/spring-core-test/src/test/java/org/springframework/core/test/tools/CompiledTests.java similarity index 94% rename from spring-core-test/src/test/java/org/springframework/aot/test/generate/compile/CompiledTests.java rename to spring-core-test/src/test/java/org/springframework/core/test/tools/CompiledTests.java index 59d85e2346b..25daa6bb43d 100644 --- a/spring-core-test/src/test/java/org/springframework/aot/test/generate/compile/CompiledTests.java +++ b/spring-core-test/src/test/java/org/springframework/core/test/tools/CompiledTests.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.aot.test.generate.compile; +package org.springframework.core.test.tools; import java.util.List; import java.util.concurrent.Callable; @@ -22,11 +22,6 @@ import java.util.function.Supplier; import org.junit.jupiter.api.Test; -import org.springframework.aot.test.generate.file.ResourceFile; -import org.springframework.aot.test.generate.file.ResourceFiles; -import org.springframework.aot.test.generate.file.SourceFile; -import org.springframework.aot.test.generate.file.SourceFiles; - import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatIllegalStateException; diff --git a/spring-core-test/src/test/java/org/springframework/aot/test/generate/compile/DynamicClassFileObjectTests.java b/spring-core-test/src/test/java/org/springframework/core/test/tools/DynamicClassFileObjectTests.java similarity index 96% rename from spring-core-test/src/test/java/org/springframework/aot/test/generate/compile/DynamicClassFileObjectTests.java rename to spring-core-test/src/test/java/org/springframework/core/test/tools/DynamicClassFileObjectTests.java index 7c9bb6edb20..8b6c464a2a0 100644 --- a/spring-core-test/src/test/java/org/springframework/aot/test/generate/compile/DynamicClassFileObjectTests.java +++ b/spring-core-test/src/test/java/org/springframework/core/test/tools/DynamicClassFileObjectTests.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.aot.test.generate.compile; +package org.springframework.core.test.tools; import java.io.ByteArrayInputStream; import java.io.OutputStream; diff --git a/spring-core-test/src/test/java/org/springframework/aot/test/generate/compile/DynamicJavaFileManagerTests.java b/spring-core-test/src/test/java/org/springframework/core/test/tools/DynamicJavaFileManagerTests.java similarity index 95% rename from spring-core-test/src/test/java/org/springframework/aot/test/generate/compile/DynamicJavaFileManagerTests.java rename to spring-core-test/src/test/java/org/springframework/core/test/tools/DynamicJavaFileManagerTests.java index b0d1a013576..5f6e2442586 100644 --- a/spring-core-test/src/test/java/org/springframework/aot/test/generate/compile/DynamicJavaFileManagerTests.java +++ b/spring-core-test/src/test/java/org/springframework/core/test/tools/DynamicJavaFileManagerTests.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.aot.test.generate.compile; +package org.springframework.core.test.tools; import java.io.IOException; import java.io.OutputStream; @@ -31,10 +31,6 @@ import org.junit.jupiter.api.Test; import org.mockito.Mock; import org.mockito.MockitoAnnotations; -import org.springframework.aot.test.generate.file.ClassFile; -import org.springframework.aot.test.generate.file.ClassFiles; -import org.springframework.aot.test.generate.file.ResourceFile; -import org.springframework.aot.test.generate.file.ResourceFiles; import org.springframework.util.StreamUtils; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-core-test/src/test/java/org/springframework/aot/test/generate/compile/DynamicJavaFileObjectTests.java b/spring-core-test/src/test/java/org/springframework/core/test/tools/DynamicJavaFileObjectTests.java similarity index 91% rename from spring-core-test/src/test/java/org/springframework/aot/test/generate/compile/DynamicJavaFileObjectTests.java rename to spring-core-test/src/test/java/org/springframework/core/test/tools/DynamicJavaFileObjectTests.java index f918f4695da..dbfc72a66ae 100644 --- a/spring-core-test/src/test/java/org/springframework/aot/test/generate/compile/DynamicJavaFileObjectTests.java +++ b/spring-core-test/src/test/java/org/springframework/core/test/tools/DynamicJavaFileObjectTests.java @@ -14,12 +14,10 @@ * limitations under the License. */ -package org.springframework.aot.test.generate.compile; +package org.springframework.core.test.tools; import org.junit.jupiter.api.Test; -import org.springframework.aot.test.generate.file.SourceFile; - import static org.assertj.core.api.Assertions.assertThat; /** diff --git a/spring-core-test/src/test/java/org/springframework/aot/test/generate/compile/DynamicResourceFileObjectTests.java b/spring-core-test/src/test/java/org/springframework/core/test/tools/DynamicResourceFileObjectTests.java similarity index 97% rename from spring-core-test/src/test/java/org/springframework/aot/test/generate/compile/DynamicResourceFileObjectTests.java rename to spring-core-test/src/test/java/org/springframework/core/test/tools/DynamicResourceFileObjectTests.java index 6ab6376b640..2116788f7ed 100644 --- a/spring-core-test/src/test/java/org/springframework/aot/test/generate/compile/DynamicResourceFileObjectTests.java +++ b/spring-core-test/src/test/java/org/springframework/core/test/tools/DynamicResourceFileObjectTests.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.aot.test.generate.compile; +package org.springframework.core.test.tools; import java.io.ByteArrayInputStream; import java.io.InputStream; diff --git a/spring-core-test/src/test/java/org/springframework/aot/test/generate/file/ResourceFileTests.java b/spring-core-test/src/test/java/org/springframework/core/test/tools/ResourceFileTests.java similarity index 96% rename from spring-core-test/src/test/java/org/springframework/aot/test/generate/file/ResourceFileTests.java rename to spring-core-test/src/test/java/org/springframework/core/test/tools/ResourceFileTests.java index 1d66885c4e2..6c96a6201d7 100644 --- a/spring-core-test/src/test/java/org/springframework/aot/test/generate/file/ResourceFileTests.java +++ b/spring-core-test/src/test/java/org/springframework/core/test/tools/ResourceFileTests.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.aot.test.generate.file; +package org.springframework.core.test.tools; import org.junit.jupiter.api.Test; diff --git a/spring-core-test/src/test/java/org/springframework/aot/test/generate/file/ResourceFilesTests.java b/spring-core-test/src/test/java/org/springframework/core/test/tools/ResourceFilesTests.java similarity index 98% rename from spring-core-test/src/test/java/org/springframework/aot/test/generate/file/ResourceFilesTests.java rename to spring-core-test/src/test/java/org/springframework/core/test/tools/ResourceFilesTests.java index 3f434726480..7d98747b602 100644 --- a/spring-core-test/src/test/java/org/springframework/aot/test/generate/file/ResourceFilesTests.java +++ b/spring-core-test/src/test/java/org/springframework/core/test/tools/ResourceFilesTests.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.aot.test.generate.file; +package org.springframework.core.test.tools; import java.util.Iterator; diff --git a/spring-core-test/src/test/java/org/springframework/aot/test/generate/file/SourceFileAssertTests.java b/spring-core-test/src/test/java/org/springframework/core/test/tools/SourceFileAssertTests.java similarity index 97% rename from spring-core-test/src/test/java/org/springframework/aot/test/generate/file/SourceFileAssertTests.java rename to spring-core-test/src/test/java/org/springframework/core/test/tools/SourceFileAssertTests.java index 1096c833434..cfbfb7c08ba 100644 --- a/spring-core-test/src/test/java/org/springframework/aot/test/generate/file/SourceFileAssertTests.java +++ b/spring-core-test/src/test/java/org/springframework/core/test/tools/SourceFileAssertTests.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.aot.test.generate.file; +package org.springframework.core.test.tools; import org.junit.jupiter.api.Test; diff --git a/spring-core-test/src/test/java/org/springframework/aot/test/generate/file/SourceFileTests.java b/spring-core-test/src/test/java/org/springframework/core/test/tools/SourceFileTests.java similarity index 94% rename from spring-core-test/src/test/java/org/springframework/aot/test/generate/file/SourceFileTests.java rename to spring-core-test/src/test/java/org/springframework/core/test/tools/SourceFileTests.java index d2d6d2b0121..62a9e9e734c 100644 --- a/spring-core-test/src/test/java/org/springframework/aot/test/generate/file/SourceFileTests.java +++ b/spring-core-test/src/test/java/org/springframework/core/test/tools/SourceFileTests.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.aot.test.generate.file; +package org.springframework.core.test.tools; import java.io.File; import java.io.IOException; @@ -88,15 +88,15 @@ class SourceFileTests { @Test void forClassWithClassUsesClass() { SourceFile sourceFile = SourceFile.forClass(new File("src/test/java"), SourceFileTests.class); - assertThat(sourceFile.getPath()).isEqualTo("org/springframework/aot/test/generate/file/SourceFileTests.java"); - assertThat(sourceFile.getClassName()).isEqualTo("org.springframework.aot.test.generate.file.SourceFileTests"); + assertThat(sourceFile.getPath()).isEqualTo("org/springframework/core/test/tools/SourceFileTests.java"); + assertThat(sourceFile.getClassName()).isEqualTo("org.springframework.core.test.tools.SourceFileTests"); } @Test void forTestClassWithClassUsesClass() { SourceFile sourceFile = SourceFile.forTestClass(SourceFileTests.class); - assertThat(sourceFile.getPath()).isEqualTo("org/springframework/aot/test/generate/file/SourceFileTests.java"); - assertThat(sourceFile.getClassName()).isEqualTo("org.springframework.aot.test.generate.file.SourceFileTests"); + assertThat(sourceFile.getPath()).isEqualTo("org/springframework/core/test/tools/SourceFileTests.java"); + assertThat(sourceFile.getClassName()).isEqualTo("org.springframework.core.test.tools.SourceFileTests"); } @Test diff --git a/spring-core-test/src/test/java/org/springframework/aot/test/generate/file/SourceFilesTests.java b/spring-core-test/src/test/java/org/springframework/core/test/tools/SourceFilesTests.java similarity index 98% rename from spring-core-test/src/test/java/org/springframework/aot/test/generate/file/SourceFilesTests.java rename to spring-core-test/src/test/java/org/springframework/core/test/tools/SourceFilesTests.java index f83b79a3707..dce77f845c2 100644 --- a/spring-core-test/src/test/java/org/springframework/aot/test/generate/file/SourceFilesTests.java +++ b/spring-core-test/src/test/java/org/springframework/core/test/tools/SourceFilesTests.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.aot.test.generate.file; +package org.springframework.core.test.tools; import java.util.Iterator; diff --git a/spring-core-test/src/test/java/org/springframework/aot/test/generate/compile/TestCompilerTests.java b/spring-core-test/src/test/java/org/springframework/core/test/tools/TestCompilerTests.java similarity index 95% rename from spring-core-test/src/test/java/org/springframework/aot/test/generate/compile/TestCompilerTests.java rename to spring-core-test/src/test/java/org/springframework/core/test/tools/TestCompilerTests.java index 64984ec69cd..e2a97d501c3 100644 --- a/spring-core-test/src/test/java/org/springframework/aot/test/generate/compile/TestCompilerTests.java +++ b/spring-core-test/src/test/java/org/springframework/core/test/tools/TestCompilerTests.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.aot.test.generate.compile; +package org.springframework.core.test.tools; import java.util.ArrayList; import java.util.List; @@ -30,12 +30,6 @@ import javax.lang.model.element.TypeElement; import com.example.PublicInterface; import org.junit.jupiter.api.Test; -import org.springframework.aot.test.generate.file.ClassFile; -import org.springframework.aot.test.generate.file.ResourceFile; -import org.springframework.aot.test.generate.file.ResourceFiles; -import org.springframework.aot.test.generate.file.SourceFile; -import org.springframework.aot.test.generate.file.SourceFiles; -import org.springframework.aot.test.generate.file.WritableContent; import org.springframework.core.io.ClassPathResource; import org.springframework.util.ClassUtils; diff --git a/spring-orm/src/test/java/org/springframework/orm/jpa/persistenceunit/PersistenceManagedTypesBeanRegistrationAotProcessorTests.java b/spring-orm/src/test/java/org/springframework/orm/jpa/persistenceunit/PersistenceManagedTypesBeanRegistrationAotProcessorTests.java index 7c7ab44dd21..ea1893e1e41 100644 --- a/spring-orm/src/test/java/org/springframework/orm/jpa/persistenceunit/PersistenceManagedTypesBeanRegistrationAotProcessorTests.java +++ b/spring-orm/src/test/java/org/springframework/orm/jpa/persistenceunit/PersistenceManagedTypesBeanRegistrationAotProcessorTests.java @@ -27,8 +27,6 @@ import org.springframework.aot.hint.MemberCategory; import org.springframework.aot.hint.RuntimeHints; import org.springframework.aot.hint.predicate.RuntimeHintsPredicates; import org.springframework.aot.test.generate.TestGenerationContext; -import org.springframework.aot.test.generate.compile.Compiled; -import org.springframework.aot.test.generate.compile.TestCompiler; import org.springframework.context.ApplicationContextInitializer; import org.springframework.context.annotation.AnnotationConfigApplicationContext; import org.springframework.context.annotation.Bean; @@ -36,6 +34,8 @@ import org.springframework.context.annotation.Configuration; import org.springframework.context.aot.ApplicationContextAotGenerator; import org.springframework.context.support.GenericApplicationContext; import org.springframework.core.io.ResourceLoader; +import org.springframework.core.test.tools.Compiled; +import org.springframework.core.test.tools.TestCompiler; import org.springframework.orm.jpa.JpaVendorAdapter; import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean; import org.springframework.orm.jpa.domain.DriversLicense; diff --git a/spring-orm/src/test/java/org/springframework/orm/jpa/support/InjectionCodeGeneratorTests.java b/spring-orm/src/test/java/org/springframework/orm/jpa/support/InjectionCodeGeneratorTests.java index f71007d7244..60c41dc4ba8 100644 --- a/spring-orm/src/test/java/org/springframework/orm/jpa/support/InjectionCodeGeneratorTests.java +++ b/spring-orm/src/test/java/org/springframework/orm/jpa/support/InjectionCodeGeneratorTests.java @@ -27,11 +27,11 @@ import org.junit.jupiter.api.Test; import org.springframework.aot.hint.RuntimeHints; import org.springframework.aot.hint.predicate.RuntimeHintsPredicates; -import org.springframework.aot.test.generate.compile.Compiled; -import org.springframework.aot.test.generate.compile.TestCompiler; import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.beans.testfixture.beans.TestBeanWithPrivateMethod; import org.springframework.beans.testfixture.beans.TestBeanWithPublicField; +import org.springframework.core.test.tools.Compiled; +import org.springframework.core.test.tools.TestCompiler; import org.springframework.javapoet.CodeBlock; import org.springframework.javapoet.JavaFile; import org.springframework.javapoet.MethodSpec; diff --git a/spring-orm/src/test/java/org/springframework/orm/jpa/support/PersistenceAnnotationBeanPostProcessorAotContributionTests.java b/spring-orm/src/test/java/org/springframework/orm/jpa/support/PersistenceAnnotationBeanPostProcessorAotContributionTests.java index 96db4669e19..b7c53bd6600 100644 --- a/spring-orm/src/test/java/org/springframework/orm/jpa/support/PersistenceAnnotationBeanPostProcessorAotContributionTests.java +++ b/spring-orm/src/test/java/org/springframework/orm/jpa/support/PersistenceAnnotationBeanPostProcessorAotContributionTests.java @@ -34,14 +34,14 @@ import org.junit.jupiter.api.Test; import org.springframework.aot.hint.TypeReference; import org.springframework.aot.test.generate.TestGenerationContext; -import org.springframework.aot.test.generate.compile.CompileWithForkedClassLoader; -import org.springframework.aot.test.generate.compile.Compiled; -import org.springframework.aot.test.generate.compile.TestCompiler; import org.springframework.beans.factory.aot.BeanRegistrationAotContribution; import org.springframework.beans.factory.aot.BeanRegistrationCode; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.support.RegisteredBean; import org.springframework.beans.factory.support.RootBeanDefinition; +import org.springframework.core.test.tools.CompileWithForkedClassLoader; +import org.springframework.core.test.tools.Compiled; +import org.springframework.core.test.tools.TestCompiler; import org.springframework.util.ReflectionUtils; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-test/src/test/java/org/springframework/test/context/aot/AotIntegrationTests.java b/spring-test/src/test/java/org/springframework/test/context/aot/AotIntegrationTests.java index 5a59a26cdeb..9069231e7ec 100644 --- a/spring-test/src/test/java/org/springframework/test/context/aot/AotIntegrationTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/aot/AotIntegrationTests.java @@ -37,8 +37,8 @@ import org.opentest4j.MultipleFailuresError; import org.springframework.aot.AotDetector; import org.springframework.aot.generate.GeneratedFiles.Kind; import org.springframework.aot.generate.InMemoryGeneratedFiles; -import org.springframework.aot.test.generate.compile.CompileWithForkedClassLoader; -import org.springframework.aot.test.generate.compile.TestCompiler; +import org.springframework.core.test.tools.CompileWithForkedClassLoader; +import org.springframework.core.test.tools.TestCompiler; import org.springframework.test.context.aot.samples.basic.BasicSpringJupiterSharedConfigTests; import org.springframework.test.context.aot.samples.basic.BasicSpringJupiterTests; import org.springframework.test.context.aot.samples.basic.BasicSpringTestNGTests; diff --git a/spring-test/src/test/java/org/springframework/test/context/aot/TestContextAotGeneratorTests.java b/spring-test/src/test/java/org/springframework/test/context/aot/TestContextAotGeneratorTests.java index dd9a86f0f65..3f240444d4c 100644 --- a/spring-test/src/test/java/org/springframework/test/context/aot/TestContextAotGeneratorTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/aot/TestContextAotGeneratorTests.java @@ -33,12 +33,12 @@ import org.springframework.aot.generate.InMemoryGeneratedFiles; import org.springframework.aot.hint.MemberCategory; import org.springframework.aot.hint.RuntimeHints; import org.springframework.aot.hint.TypeReference; -import org.springframework.aot.test.generate.compile.CompileWithForkedClassLoader; -import org.springframework.aot.test.generate.compile.TestCompiler; import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContextInitializer; import org.springframework.context.ConfigurableApplicationContext; import org.springframework.core.env.Profiles; +import org.springframework.core.test.tools.CompileWithForkedClassLoader; +import org.springframework.core.test.tools.TestCompiler; import org.springframework.javapoet.ClassName; import org.springframework.test.context.BootstrapUtils; import org.springframework.test.context.MergedContextConfiguration;