From 5718bf424b353d3bcdf841b528c34a7f1ae829f7 Mon Sep 17 00:00:00 2001 From: Sam Brannen Date: Sat, 28 Dec 2019 11:44:40 +0100 Subject: [PATCH 01/13] Use Gradle test fixture support for spring-core See gh-23550 --- build.gradle | 1 + .../build/testsources/TestSourcesPlugin.java | 27 ++++-- integration-tests/integration-tests.gradle | 1 + ...NamespaceHandlerScopeIntegrationTests.java | 2 +- ...ansactionalAnnotationIntegrationTests.java | 4 +- spring-aop/spring-aop.gradle | 1 + .../annotation/AspectProxyFactoryTests.java | 2 +- .../config/AopNamespaceHandlerEventTests.java | 2 +- ...AopNamespaceHandlerPointcutErrorTests.java | 2 +- .../aop/config/TopLevelAopTagTests.java | 2 +- .../aop/framework/PrototypeTargetTests.java | 2 +- .../aop/framework/ProxyFactoryTests.java | 2 +- .../ConcurrencyThrottleInterceptorTests.java | 2 +- .../ExposeInvocationInterceptorTests.java | 2 +- .../aop/scope/ScopedProxyAutowireTests.java | 2 +- .../AbstractRegexpMethodPointcutTests.java | 2 +- .../aop/support/AopUtilsTests.java | 2 +- ...elegatingIntroductionInterceptorTests.java | 4 +- .../aop/support/MethodMatchersTests.java | 2 +- .../support/NameMatchMethodPointcutTests.java | 2 +- ...MethodPointcutAdvisorIntegrationTests.java | 4 +- .../CommonsPool2TargetSourceProxyTests.java | 2 +- .../target/HotSwappableTargetSourceTests.java | 4 +- .../aop/target/LazyInitTargetSourceTests.java | 2 +- .../PrototypeBasedTargetSourceTests.java | 2 +- .../target/PrototypeTargetSourceTests.java | 2 +- .../target/ThreadLocalTargetSourceTests.java | 2 +- .../dynamic/RefreshableTargetSourceTests.java | 4 +- .../TimestampIntroductionInterceptor.java | 2 +- spring-aspects/spring-aspects.gradle | 1 + .../AnnotationAsyncExecutionAspectTests.java | 4 +- spring-beans/spring-beans.gradle | 1 + .../beans/AbstractPropertyAccessorTests.java | 6 +- .../beans/factory/BeanFactoryUtilsTests.java | 2 +- .../factory/ConcurrentBeanFactoryTests.java | 6 +- .../DefaultListableBeanFactoryTests.java | 8 +- .../beans/factory/FactoryBeanTests.java | 4 +- ...wiredAnnotationBeanPostProcessorTests.java | 2 +- .../CustomAutowireConfigurerTests.java | 2 +- ...njectAnnotationBeanPostProcessorTests.java | 2 +- .../FieldRetrievingFactoryBeanTests.java | 2 +- ...ObjectFactoryCreatingFactoryBeanTests.java | 4 +- .../config/PropertiesFactoryBeanTests.java | 2 +- .../config/PropertyPathFactoryBeanTests.java | 2 +- .../PropertyResourceConfigurerTests.java | 2 +- .../factory/config/SimpleScopeTests.java | 2 +- .../parsing/CustomProblemReporterTests.java | 2 +- .../support/BeanFactoryGenericsTests.java | 4 +- .../context/index/sample/SampleNone.java | 3 +- .../context/index/sample/Scope.java | 33 +++++++ .../spring-context-support.gradle | 1 + .../cache/ehcache/EhCacheCacheTests.java | 4 +- .../scheduling/quartz/QuartzSupportTests.java | 4 +- .../SpringValidatorAdapterTests.java | 2 +- spring-context/spring-context.gradle | 1 + .../AspectJAutoProxyCreatorTests.java | 6 +- .../aop/framework/AbstractAopProxyTests.java | 10 +- .../aop/framework/ProxyFactoryBeanTests.java | 4 +- .../BeanNameAutoProxyCreatorTests.java | 2 +- .../aop/scope/ScopedProxyTests.java | 2 +- .../target/CommonsPool2TargetSourceTests.java | 2 +- .../factory/xml/XmlBeanFactoryTests.java | 2 +- .../AnnotationProcessorPerformanceTests.java | 6 +- ...ommonAnnotationBeanPostProcessorTests.java | 2 +- ...mponentScanAnnotationIntegrationTests.java | 2 +- .../ComponentScanParserScopedProxyTests.java | 2 +- .../ApplicationContextExpressionTests.java | 8 +- .../EnvironmentAccessorIntegrationTests.java | 2 +- .../DefaultLifecycleProcessorTests.java | 4 +- ...onmentSecurityManagerIntegrationTests.java | 5 +- ...ertySourcesPlaceholderConfigurerTests.java | 2 +- .../mock/env/MockEnvironment.java | 1 + .../annotation/EnableSchedulingTests.java | 4 +- .../ScheduledExecutorFactoryBeanTests.java | 4 +- .../ScriptFactoryPostProcessorTests.java | 4 +- .../SpringValidatorAdapterTests.java | 2 +- .../context/support/BeanDefinitionDslTests.kt | 2 +- spring-core/spring-core.gradle | 6 ++ .../type/AspectJTypeFilterTestsTypes.java | 2 +- .../AnnotatedElementUtilsTests.java | 4 +- .../core/annotation/AnnotationUtilsTests.java | 4 +- .../annotation/MergedAnnotationsTests.java | 6 +- .../core/codec/ByteArrayDecoderTests.java | 1 + .../core/codec/ByteArrayEncoderTests.java | 1 + .../core/codec/ByteBufferDecoderTests.java | 1 + .../core/codec/ByteBufferEncoderTests.java | 1 + .../core/codec/CharSequenceEncoderTests.java | 1 + .../core/codec/DataBufferDecoderTests.java | 1 + .../core/codec/DataBufferEncoderTests.java | 1 + .../core/codec/ResourceDecoderTests.java | 1 + .../core/codec/ResourceEncoderTests.java | 1 + .../codec/ResourceRegionEncoderTests.java | 4 +- .../core/codec/StringDecoderTests.java | 1 + .../DefaultConversionServiceTests.java | 4 +- .../GenericConversionServiceTests.java | 4 +- .../core/env/MutablePropertySourcesTests.java | 2 +- .../PropertySourcesPropertyResolverTests.java | 2 +- .../core/env/StandardEnvironmentTests.java | 73 ++------------- .../core/io/buffer/DataBufferTests.java | 2 + .../core/io/buffer/DataBufferUtilsTests.java | 3 +- .../LeakAwareDataBufferFactoryTests.java | 2 + .../support/DataBufferTestUtilsTests.java | 3 +- .../test/fixtures/TestGroupParsingTests.java} | 6 +- .../test/fixtures/TestGroupTests.java} | 39 +++++--- .../core/type/AnnotationMetadataTests.java | 2 +- .../core/type/AnnotationTypeFilterTests.java | 2 +- .../core/type/AspectJTypeFilterTests.java | 6 +- .../type/CachingMetadataReaderLeakTests.java | 4 +- .../org/springframework/core/type/Scope.java | 11 +-- .../org/springframework/tests/Assume.java | 77 ---------------- .../util/AutoPopulatingListTests.java | 1 + .../util/ReflectionUtilsTests.java | 4 +- .../util/SerializationUtilsTests.java | 14 +-- .../util/xml/AbstractStaxHandlerTests.java | 2 +- .../util/xml/DomContentHandlerTests.java | 2 +- .../xml/ListBasedXMLEventReaderTests.java | 2 +- .../util/xml/StaxResultTests.java | 2 +- .../util/xml/StaxSourceTests.java | 2 +- .../util/xml/XMLEventStreamReaderTests.java | 2 +- .../util/xml/XMLEventStreamWriterTests.java | 2 +- .../core/test/fixtures/Assume.java | 46 ++++++++++ .../test/fixtures}/EnabledForTestGroups.java | 2 +- .../core/test/fixtures}/TestGroup.java | 3 +- .../test/fixtures}/TestGroupsCondition.java | 2 +- .../core/test/fixtures}/TimeStamped.java | 2 +- .../fixtures}/codec/AbstractDecoderTests.java | 6 +- .../fixtures}/codec/AbstractEncoderTests.java | 6 +- .../fixtures/env/EnvironmentTestUtils.java | 92 +++++++++++++++++++ .../fixtures}/env/MockPropertySource.java | 2 +- .../test/fixtures/io/ResourceTestUtils.java} | 6 +- .../fixtures/io}/SerializationTestUtils.java | 2 +- .../AbstractDataBufferAllocatingTests.java | 10 +- .../io/buffer/AbstractLeakCheckingTests.java | 5 +- .../io/buffer}/DataBufferTestUtils.java | 2 +- .../io/buffer/LeakAwareDataBuffer.java | 5 +- .../io/buffer/LeakAwareDataBufferFactory.java | 6 +- .../test/fixtures}/stereotype/Component.java | 6 +- .../test/fixtures}/stereotype/Indexed.java | 2 +- .../core/test/fixtures/xml}/XmlContent.java | 4 +- .../test/fixtures/xml}/XmlContentAssert.java | 12 +-- spring-expression/spring-expression.gradle | 1 + .../expression/spel/MapAccessTests.java | 4 +- .../expression/spel/PerformanceTests.java | 4 +- spring-jdbc/spring-jdbc.gradle | 1 + .../config/JdbcNamespaceIntegrationTests.java | 4 +- .../DataSourceTransactionManagerTests.java | 4 +- spring-messaging/spring-messaging.gradle | 3 +- .../messaging/MessageHeadersTests.java | 2 +- .../MarshallingMessageConverterTests.java | 2 +- .../TestEncoderMethodReturnValueHandler.java | 2 +- .../LeakAwareNettyDataBufferFactory.java | 2 +- .../rsocket/MetadataEncoderTests.java | 2 +- .../messaging/rsocket/PayloadUtilsTests.java | 2 +- .../support/MessageHeaderAccessorTests.java | 2 +- spring-orm/spring-orm.gradle | 1 + ...rEntityManagerFactoryIntegrationTests.java | 2 +- ...ontainerEntityManagerFactoryBeanTests.java | 2 +- .../support/PersistenceInjectionTests.java | 2 +- spring-oxm/spring-oxm.gradle | 1 + .../oxm/AbstractMarshallerTests.java | 2 +- .../oxm/jaxb/Jaxb2MarshallerTests.java | 2 +- .../oxm/jibx/JibxMarshallerTests.java | 2 +- .../oxm/xstream/XStreamMarshallerTests.java | 2 +- spring-test/spring-test.gradle | 1 + .../SpringJUnit4ConcurrencyTests.java | 2 +- .../server/HttpHandlerConnectorTests.java | 2 +- .../DelegatingWebConnectionTests.java | 4 +- .../MockMvcWebClientBuilderTests.java | 2 +- .../MockMvcHtmlUnitDriverBuilderTests.java | 2 +- spring-tx/spring-tx.gradle | 1 + ...tationTransactionAttributeSourceTests.java | 2 +- .../config/AnnotationDrivenTests.java | 2 +- ...ransactionAttributeSourceAdvisorTests.java | 2 +- .../TransactionInterceptorTests.java | 2 +- ...aTransactionManagerSerializationTests.java | 2 +- spring-web/spring-web.gradle | 1 + .../codec/CancelWithoutDemandCodecTests.java | 2 +- .../codec/FormHttpMessageReaderTests.java | 2 +- .../codec/FormHttpMessageWriterTests.java | 4 +- ...ServerSentEventHttpMessageReaderTests.java | 2 +- ...ServerSentEventHttpMessageWriterTests.java | 4 +- .../codec/cbor/Jackson2CborDecoderTests.java | 2 +- .../codec/cbor/Jackson2CborEncoderTests.java | 4 +- .../codec/json/Jackson2JsonDecoderTests.java | 2 +- .../codec/json/Jackson2JsonEncoderTests.java | 2 +- .../codec/json/Jackson2SmileDecoderTests.java | 2 +- .../codec/json/Jackson2SmileEncoderTests.java | 4 +- .../codec/json/Jackson2TokenizerTests.java | 2 +- .../MultipartHttpMessageWriterTests.java | 2 +- ...SynchronossPartHttpMessageReaderTests.java | 4 +- .../codec/protobuf/ProtobufDecoderTests.java | 2 +- .../codec/protobuf/ProtobufEncoderTests.java | 2 +- .../http/codec/xml/Jaxb2XmlDecoderTests.java | 2 +- .../http/codec/xml/Jaxb2XmlEncoderTests.java | 4 +- .../http/codec/xml/XmlEventDecoderTests.java | 2 +- .../AtomFeedHttpMessageConverterTests.java | 2 +- .../RssChannelHttpMessageConverterTests.java | 2 +- ...2RootElementHttpMessageConverterTests.java | 2 +- .../xml/SourceHttpMessageConverterTests.java | 2 +- .../reactive/ChannelSendOperatorTests.java | 2 +- .../HttpHeadResponseDecoratorTests.java | 2 +- .../web/bind/ServletRequestUtilsTests.java | 4 +- .../context/request/SessionScopeTests.java | 2 +- spring-webflux/spring-webflux.gradle | 3 +- .../config/ResourceHandlerRegistryTests.java | 2 +- .../reactive/function/BodyInsertersTests.java | 2 +- .../client/ExchangeFilterFunctionsTests.java | 2 +- .../WebClientDataBufferAllocatingTests.java | 2 +- .../resource/ResourceWebHandlerTests.java | 2 +- .../MessageWriterResultHandlerTests.java | 2 +- ...equestPartMethodArgumentResolverTests.java | 2 +- .../ResponseEntityResultHandlerTests.java | 2 +- .../view/HttpMessageWriterViewTests.java | 2 +- .../ViewResolutionResultHandlerTests.java | 2 +- .../result/view/ZeroDemandResponse.java | 2 +- spring-webmvc/spring-webmvc.gradle | 1 + .../web/servlet/DispatcherServletTests.java | 1 - .../web/servlet}/DummyEnvironment.java | 9 +- ...nnotationControllerHandlerMethodTests.java | 2 +- .../servlet/view/feed/AtomFeedViewTests.java | 2 +- .../servlet/view/feed/RssFeedViewTests.java | 2 +- spring-websocket/spring-websocket.gradle | 1 + .../AbstractSockJsIntegrationTests.java | 4 +- src/checkstyle/checkstyle-suppressions.xml | 8 +- 224 files changed, 552 insertions(+), 453 deletions(-) create mode 100644 spring-context-indexer/src/test/java/org/springframework/context/index/sample/Scope.java rename spring-core/src/test/java/org/springframework/{tests/TestGroupTests.java => core/test/fixtures/TestGroupParsingTests.java} (95%) rename spring-core/src/test/java/org/springframework/{tests/AssumeTests.java => core/test/fixtures/TestGroupTests.java} (76%) delete mode 100644 spring-core/src/test/java/org/springframework/tests/Assume.java create mode 100644 spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/Assume.java rename spring-core/src/{test/java/org/springframework/tests => testFixtures/java/org/springframework/core/test/fixtures}/EnabledForTestGroups.java (96%) rename spring-core/src/{test/java/org/springframework/tests => testFixtures/java/org/springframework/core/test/fixtures}/TestGroup.java (98%) rename spring-core/src/{test/java/org/springframework/tests => testFixtures/java/org/springframework/core/test/fixtures}/TestGroupsCondition.java (97%) rename spring-core/src/{test/java/org/springframework/tests => testFixtures/java/org/springframework/core/test/fixtures}/TimeStamped.java (95%) rename spring-core/src/{test/java/org/springframework/core => testFixtures/java/org/springframework/core/test/fixtures}/codec/AbstractDecoderTests.java (98%) rename spring-core/src/{test/java/org/springframework/core => testFixtures/java/org/springframework/core/test/fixtures}/codec/AbstractEncoderTests.java (98%) create mode 100644 spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/env/EnvironmentTestUtils.java rename spring-core/src/{test/java/org/springframework/mock => testFixtures/java/org/springframework/core/test/fixtures}/env/MockPropertySource.java (98%) rename spring-core/src/{test/java/org/springframework/tests/TestResourceUtils.java => testFixtures/java/org/springframework/core/test/fixtures/io/ResourceTestUtils.java} (89%) rename spring-core/src/{test/java/org/springframework/util => testFixtures/java/org/springframework/core/test/fixtures/io}/SerializationTestUtils.java (97%) rename spring-core/src/{test/java/org/springframework/core => testFixtures/java/org/springframework/core/test/fixtures}/io/buffer/AbstractDataBufferAllocatingTests.java (92%) rename spring-core/src/{test/java/org/springframework/core => testFixtures/java/org/springframework/core/test/fixtures}/io/buffer/AbstractLeakCheckingTests.java (92%) rename spring-core/src/{test/java/org/springframework/core/io/buffer/support => testFixtures/java/org/springframework/core/test/fixtures/io/buffer}/DataBufferTestUtils.java (97%) rename spring-core/src/{test/java/org/springframework/core => testFixtures/java/org/springframework/core/test/fixtures}/io/buffer/LeakAwareDataBuffer.java (92%) rename spring-core/src/{test/java/org/springframework/core => testFixtures/java/org/springframework/core/test/fixtures}/io/buffer/LeakAwareDataBufferFactory.java (93%) rename spring-core/src/{test/java/org/springframework => testFixtures/java/org/springframework/core/test/fixtures}/stereotype/Component.java (84%) rename spring-core/src/{test/java/org/springframework => testFixtures/java/org/springframework/core/test/fixtures}/stereotype/Indexed.java (94%) rename spring-core/src/{test/java/org/springframework/tests => testFixtures/java/org/springframework/core/test/fixtures/xml}/XmlContent.java (94%) rename spring-core/src/{test/java/org/springframework/tests => testFixtures/java/org/springframework/core/test/fixtures/xml}/XmlContentAssert.java (77%) rename {spring-core/src/test/java/org/springframework/core/env => spring-webmvc/src/test/java/org/springframework/web/servlet}/DummyEnvironment.java (88%) diff --git a/build.gradle b/build.gradle index 4341457d3c1..c3f625e7962 100644 --- a/build.gradle +++ b/build.gradle @@ -308,6 +308,7 @@ configure([rootProject] + javaProjects) { project -> group = "org.springframework" apply plugin: "java" + apply plugin: "java-test-fixtures" apply plugin: "checkstyle" apply plugin: 'org.springframework.build.compile' apply from: "${rootDir}/gradle/ide.gradle" diff --git a/buildSrc/src/main/java/org/springframework/build/testsources/TestSourcesPlugin.java b/buildSrc/src/main/java/org/springframework/build/testsources/TestSourcesPlugin.java index 68b97661902..b93ca0f77df 100644 --- a/buildSrc/src/main/java/org/springframework/build/testsources/TestSourcesPlugin.java +++ b/buildSrc/src/main/java/org/springframework/build/testsources/TestSourcesPlugin.java @@ -55,9 +55,16 @@ public class TestSourcesPlugin implements Plugin { OptionalDependenciesPlugin.OPTIONAL_CONFIGURATION_NAME, JavaPlugin.TEST_COMPILE_CONFIGURATION_NAME); + /** + * Projects which will not be automatically added as a test dependency. + *

This is used to assist with the migration to Gradle test fixtures. + */ + private static final List excludedProjects = Arrays.asList("spring-core"); + + @Override public void apply(Project project) { - project.getPlugins().withType(JavaPlugin.class, (plugin) -> addTestSourcesToProject(project)); + project.getPlugins().withType(JavaPlugin.class, plugin -> addTestSourcesToProject(project)); } private void addTestSourcesToProject(Project project) { @@ -83,13 +90,17 @@ public class TestSourcesPlugin implements Plugin { } } - private void addTestSourcesFromDependency(final Project currentProject, ProjectDependency dependency) { + @SuppressWarnings("deprecation") + private void addTestSourcesFromDependency(Project currentProject, ProjectDependency dependency) { Project dependencyProject = dependency.getDependencyProject(); - dependencyProject.getPlugins().withType(JavaPlugin.class, plugin -> { - final JavaPluginConvention javaPlugin = dependencyProject.getConvention() - .getPlugin(JavaPluginConvention.class); - SourceSetOutput test = javaPlugin.getSourceSets().findByName(SourceSet.TEST_SOURCE_SET_NAME).getOutput(); - currentProject.getDependencies().add(JavaPlugin.TEST_COMPILE_CONFIGURATION_NAME, test); - }); + if (!excludedProjects.contains(dependencyProject.getName())) { + dependencyProject.getPlugins().withType(JavaPlugin.class, plugin -> { + JavaPluginConvention javaPlugin = dependencyProject.getConvention().getPlugin(JavaPluginConvention.class); + SourceSetOutput test = javaPlugin.getSourceSets().findByName(SourceSet.TEST_SOURCE_SET_NAME).getOutput(); + // System.err.println(String.format("Adding test source dependencies from %s to %s", currentProject.getName(), dependencyProject.getName())); + currentProject.getDependencies().add(JavaPlugin.TEST_COMPILE_CONFIGURATION_NAME, test); + }); + } } + } diff --git a/integration-tests/integration-tests.gradle b/integration-tests/integration-tests.gradle index ab3bba7354b..afaa939a61b 100644 --- a/integration-tests/integration-tests.gradle +++ b/integration-tests/integration-tests.gradle @@ -7,6 +7,7 @@ dependencies { testCompile(project(":spring-beans")) testCompile(project(":spring-context")) testCompile(project(":spring-core")) + testCompile(testFixtures(project(":spring-core"))) testCompile(project(":spring-expression")) testCompile(project(":spring-jdbc")) testCompile(project(":spring-orm")) diff --git a/integration-tests/src/test/java/org/springframework/aop/config/AopNamespaceHandlerScopeIntegrationTests.java b/integration-tests/src/test/java/org/springframework/aop/config/AopNamespaceHandlerScopeIntegrationTests.java index 29f6e050812..173da6e54d7 100644 --- a/integration-tests/src/test/java/org/springframework/aop/config/AopNamespaceHandlerScopeIntegrationTests.java +++ b/integration-tests/src/test/java/org/springframework/aop/config/AopNamespaceHandlerScopeIntegrationTests.java @@ -21,12 +21,12 @@ import org.junit.jupiter.api.Test; import org.springframework.aop.framework.Advised; import org.springframework.aop.support.AopUtils; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.core.test.fixtures.io.SerializationTestUtils; import org.springframework.mock.web.MockHttpServletRequest; import org.springframework.mock.web.MockHttpSession; import org.springframework.test.context.junit.jupiter.web.SpringJUnitWebConfig; import org.springframework.tests.sample.beans.ITestBean; import org.springframework.tests.sample.beans.TestBean; -import org.springframework.util.SerializationTestUtils; import org.springframework.web.context.request.RequestContextHolder; import org.springframework.web.context.request.ServletRequestAttributes; diff --git a/integration-tests/src/test/java/org/springframework/scheduling/annotation/ScheduledAndTransactionalAnnotationIntegrationTests.java b/integration-tests/src/test/java/org/springframework/scheduling/annotation/ScheduledAndTransactionalAnnotationIntegrationTests.java index 95d897138f4..77f1145de82 100644 --- a/integration-tests/src/test/java/org/springframework/scheduling/annotation/ScheduledAndTransactionalAnnotationIntegrationTests.java +++ b/integration-tests/src/test/java/org/springframework/scheduling/annotation/ScheduledAndTransactionalAnnotationIntegrationTests.java @@ -28,10 +28,10 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.AnnotationConfigApplicationContext; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; +import org.springframework.core.test.fixtures.EnabledForTestGroups; import org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor; import org.springframework.dao.support.PersistenceExceptionTranslator; import org.springframework.stereotype.Repository; -import org.springframework.tests.EnabledForTestGroups; import org.springframework.tests.transaction.CallCountingTransactionManager; import org.springframework.transaction.PlatformTransactionManager; import org.springframework.transaction.annotation.EnableTransactionManagement; @@ -40,7 +40,7 @@ import org.springframework.transaction.annotation.Transactional; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; import static org.mockito.Mockito.mock; -import static org.springframework.tests.TestGroup.PERFORMANCE; +import static org.springframework.core.test.fixtures.TestGroup.PERFORMANCE; /** * Integration tests cornering bug SPR-8651, which revealed that @Scheduled methods may diff --git a/spring-aop/spring-aop.gradle b/spring-aop/spring-aop.gradle index e4c20542e2c..3d000edc2d4 100644 --- a/spring-aop/spring-aop.gradle +++ b/spring-aop/spring-aop.gradle @@ -6,4 +6,5 @@ dependencies { optional("org.aspectj:aspectjweaver") optional("org.apache.commons:commons-pool2") optional("com.jamonapi:jamon") + testCompile(testFixtures(project(":spring-core"))) } diff --git a/spring-aop/src/test/java/org/springframework/aop/aspectj/annotation/AspectProxyFactoryTests.java b/spring-aop/src/test/java/org/springframework/aop/aspectj/annotation/AspectProxyFactoryTests.java index 0c4d6ff1d8d..e445598dd28 100644 --- a/spring-aop/src/test/java/org/springframework/aop/aspectj/annotation/AspectProxyFactoryTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/aspectj/annotation/AspectProxyFactoryTests.java @@ -26,7 +26,7 @@ import org.aspectj.lang.annotation.Aspect; import org.junit.jupiter.api.Test; import test.aop.PerThisAspect; -import org.springframework.util.SerializationTestUtils; +import org.springframework.core.test.fixtures.io.SerializationTestUtils; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException; diff --git a/spring-aop/src/test/java/org/springframework/aop/config/AopNamespaceHandlerEventTests.java b/spring-aop/src/test/java/org/springframework/aop/config/AopNamespaceHandlerEventTests.java index c31d5a396d0..d713be7450f 100644 --- a/spring-aop/src/test/java/org/springframework/aop/config/AopNamespaceHandlerEventTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/config/AopNamespaceHandlerEventTests.java @@ -33,7 +33,7 @@ import org.springframework.core.io.Resource; import org.springframework.tests.beans.CollectingReaderEventListener; import static org.assertj.core.api.Assertions.assertThat; -import static org.springframework.tests.TestResourceUtils.qualifiedResource; +import static org.springframework.core.test.fixtures.io.ResourceTestUtils.qualifiedResource; /** * @author Rob Harrop diff --git a/spring-aop/src/test/java/org/springframework/aop/config/AopNamespaceHandlerPointcutErrorTests.java b/spring-aop/src/test/java/org/springframework/aop/config/AopNamespaceHandlerPointcutErrorTests.java index 7b07a2f793e..67cc99823d7 100644 --- a/spring-aop/src/test/java/org/springframework/aop/config/AopNamespaceHandlerPointcutErrorTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/config/AopNamespaceHandlerPointcutErrorTests.java @@ -24,7 +24,7 @@ import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; -import static org.springframework.tests.TestResourceUtils.qualifiedResource; +import static org.springframework.core.test.fixtures.io.ResourceTestUtils.qualifiedResource; /** * @author Mark Fisher diff --git a/spring-aop/src/test/java/org/springframework/aop/config/TopLevelAopTagTests.java b/spring-aop/src/test/java/org/springframework/aop/config/TopLevelAopTagTests.java index 95732b92a1d..c8e21cb8c40 100644 --- a/spring-aop/src/test/java/org/springframework/aop/config/TopLevelAopTagTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/config/TopLevelAopTagTests.java @@ -22,7 +22,7 @@ import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; import static org.assertj.core.api.Assertions.assertThat; -import static org.springframework.tests.TestResourceUtils.qualifiedResource; +import static org.springframework.core.test.fixtures.io.ResourceTestUtils.qualifiedResource; /** * Tests that the <aop:config/> element can be used as a top level element. diff --git a/spring-aop/src/test/java/org/springframework/aop/framework/PrototypeTargetTests.java b/spring-aop/src/test/java/org/springframework/aop/framework/PrototypeTargetTests.java index 6174c02a0c1..dd99d98d647 100644 --- a/spring-aop/src/test/java/org/springframework/aop/framework/PrototypeTargetTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/framework/PrototypeTargetTests.java @@ -25,7 +25,7 @@ import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; import org.springframework.core.io.Resource; import static org.assertj.core.api.Assertions.assertThat; -import static org.springframework.tests.TestResourceUtils.qualifiedResource; +import static org.springframework.core.test.fixtures.io.ResourceTestUtils.qualifiedResource; /** * @author Juergen Hoeller diff --git a/spring-aop/src/test/java/org/springframework/aop/framework/ProxyFactoryTests.java b/spring-aop/src/test/java/org/springframework/aop/framework/ProxyFactoryTests.java index 7372468f9c3..06545b23b00 100644 --- a/spring-aop/src/test/java/org/springframework/aop/framework/ProxyFactoryTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/framework/ProxyFactoryTests.java @@ -36,7 +36,7 @@ import org.springframework.aop.support.DefaultPointcutAdvisor; import org.springframework.aop.support.DelegatingIntroductionInterceptor; import org.springframework.core.annotation.AnnotationAwareOrderComparator; import org.springframework.core.annotation.Order; -import org.springframework.tests.TimeStamped; +import org.springframework.core.test.fixtures.TimeStamped; import org.springframework.tests.aop.advice.CountingBeforeAdvice; import org.springframework.tests.aop.interceptor.NopInterceptor; import org.springframework.tests.sample.beans.IOther; diff --git a/spring-aop/src/test/java/org/springframework/aop/interceptor/ConcurrencyThrottleInterceptorTests.java b/spring-aop/src/test/java/org/springframework/aop/interceptor/ConcurrencyThrottleInterceptorTests.java index 9477df4ca01..316d212c12d 100644 --- a/spring-aop/src/test/java/org/springframework/aop/interceptor/ConcurrencyThrottleInterceptorTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/interceptor/ConcurrencyThrottleInterceptorTests.java @@ -22,10 +22,10 @@ import org.junit.jupiter.api.Test; import org.springframework.aop.framework.Advised; import org.springframework.aop.framework.ProxyFactory; +import org.springframework.core.test.fixtures.io.SerializationTestUtils; import org.springframework.tests.sample.beans.DerivedTestBean; import org.springframework.tests.sample.beans.ITestBean; import org.springframework.tests.sample.beans.TestBean; -import org.springframework.util.SerializationTestUtils; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-aop/src/test/java/org/springframework/aop/interceptor/ExposeInvocationInterceptorTests.java b/spring-aop/src/test/java/org/springframework/aop/interceptor/ExposeInvocationInterceptorTests.java index 76b682bf093..aaba0ed6231 100644 --- a/spring-aop/src/test/java/org/springframework/aop/interceptor/ExposeInvocationInterceptorTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/interceptor/ExposeInvocationInterceptorTests.java @@ -25,7 +25,7 @@ import org.springframework.tests.sample.beans.ITestBean; import org.springframework.tests.sample.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; -import static org.springframework.tests.TestResourceUtils.qualifiedResource; +import static org.springframework.core.test.fixtures.io.ResourceTestUtils.qualifiedResource; /** * Non-XML tests are in AbstractAopProxyTests diff --git a/spring-aop/src/test/java/org/springframework/aop/scope/ScopedProxyAutowireTests.java b/spring-aop/src/test/java/org/springframework/aop/scope/ScopedProxyAutowireTests.java index 42f32fa1eb0..7c09bbb7c5a 100644 --- a/spring-aop/src/test/java/org/springframework/aop/scope/ScopedProxyAutowireTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/scope/ScopedProxyAutowireTests.java @@ -24,7 +24,7 @@ import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; import static org.assertj.core.api.Assertions.assertThat; -import static org.springframework.tests.TestResourceUtils.qualifiedResource; +import static org.springframework.core.test.fixtures.io.ResourceTestUtils.qualifiedResource; /** * @author Mark Fisher diff --git a/spring-aop/src/test/java/org/springframework/aop/support/AbstractRegexpMethodPointcutTests.java b/spring-aop/src/test/java/org/springframework/aop/support/AbstractRegexpMethodPointcutTests.java index f13ebf47fea..1b32923d4da 100644 --- a/spring-aop/src/test/java/org/springframework/aop/support/AbstractRegexpMethodPointcutTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/support/AbstractRegexpMethodPointcutTests.java @@ -21,8 +21,8 @@ import java.io.IOException; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; +import org.springframework.core.test.fixtures.io.SerializationTestUtils; import org.springframework.tests.sample.beans.TestBean; -import org.springframework.util.SerializationTestUtils; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-aop/src/test/java/org/springframework/aop/support/AopUtilsTests.java b/spring-aop/src/test/java/org/springframework/aop/support/AopUtilsTests.java index 63778647deb..09d88705f80 100644 --- a/spring-aop/src/test/java/org/springframework/aop/support/AopUtilsTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/support/AopUtilsTests.java @@ -25,10 +25,10 @@ import org.springframework.aop.MethodMatcher; import org.springframework.aop.Pointcut; import org.springframework.aop.interceptor.ExposeInvocationInterceptor; import org.springframework.aop.target.EmptyTargetSource; +import org.springframework.core.test.fixtures.io.SerializationTestUtils; import org.springframework.lang.Nullable; import org.springframework.tests.aop.interceptor.NopInterceptor; import org.springframework.tests.sample.beans.TestBean; -import org.springframework.util.SerializationTestUtils; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-aop/src/test/java/org/springframework/aop/support/DelegatingIntroductionInterceptorTests.java b/spring-aop/src/test/java/org/springframework/aop/support/DelegatingIntroductionInterceptorTests.java index a165be41a40..55da6fee78b 100644 --- a/spring-aop/src/test/java/org/springframework/aop/support/DelegatingIntroductionInterceptorTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/support/DelegatingIntroductionInterceptorTests.java @@ -24,7 +24,8 @@ import org.junit.jupiter.api.Test; import org.springframework.aop.IntroductionAdvisor; import org.springframework.aop.IntroductionInterceptor; import org.springframework.aop.framework.ProxyFactory; -import org.springframework.tests.TimeStamped; +import org.springframework.core.test.fixtures.TimeStamped; +import org.springframework.core.test.fixtures.io.SerializationTestUtils; import org.springframework.tests.aop.interceptor.SerializableNopInterceptor; import org.springframework.tests.sample.beans.INestedTestBean; import org.springframework.tests.sample.beans.ITestBean; @@ -32,7 +33,6 @@ import org.springframework.tests.sample.beans.NestedTestBean; import org.springframework.tests.sample.beans.Person; import org.springframework.tests.sample.beans.SerializablePerson; import org.springframework.tests.sample.beans.TestBean; -import org.springframework.util.SerializationTestUtils; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException; diff --git a/spring-aop/src/test/java/org/springframework/aop/support/MethodMatchersTests.java b/spring-aop/src/test/java/org/springframework/aop/support/MethodMatchersTests.java index f860ef72d4e..b69e8450b49 100644 --- a/spring-aop/src/test/java/org/springframework/aop/support/MethodMatchersTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/support/MethodMatchersTests.java @@ -21,11 +21,11 @@ import java.lang.reflect.Method; import org.junit.jupiter.api.Test; import org.springframework.aop.MethodMatcher; +import org.springframework.core.test.fixtures.io.SerializationTestUtils; import org.springframework.lang.Nullable; import org.springframework.tests.sample.beans.IOther; import org.springframework.tests.sample.beans.ITestBean; import org.springframework.tests.sample.beans.TestBean; -import org.springframework.util.SerializationTestUtils; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-aop/src/test/java/org/springframework/aop/support/NameMatchMethodPointcutTests.java b/spring-aop/src/test/java/org/springframework/aop/support/NameMatchMethodPointcutTests.java index 91517e6831c..87241091caf 100644 --- a/spring-aop/src/test/java/org/springframework/aop/support/NameMatchMethodPointcutTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/support/NameMatchMethodPointcutTests.java @@ -21,11 +21,11 @@ import org.junit.jupiter.api.Test; import org.springframework.aop.framework.Advised; import org.springframework.aop.framework.ProxyFactory; +import org.springframework.core.test.fixtures.io.SerializationTestUtils; import org.springframework.tests.aop.interceptor.NopInterceptor; import org.springframework.tests.aop.interceptor.SerializableNopInterceptor; import org.springframework.tests.sample.beans.Person; import org.springframework.tests.sample.beans.SerializablePerson; -import org.springframework.util.SerializationTestUtils; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-aop/src/test/java/org/springframework/aop/support/RegexpMethodPointcutAdvisorIntegrationTests.java b/spring-aop/src/test/java/org/springframework/aop/support/RegexpMethodPointcutAdvisorIntegrationTests.java index da9699a305b..34fd0e47775 100644 --- a/spring-aop/src/test/java/org/springframework/aop/support/RegexpMethodPointcutAdvisorIntegrationTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/support/RegexpMethodPointcutAdvisorIntegrationTests.java @@ -22,15 +22,15 @@ import org.springframework.aop.framework.Advised; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; import org.springframework.core.io.Resource; +import org.springframework.core.test.fixtures.io.SerializationTestUtils; import org.springframework.tests.aop.interceptor.NopInterceptor; import org.springframework.tests.aop.interceptor.SerializableNopInterceptor; import org.springframework.tests.sample.beans.ITestBean; import org.springframework.tests.sample.beans.Person; import org.springframework.tests.sample.beans.TestBean; -import org.springframework.util.SerializationTestUtils; import static org.assertj.core.api.Assertions.assertThat; -import static org.springframework.tests.TestResourceUtils.qualifiedResource; +import static org.springframework.core.test.fixtures.io.ResourceTestUtils.qualifiedResource; /** * @author Rod Johnson diff --git a/spring-aop/src/test/java/org/springframework/aop/target/CommonsPool2TargetSourceProxyTests.java b/spring-aop/src/test/java/org/springframework/aop/target/CommonsPool2TargetSourceProxyTests.java index 31afac2e099..5536a17c8f0 100644 --- a/spring-aop/src/test/java/org/springframework/aop/target/CommonsPool2TargetSourceProxyTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/target/CommonsPool2TargetSourceProxyTests.java @@ -25,7 +25,7 @@ import org.springframework.core.io.Resource; import org.springframework.tests.sample.beans.ITestBean; import static org.assertj.core.api.Assertions.assertThat; -import static org.springframework.tests.TestResourceUtils.qualifiedResource; +import static org.springframework.core.test.fixtures.io.ResourceTestUtils.qualifiedResource; /** * @author Stephane Nicoll diff --git a/spring-aop/src/test/java/org/springframework/aop/target/HotSwappableTargetSourceTests.java b/spring-aop/src/test/java/org/springframework/aop/target/HotSwappableTargetSourceTests.java index ef7bea56dae..a5298674de7 100644 --- a/spring-aop/src/test/java/org/springframework/aop/target/HotSwappableTargetSourceTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/target/HotSwappableTargetSourceTests.java @@ -25,15 +25,15 @@ import org.springframework.aop.framework.ProxyFactory; import org.springframework.aop.support.DefaultPointcutAdvisor; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; +import org.springframework.core.test.fixtures.io.SerializationTestUtils; import org.springframework.tests.aop.interceptor.SerializableNopInterceptor; import org.springframework.tests.sample.beans.Person; import org.springframework.tests.sample.beans.SerializablePerson; import org.springframework.tests.sample.beans.SideEffectBean; -import org.springframework.util.SerializationTestUtils; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException; -import static org.springframework.tests.TestResourceUtils.qualifiedResource; +import static org.springframework.core.test.fixtures.io.ResourceTestUtils.qualifiedResource; /** * @author Rod Johnson diff --git a/spring-aop/src/test/java/org/springframework/aop/target/LazyInitTargetSourceTests.java b/spring-aop/src/test/java/org/springframework/aop/target/LazyInitTargetSourceTests.java index 0efaa5165e6..54ea0552c76 100644 --- a/spring-aop/src/test/java/org/springframework/aop/target/LazyInitTargetSourceTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/target/LazyInitTargetSourceTests.java @@ -26,7 +26,7 @@ import org.springframework.core.io.Resource; import org.springframework.tests.sample.beans.ITestBean; import static org.assertj.core.api.Assertions.assertThat; -import static org.springframework.tests.TestResourceUtils.qualifiedResource; +import static org.springframework.core.test.fixtures.io.ResourceTestUtils.qualifiedResource; /** * @author Juergen Hoeller diff --git a/spring-aop/src/test/java/org/springframework/aop/target/PrototypeBasedTargetSourceTests.java b/spring-aop/src/test/java/org/springframework/aop/target/PrototypeBasedTargetSourceTests.java index a8b7d812ab2..a4006bd888e 100644 --- a/spring-aop/src/test/java/org/springframework/aop/target/PrototypeBasedTargetSourceTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/target/PrototypeBasedTargetSourceTests.java @@ -23,9 +23,9 @@ import org.springframework.beans.MutablePropertyValues; import org.springframework.beans.factory.config.BeanDefinition; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.support.RootBeanDefinition; +import org.springframework.core.test.fixtures.io.SerializationTestUtils; import org.springframework.tests.sample.beans.SerializablePerson; import org.springframework.tests.sample.beans.TestBean; -import org.springframework.util.SerializationTestUtils; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-aop/src/test/java/org/springframework/aop/target/PrototypeTargetSourceTests.java b/spring-aop/src/test/java/org/springframework/aop/target/PrototypeTargetSourceTests.java index edcf3379a7c..37bf57a2741 100644 --- a/spring-aop/src/test/java/org/springframework/aop/target/PrototypeTargetSourceTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/target/PrototypeTargetSourceTests.java @@ -24,7 +24,7 @@ import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; import org.springframework.tests.sample.beans.SideEffectBean; import static org.assertj.core.api.Assertions.assertThat; -import static org.springframework.tests.TestResourceUtils.qualifiedResource; +import static org.springframework.core.test.fixtures.io.ResourceTestUtils.qualifiedResource; /** * @author Rod Johnson diff --git a/spring-aop/src/test/java/org/springframework/aop/target/ThreadLocalTargetSourceTests.java b/spring-aop/src/test/java/org/springframework/aop/target/ThreadLocalTargetSourceTests.java index bb5e6579d83..1ff3816db8b 100644 --- a/spring-aop/src/test/java/org/springframework/aop/target/ThreadLocalTargetSourceTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/target/ThreadLocalTargetSourceTests.java @@ -25,7 +25,7 @@ import org.springframework.tests.sample.beans.ITestBean; import org.springframework.tests.sample.beans.SideEffectBean; import static org.assertj.core.api.Assertions.assertThat; -import static org.springframework.tests.TestResourceUtils.qualifiedResource; +import static org.springframework.core.test.fixtures.io.ResourceTestUtils.qualifiedResource; /** * @author Rod Johnson diff --git a/spring-aop/src/test/java/org/springframework/aop/target/dynamic/RefreshableTargetSourceTests.java b/spring-aop/src/test/java/org/springframework/aop/target/dynamic/RefreshableTargetSourceTests.java index dbfe7024c45..23c1c56f048 100644 --- a/spring-aop/src/test/java/org/springframework/aop/target/dynamic/RefreshableTargetSourceTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/target/dynamic/RefreshableTargetSourceTests.java @@ -18,10 +18,10 @@ package org.springframework.aop.target.dynamic; import org.junit.jupiter.api.Test; -import org.springframework.tests.EnabledForTestGroups; +import org.springframework.core.test.fixtures.EnabledForTestGroups; import static org.assertj.core.api.Assertions.assertThat; -import static org.springframework.tests.TestGroup.PERFORMANCE; +import static org.springframework.core.test.fixtures.TestGroup.PERFORMANCE; /** * @author Rob Harrop diff --git a/spring-aop/src/test/java/org/springframework/tests/aop/interceptor/TimestampIntroductionInterceptor.java b/spring-aop/src/test/java/org/springframework/tests/aop/interceptor/TimestampIntroductionInterceptor.java index 8e665dba656..41e79f3e5c9 100644 --- a/spring-aop/src/test/java/org/springframework/tests/aop/interceptor/TimestampIntroductionInterceptor.java +++ b/spring-aop/src/test/java/org/springframework/tests/aop/interceptor/TimestampIntroductionInterceptor.java @@ -17,7 +17,7 @@ package org.springframework.tests.aop.interceptor; import org.springframework.aop.support.DelegatingIntroductionInterceptor; -import org.springframework.tests.TimeStamped; +import org.springframework.core.test.fixtures.TimeStamped; @SuppressWarnings("serial") public class TimestampIntroductionInterceptor extends DelegatingIntroductionInterceptor diff --git a/spring-aspects/spring-aspects.gradle b/spring-aspects/spring-aspects.gradle index b30a8107f98..fbb21964377 100644 --- a/spring-aspects/spring-aspects.gradle +++ b/spring-aspects/spring-aspects.gradle @@ -24,6 +24,7 @@ dependencies { optional("javax.transaction:javax.transaction-api") // for @javax.transaction.Transactional support testCompile(project(":spring-core")) // for CodeStyleAspect testCompile(project(":spring-test")) + testCompile(testFixtures(project(":spring-core"))) testCompile("javax.mail:javax.mail-api") testCompileOnly("org.aspectj:aspectjrt") } diff --git a/spring-aspects/src/test/java/org/springframework/scheduling/aspectj/AnnotationAsyncExecutionAspectTests.java b/spring-aspects/src/test/java/org/springframework/scheduling/aspectj/AnnotationAsyncExecutionAspectTests.java index 62dceafaede..940c3e044b2 100644 --- a/spring-aspects/src/test/java/org/springframework/scheduling/aspectj/AnnotationAsyncExecutionAspectTests.java +++ b/spring-aspects/src/test/java/org/springframework/scheduling/aspectj/AnnotationAsyncExecutionAspectTests.java @@ -30,15 +30,15 @@ import org.springframework.aop.interceptor.SimpleAsyncUncaughtExceptionHandler; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.support.RootBeanDefinition; import org.springframework.core.task.SimpleAsyncTaskExecutor; +import org.springframework.core.test.fixtures.EnabledForTestGroups; import org.springframework.scheduling.annotation.Async; import org.springframework.scheduling.annotation.AsyncResult; import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; -import org.springframework.tests.EnabledForTestGroups; import org.springframework.util.ReflectionUtils; import org.springframework.util.concurrent.ListenableFuture; import static org.assertj.core.api.Assertions.assertThat; -import static org.springframework.tests.TestGroup.PERFORMANCE; +import static org.springframework.core.test.fixtures.TestGroup.PERFORMANCE; /** * Unit tests for {@link AnnotationAsyncExecutionAspect}. diff --git a/spring-beans/spring-beans.gradle b/spring-beans/spring-beans.gradle index 0409b9e910d..9ab23dedff8 100644 --- a/spring-beans/spring-beans.gradle +++ b/spring-beans/spring-beans.gradle @@ -10,6 +10,7 @@ dependencies { optional("org.codehaus.groovy:groovy-xml") optional("org.jetbrains.kotlin:kotlin-reflect") optional("org.jetbrains.kotlin:kotlin-stdlib") + testCompile(testFixtures(project(":spring-core"))) testCompile("javax.annotation:javax.annotation-api") } diff --git a/spring-beans/src/test/java/org/springframework/beans/AbstractPropertyAccessorTests.java b/spring-beans/src/test/java/org/springframework/beans/AbstractPropertyAccessorTests.java index 0b7576bad4c..723ee31c238 100644 --- a/spring-beans/src/test/java/org/springframework/beans/AbstractPropertyAccessorTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/AbstractPropertyAccessorTests.java @@ -47,9 +47,9 @@ import org.springframework.core.convert.ConversionFailedException; import org.springframework.core.convert.TypeDescriptor; import org.springframework.core.convert.support.DefaultConversionService; import org.springframework.core.convert.support.GenericConversionService; +import org.springframework.core.test.fixtures.Assume; +import org.springframework.core.test.fixtures.EnabledForTestGroups; import org.springframework.lang.Nullable; -import org.springframework.tests.Assume; -import org.springframework.tests.EnabledForTestGroups; import org.springframework.tests.sample.beans.BooleanTestBean; import org.springframework.tests.sample.beans.ITestBean; import org.springframework.tests.sample.beans.IndexedTestBean; @@ -62,7 +62,7 @@ import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException; import static org.assertj.core.api.Assertions.within; -import static org.springframework.tests.TestGroup.PERFORMANCE; +import static org.springframework.core.test.fixtures.TestGroup.PERFORMANCE; /** * Shared tests for property accessors. diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/BeanFactoryUtilsTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/BeanFactoryUtilsTests.java index 47aa95f8a92..4f7a9659bc0 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/BeanFactoryUtilsTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/BeanFactoryUtilsTests.java @@ -37,7 +37,7 @@ import org.springframework.tests.sample.beans.factory.DummyFactory; import org.springframework.util.ObjectUtils; import static org.assertj.core.api.Assertions.assertThat; -import static org.springframework.tests.TestResourceUtils.qualifiedResource; +import static org.springframework.core.test.fixtures.io.ResourceTestUtils.qualifiedResource; /** * @author Rod Johnson diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/ConcurrentBeanFactoryTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/ConcurrentBeanFactoryTests.java index 87f7e0089a3..2587d05e4e6 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/ConcurrentBeanFactoryTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/ConcurrentBeanFactoryTests.java @@ -33,11 +33,11 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; import org.springframework.beans.propertyeditors.CustomDateEditor; -import org.springframework.tests.EnabledForTestGroups; -import org.springframework.tests.TestGroup; +import org.springframework.core.test.fixtures.EnabledForTestGroups; +import org.springframework.core.test.fixtures.TestGroup; import static org.assertj.core.api.Assertions.assertThat; -import static org.springframework.tests.TestResourceUtils.qualifiedResource; +import static org.springframework.core.test.fixtures.io.ResourceTestUtils.qualifiedResource; /** * @author Guillaume Poirier diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/DefaultListableBeanFactoryTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/DefaultListableBeanFactoryTests.java index 2c38c122e68..20fde13c848 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/DefaultListableBeanFactoryTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/DefaultListableBeanFactoryTests.java @@ -86,10 +86,11 @@ import org.springframework.core.convert.support.DefaultConversionService; import org.springframework.core.convert.support.GenericConversionService; import org.springframework.core.io.Resource; import org.springframework.core.io.UrlResource; +import org.springframework.core.test.fixtures.Assume; +import org.springframework.core.test.fixtures.EnabledForTestGroups; +import org.springframework.core.test.fixtures.TestGroup; +import org.springframework.core.test.fixtures.io.SerializationTestUtils; import org.springframework.lang.Nullable; -import org.springframework.tests.Assume; -import org.springframework.tests.EnabledForTestGroups; -import org.springframework.tests.TestGroup; import org.springframework.tests.sample.beans.DependenciesBean; import org.springframework.tests.sample.beans.DerivedTestBean; import org.springframework.tests.sample.beans.ITestBean; @@ -98,7 +99,6 @@ import org.springframework.tests.sample.beans.NestedTestBean; import org.springframework.tests.sample.beans.SideEffectBean; import org.springframework.tests.sample.beans.TestBean; import org.springframework.tests.sample.beans.factory.DummyFactory; -import org.springframework.util.SerializationTestUtils; import org.springframework.util.StopWatch; import org.springframework.util.StringValueResolver; diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/FactoryBeanTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/FactoryBeanTests.java index 3bffa8ca1fa..427161efb3b 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/FactoryBeanTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/FactoryBeanTests.java @@ -27,11 +27,11 @@ import org.springframework.beans.factory.config.BeanPostProcessor; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; import org.springframework.core.io.Resource; -import org.springframework.stereotype.Component; +import org.springframework.core.test.fixtures.stereotype.Component; import org.springframework.util.Assert; import static org.assertj.core.api.Assertions.assertThat; -import static org.springframework.tests.TestResourceUtils.qualifiedResource; +import static org.springframework.core.test.fixtures.io.ResourceTestUtils.qualifiedResource; /** * @author Rob Harrop diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/annotation/AutowiredAnnotationBeanPostProcessorTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/annotation/AutowiredAnnotationBeanPostProcessorTests.java index 8f650ffc360..2a552309f63 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/annotation/AutowiredAnnotationBeanPostProcessorTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/annotation/AutowiredAnnotationBeanPostProcessorTests.java @@ -68,12 +68,12 @@ import org.springframework.core.Ordered; import org.springframework.core.ResolvableType; import org.springframework.core.annotation.AnnotationAwareOrderComparator; import org.springframework.core.annotation.Order; +import org.springframework.core.test.fixtures.io.SerializationTestUtils; import org.springframework.tests.sample.beans.ITestBean; import org.springframework.tests.sample.beans.IndexedTestBean; import org.springframework.tests.sample.beans.NestedTestBean; import org.springframework.tests.sample.beans.TestBean; import org.springframework.util.ReflectionUtils; -import org.springframework.util.SerializationTestUtils; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/annotation/CustomAutowireConfigurerTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/annotation/CustomAutowireConfigurerTests.java index 3454c28d9c2..259132d5ff9 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/annotation/CustomAutowireConfigurerTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/annotation/CustomAutowireConfigurerTests.java @@ -25,7 +25,7 @@ import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; import static org.assertj.core.api.Assertions.assertThat; -import static org.springframework.tests.TestResourceUtils.qualifiedResource; +import static org.springframework.core.test.fixtures.io.ResourceTestUtils.qualifiedResource; /** * Unit tests for {@link CustomAutowireConfigurer}. diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/annotation/InjectAnnotationBeanPostProcessorTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/annotation/InjectAnnotationBeanPostProcessorTests.java index 8f498f3889e..2a39ac4fbaf 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/annotation/InjectAnnotationBeanPostProcessorTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/annotation/InjectAnnotationBeanPostProcessorTests.java @@ -40,11 +40,11 @@ import org.springframework.beans.factory.support.AutowireCandidateQualifier; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.support.GenericBeanDefinition; import org.springframework.beans.factory.support.RootBeanDefinition; +import org.springframework.core.test.fixtures.io.SerializationTestUtils; import org.springframework.tests.sample.beans.ITestBean; import org.springframework.tests.sample.beans.IndexedTestBean; import org.springframework.tests.sample.beans.NestedTestBean; import org.springframework.tests.sample.beans.TestBean; -import org.springframework.util.SerializationTestUtils; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/config/FieldRetrievingFactoryBeanTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/config/FieldRetrievingFactoryBeanTests.java index cc20dc84e4d..770a6bddd0b 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/config/FieldRetrievingFactoryBeanTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/config/FieldRetrievingFactoryBeanTests.java @@ -25,7 +25,7 @@ import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; import org.springframework.tests.sample.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; -import static org.springframework.tests.TestResourceUtils.qualifiedResource; +import static org.springframework.core.test.fixtures.io.ResourceTestUtils.qualifiedResource; /** * Unit tests for {@link FieldRetrievingFactoryBean}. diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/config/ObjectFactoryCreatingFactoryBeanTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/config/ObjectFactoryCreatingFactoryBeanTests.java index 02066e98a45..d045f1d9619 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/config/ObjectFactoryCreatingFactoryBeanTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/config/ObjectFactoryCreatingFactoryBeanTests.java @@ -28,13 +28,13 @@ import org.springframework.beans.factory.BeanFactory; import org.springframework.beans.factory.ObjectFactory; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; -import org.springframework.util.SerializationTestUtils; +import org.springframework.core.test.fixtures.io.SerializationTestUtils; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException; import static org.mockito.BDDMockito.given; import static org.mockito.Mockito.mock; -import static org.springframework.tests.TestResourceUtils.qualifiedResource; +import static org.springframework.core.test.fixtures.io.ResourceTestUtils.qualifiedResource; /** * @author Colin Sampaleanu diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/config/PropertiesFactoryBeanTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/config/PropertiesFactoryBeanTests.java index e7b68287893..cdd9778c134 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/config/PropertiesFactoryBeanTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/config/PropertiesFactoryBeanTests.java @@ -23,7 +23,7 @@ import org.junit.jupiter.api.Test; import org.springframework.core.io.Resource; import static org.assertj.core.api.Assertions.assertThat; -import static org.springframework.tests.TestResourceUtils.qualifiedResource; +import static org.springframework.core.test.fixtures.io.ResourceTestUtils.qualifiedResource; /** * Unit tests for {@link PropertiesFactoryBean}. diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/config/PropertyPathFactoryBeanTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/config/PropertyPathFactoryBeanTests.java index 0c7fcc4a4c1..c9ba85ae21b 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/config/PropertyPathFactoryBeanTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/config/PropertyPathFactoryBeanTests.java @@ -25,7 +25,7 @@ import org.springframework.tests.sample.beans.ITestBean; import org.springframework.tests.sample.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; -import static org.springframework.tests.TestResourceUtils.qualifiedResource; +import static org.springframework.core.test.fixtures.io.ResourceTestUtils.qualifiedResource; /** * Unit tests for {@link PropertyPathFactoryBean}. diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/config/PropertyResourceConfigurerTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/config/PropertyResourceConfigurerTests.java index 9d5b3909ce6..cf8cf8ac18a 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/config/PropertyResourceConfigurerTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/config/PropertyResourceConfigurerTests.java @@ -47,7 +47,7 @@ import org.springframework.util.StringUtils; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; import static org.springframework.beans.factory.support.BeanDefinitionBuilder.genericBeanDefinition; -import static org.springframework.tests.TestResourceUtils.qualifiedResource; +import static org.springframework.core.test.fixtures.io.ResourceTestUtils.qualifiedResource; /** * Unit tests for various {@link PropertyResourceConfigurer} implementations including: diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/config/SimpleScopeTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/config/SimpleScopeTests.java index 297c4a655ca..5844bb08069 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/config/SimpleScopeTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/config/SimpleScopeTests.java @@ -28,7 +28,7 @@ import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; import org.springframework.tests.sample.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; -import static org.springframework.tests.TestResourceUtils.qualifiedResource; +import static org.springframework.core.test.fixtures.io.ResourceTestUtils.qualifiedResource; /** * Simple test to illustrate and verify scope usage. diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/parsing/CustomProblemReporterTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/parsing/CustomProblemReporterTests.java index 33caa90d573..c8287913ef8 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/parsing/CustomProblemReporterTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/parsing/CustomProblemReporterTests.java @@ -27,7 +27,7 @@ import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; import org.springframework.tests.sample.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; -import static org.springframework.tests.TestResourceUtils.qualifiedResource; +import static org.springframework.core.test.fixtures.io.ResourceTestUtils.qualifiedResource; /** * @author Rob Harrop diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/support/BeanFactoryGenericsTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/support/BeanFactoryGenericsTests.java index d848f90a7e5..e89a49b4b3b 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/support/BeanFactoryGenericsTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/support/BeanFactoryGenericsTests.java @@ -49,7 +49,7 @@ import org.springframework.core.annotation.AnnotationAwareOrderComparator; import org.springframework.core.annotation.Order; import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.UrlResource; -import org.springframework.tests.EnabledForTestGroups; +import org.springframework.core.test.fixtures.EnabledForTestGroups; import org.springframework.tests.sample.beans.GenericBean; import org.springframework.tests.sample.beans.GenericIntegerBean; import org.springframework.tests.sample.beans.GenericSetOfIntegerBean; @@ -57,7 +57,7 @@ import org.springframework.tests.sample.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; -import static org.springframework.tests.TestGroup.LONG_RUNNING; +import static org.springframework.core.test.fixtures.TestGroup.LONG_RUNNING; /** * @author Juergen Hoeller diff --git a/spring-context-indexer/src/test/java/org/springframework/context/index/sample/SampleNone.java b/spring-context-indexer/src/test/java/org/springframework/context/index/sample/SampleNone.java index bd1cd72401f..f81de9365b8 100644 --- a/spring-context-indexer/src/test/java/org/springframework/context/index/sample/SampleNone.java +++ b/spring-context-indexer/src/test/java/org/springframework/context/index/sample/SampleNone.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2016 the original author or authors. + * Copyright 2002-2019 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. @@ -17,7 +17,6 @@ package org.springframework.context.index.sample; import org.springframework.beans.factory.annotation.Qualifier; -import org.springframework.core.type.Scope; /** * Candidate with no matching annotation. diff --git a/spring-context-indexer/src/test/java/org/springframework/context/index/sample/Scope.java b/spring-context-indexer/src/test/java/org/springframework/context/index/sample/Scope.java new file mode 100644 index 00000000000..b96de613937 --- /dev/null +++ b/spring-context-indexer/src/test/java/org/springframework/context/index/sample/Scope.java @@ -0,0 +1,33 @@ +/* + * Copyright 2002-2009 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. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.springframework.context.index.sample; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * Copy of the {@code @Scope} annotation for testing purposes. + */ +@Target({ ElementType.TYPE, ElementType.METHOD }) +@Retention(RetentionPolicy.RUNTIME) +public @interface Scope { + + String value() default "singleton"; + +} diff --git a/spring-context-support/spring-context-support.gradle b/spring-context-support/spring-context-support.gradle index 54bf50e4333..f2fb5feedeb 100644 --- a/spring-context-support/spring-context-support.gradle +++ b/spring-context-support/spring-context-support.gradle @@ -15,6 +15,7 @@ dependencies { optional("org.codehaus.fabric3.api:commonj") optional("org.freemarker:freemarker") testCompile(project(":spring-context")) + testCompile(testFixtures(project(":spring-core"))) testCompile("org.hsqldb:hsqldb") testCompile("org.hibernate:hibernate-validator") testCompile("javax.annotation:javax.annotation-api") diff --git a/spring-context-support/src/test/java/org/springframework/cache/ehcache/EhCacheCacheTests.java b/spring-context-support/src/test/java/org/springframework/cache/ehcache/EhCacheCacheTests.java index df0e02b72ae..b35768a7bf9 100644 --- a/spring-context-support/src/test/java/org/springframework/cache/ehcache/EhCacheCacheTests.java +++ b/spring-context-support/src/test/java/org/springframework/cache/ehcache/EhCacheCacheTests.java @@ -26,10 +26,10 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.springframework.cache.AbstractCacheTests; -import org.springframework.tests.EnabledForTestGroups; +import org.springframework.core.test.fixtures.EnabledForTestGroups; import static org.assertj.core.api.Assertions.assertThat; -import static org.springframework.tests.TestGroup.LONG_RUNNING; +import static org.springframework.core.test.fixtures.TestGroup.LONG_RUNNING; /** * @author Costin Leau diff --git a/spring-context-support/src/test/java/org/springframework/scheduling/quartz/QuartzSupportTests.java b/spring-context-support/src/test/java/org/springframework/scheduling/quartz/QuartzSupportTests.java index b2503fb7db3..3e22f848352 100644 --- a/spring-context-support/src/test/java/org/springframework/scheduling/quartz/QuartzSupportTests.java +++ b/spring-context-support/src/test/java/org/springframework/scheduling/quartz/QuartzSupportTests.java @@ -37,8 +37,8 @@ import org.springframework.beans.factory.support.RootBeanDefinition; import org.springframework.context.support.ClassPathXmlApplicationContext; import org.springframework.context.support.StaticApplicationContext; import org.springframework.core.task.TaskExecutor; +import org.springframework.core.test.fixtures.EnabledForTestGroups; import org.springframework.jdbc.core.JdbcTemplate; -import org.springframework.tests.EnabledForTestGroups; import org.springframework.tests.sample.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; @@ -46,7 +46,7 @@ import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException import static org.mockito.BDDMockito.given; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; -import static org.springframework.tests.TestGroup.PERFORMANCE; +import static org.springframework.core.test.fixtures.TestGroup.PERFORMANCE; /** * @author Juergen Hoeller diff --git a/spring-context-support/src/test/java/org/springframework/validation/beanvalidation2/SpringValidatorAdapterTests.java b/spring-context-support/src/test/java/org/springframework/validation/beanvalidation2/SpringValidatorAdapterTests.java index 7639b6704b4..deb14733357 100644 --- a/spring-context-support/src/test/java/org/springframework/validation/beanvalidation2/SpringValidatorAdapterTests.java +++ b/spring-context-support/src/test/java/org/springframework/validation/beanvalidation2/SpringValidatorAdapterTests.java @@ -52,8 +52,8 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.BeanWrapper; import org.springframework.beans.BeanWrapperImpl; import org.springframework.context.support.StaticMessageSource; +import org.springframework.core.test.fixtures.io.SerializationTestUtils; import org.springframework.util.ObjectUtils; -import org.springframework.util.SerializationTestUtils; import org.springframework.validation.BeanPropertyBindingResult; import org.springframework.validation.FieldError; import org.springframework.validation.beanvalidation.SpringValidatorAdapter; diff --git a/spring-context/spring-context.gradle b/spring-context/spring-context.gradle index 54ee48da69a..0894c8d55f0 100644 --- a/spring-context/spring-context.gradle +++ b/spring-context/spring-context.gradle @@ -26,6 +26,7 @@ dependencies { optional("org.jetbrains.kotlin:kotlin-reflect") optional("org.jetbrains.kotlin:kotlin-stdlib") optional("org.reactivestreams:reactive-streams") + testCompile(testFixtures(project(":spring-core"))) testCompile("io.projectreactor:reactor-core") testCompile("org.codehaus.groovy:groovy-jsr223") testCompile("org.codehaus.groovy:groovy-test") diff --git a/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests.java b/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests.java index 341b25f3eb9..8c88ad34b78 100644 --- a/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests.java +++ b/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests.java @@ -50,10 +50,10 @@ import org.springframework.core.NestedRuntimeException; import org.springframework.core.Ordered; import org.springframework.core.annotation.Order; import org.springframework.core.io.ClassPathResource; +import org.springframework.core.test.fixtures.Assume; +import org.springframework.core.test.fixtures.EnabledForTestGroups; +import org.springframework.core.test.fixtures.TestGroup; import org.springframework.lang.Nullable; -import org.springframework.tests.Assume; -import org.springframework.tests.EnabledForTestGroups; -import org.springframework.tests.TestGroup; import org.springframework.tests.sample.beans.INestedTestBean; import org.springframework.tests.sample.beans.ITestBean; import org.springframework.tests.sample.beans.NestedTestBean; diff --git a/spring-context/src/test/java/org/springframework/aop/framework/AbstractAopProxyTests.java b/spring-context/src/test/java/org/springframework/aop/framework/AbstractAopProxyTests.java index b5b151c0833..8fb952e12f0 100644 --- a/spring-context/src/test/java/org/springframework/aop/framework/AbstractAopProxyTests.java +++ b/spring-context/src/test/java/org/springframework/aop/framework/AbstractAopProxyTests.java @@ -57,10 +57,11 @@ import org.springframework.aop.support.Pointcuts; import org.springframework.aop.support.StaticMethodMatcherPointcutAdvisor; import org.springframework.aop.target.HotSwappableTargetSource; import org.springframework.aop.target.SingletonTargetSource; +import org.springframework.core.test.fixtures.EnabledForTestGroups; +import org.springframework.core.test.fixtures.TestGroup; +import org.springframework.core.test.fixtures.TimeStamped; +import org.springframework.core.test.fixtures.io.SerializationTestUtils; import org.springframework.lang.Nullable; -import org.springframework.tests.EnabledForTestGroups; -import org.springframework.tests.TestGroup; -import org.springframework.tests.TimeStamped; import org.springframework.tests.aop.advice.CountingAfterReturningAdvice; import org.springframework.tests.aop.advice.CountingBeforeAdvice; import org.springframework.tests.aop.advice.MethodCounter; @@ -73,7 +74,6 @@ import org.springframework.tests.sample.beans.ITestBean; import org.springframework.tests.sample.beans.Person; import org.springframework.tests.sample.beans.SerializablePerson; import org.springframework.tests.sample.beans.TestBean; -import org.springframework.util.SerializationTestUtils; import org.springframework.util.StopWatch; import static org.assertj.core.api.Assertions.assertThat; @@ -765,7 +765,7 @@ public abstract class AbstractAopProxyTests { @SuppressWarnings("serial") class MyDi extends DelegatingIntroductionInterceptor implements TimeStamped { /** - * @see test.util.TimeStamped#getTimeStamp() + * @see org.springframework.core.test.fixtures.util.TimeStamped#getTimeStamp() */ @Override public long getTimeStamp() { diff --git a/spring-context/src/test/java/org/springframework/aop/framework/ProxyFactoryBeanTests.java b/spring-context/src/test/java/org/springframework/aop/framework/ProxyFactoryBeanTests.java index a026401340c..24c744ccba7 100644 --- a/spring-context/src/test/java/org/springframework/aop/framework/ProxyFactoryBeanTests.java +++ b/spring-context/src/test/java/org/springframework/aop/framework/ProxyFactoryBeanTests.java @@ -48,8 +48,9 @@ import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; import org.springframework.context.ApplicationListener; import org.springframework.context.TestListener; import org.springframework.core.io.ClassPathResource; +import org.springframework.core.test.fixtures.TimeStamped; +import org.springframework.core.test.fixtures.io.SerializationTestUtils; import org.springframework.lang.Nullable; -import org.springframework.tests.TimeStamped; import org.springframework.tests.aop.advice.CountingBeforeAdvice; import org.springframework.tests.aop.advice.MyThrowsHandler; import org.springframework.tests.aop.interceptor.NopInterceptor; @@ -58,7 +59,6 @@ import org.springframework.tests.sample.beans.ITestBean; import org.springframework.tests.sample.beans.Person; import org.springframework.tests.sample.beans.SideEffectBean; import org.springframework.tests.sample.beans.TestBean; -import org.springframework.util.SerializationTestUtils; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; diff --git a/spring-context/src/test/java/org/springframework/aop/framework/autoproxy/BeanNameAutoProxyCreatorTests.java b/spring-context/src/test/java/org/springframework/aop/framework/autoproxy/BeanNameAutoProxyCreatorTests.java index 1e1ba357f80..1af446bf16f 100644 --- a/spring-context/src/test/java/org/springframework/aop/framework/autoproxy/BeanNameAutoProxyCreatorTests.java +++ b/spring-context/src/test/java/org/springframework/aop/framework/autoproxy/BeanNameAutoProxyCreatorTests.java @@ -26,7 +26,7 @@ import org.springframework.aop.support.AopUtils; import org.springframework.beans.factory.BeanFactory; import org.springframework.beans.factory.FactoryBean; import org.springframework.context.support.ClassPathXmlApplicationContext; -import org.springframework.tests.TimeStamped; +import org.springframework.core.test.fixtures.TimeStamped; import org.springframework.tests.aop.advice.CountingBeforeAdvice; import org.springframework.tests.aop.interceptor.NopInterceptor; import org.springframework.tests.sample.beans.ITestBean; diff --git a/spring-context/src/test/java/org/springframework/aop/scope/ScopedProxyTests.java b/spring-context/src/test/java/org/springframework/aop/scope/ScopedProxyTests.java index ff966c8f9e3..82e9f010043 100644 --- a/spring-context/src/test/java/org/springframework/aop/scope/ScopedProxyTests.java +++ b/spring-context/src/test/java/org/springframework/aop/scope/ScopedProxyTests.java @@ -27,10 +27,10 @@ import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; import org.springframework.context.support.GenericApplicationContext; import org.springframework.core.io.ClassPathResource; +import org.springframework.core.test.fixtures.io.SerializationTestUtils; import org.springframework.tests.context.SimpleMapScope; import org.springframework.tests.sample.beans.ITestBean; import org.springframework.tests.sample.beans.TestBean; -import org.springframework.util.SerializationTestUtils; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-context/src/test/java/org/springframework/aop/target/CommonsPool2TargetSourceTests.java b/spring-context/src/test/java/org/springframework/aop/target/CommonsPool2TargetSourceTests.java index df0cec9921f..beb840ae6ca 100644 --- a/spring-context/src/test/java/org/springframework/aop/target/CommonsPool2TargetSourceTests.java +++ b/spring-context/src/test/java/org/springframework/aop/target/CommonsPool2TargetSourceTests.java @@ -27,10 +27,10 @@ import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; import org.springframework.context.support.StaticApplicationContext; import org.springframework.core.io.ClassPathResource; +import org.springframework.core.test.fixtures.io.SerializationTestUtils; import org.springframework.tests.sample.beans.Person; import org.springframework.tests.sample.beans.SerializablePerson; import org.springframework.tests.sample.beans.SideEffectBean; -import org.springframework.util.SerializationTestUtils; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; diff --git a/spring-context/src/test/java/org/springframework/beans/factory/xml/XmlBeanFactoryTests.java b/spring-context/src/test/java/org/springframework/beans/factory/xml/XmlBeanFactoryTests.java index f273716e553..d820baa1356 100644 --- a/spring-context/src/test/java/org/springframework/beans/factory/xml/XmlBeanFactoryTests.java +++ b/spring-context/src/test/java/org/springframework/beans/factory/xml/XmlBeanFactoryTests.java @@ -55,6 +55,7 @@ import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.FileSystemResource; import org.springframework.core.io.UrlResource; import org.springframework.core.io.support.EncodedResource; +import org.springframework.core.test.fixtures.io.SerializationTestUtils; import org.springframework.tests.sample.beans.DependenciesBean; import org.springframework.tests.sample.beans.DerivedTestBean; import org.springframework.tests.sample.beans.ITestBean; @@ -64,7 +65,6 @@ import org.springframework.tests.sample.beans.TestBean; import org.springframework.tests.sample.beans.factory.DummyFactory; import org.springframework.util.ClassUtils; import org.springframework.util.FileCopyUtils; -import org.springframework.util.SerializationTestUtils; import org.springframework.util.StopWatch; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-context/src/test/java/org/springframework/context/annotation/AnnotationProcessorPerformanceTests.java b/spring-context/src/test/java/org/springframework/context/annotation/AnnotationProcessorPerformanceTests.java index db76843b48a..bf789c11205 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/AnnotationProcessorPerformanceTests.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/AnnotationProcessorPerformanceTests.java @@ -34,13 +34,13 @@ import org.springframework.beans.factory.config.RuntimeBeanReference; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.support.RootBeanDefinition; import org.springframework.context.support.GenericApplicationContext; -import org.springframework.tests.Assume; -import org.springframework.tests.EnabledForTestGroups; +import org.springframework.core.test.fixtures.Assume; +import org.springframework.core.test.fixtures.EnabledForTestGroups; import org.springframework.tests.sample.beans.ITestBean; import org.springframework.tests.sample.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; -import static org.springframework.tests.TestGroup.PERFORMANCE; +import static org.springframework.core.test.fixtures.TestGroup.PERFORMANCE; /** * @author Juergen Hoeller diff --git a/spring-context/src/test/java/org/springframework/context/annotation/CommonAnnotationBeanPostProcessorTests.java b/spring-context/src/test/java/org/springframework/context/annotation/CommonAnnotationBeanPostProcessorTests.java index 646393f0d1f..96b9d1f7874 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/CommonAnnotationBeanPostProcessorTests.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/CommonAnnotationBeanPostProcessorTests.java @@ -37,13 +37,13 @@ import org.springframework.beans.factory.config.PropertyPlaceholderConfigurer; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.support.RootBeanDefinition; import org.springframework.context.support.GenericApplicationContext; +import org.springframework.core.test.fixtures.io.SerializationTestUtils; import org.springframework.jndi.support.SimpleJndiBeanFactory; import org.springframework.tests.mock.jndi.ExpectedLookupTemplate; import org.springframework.tests.sample.beans.INestedTestBean; import org.springframework.tests.sample.beans.ITestBean; import org.springframework.tests.sample.beans.NestedTestBean; import org.springframework.tests.sample.beans.TestBean; -import org.springframework.util.SerializationTestUtils; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-context/src/test/java/org/springframework/context/annotation/ComponentScanAnnotationIntegrationTests.java b/spring-context/src/test/java/org/springframework/context/annotation/ComponentScanAnnotationIntegrationTests.java index 86b60772928..4f13113e52f 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/ComponentScanAnnotationIntegrationTests.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/ComponentScanAnnotationIntegrationTests.java @@ -55,11 +55,11 @@ import org.springframework.core.env.ConfigurableEnvironment; import org.springframework.core.env.Environment; import org.springframework.core.env.Profiles; import org.springframework.core.io.ResourceLoader; +import org.springframework.core.test.fixtures.io.SerializationTestUtils; import org.springframework.core.type.classreading.MetadataReader; import org.springframework.core.type.classreading.MetadataReaderFactory; import org.springframework.core.type.filter.TypeFilter; import org.springframework.tests.context.SimpleMapScope; -import org.springframework.util.SerializationTestUtils; import static org.assertj.core.api.Assertions.assertThat; import static org.springframework.beans.factory.support.BeanDefinitionBuilder.genericBeanDefinition; diff --git a/spring-context/src/test/java/org/springframework/context/annotation/ComponentScanParserScopedProxyTests.java b/spring-context/src/test/java/org/springframework/context/annotation/ComponentScanParserScopedProxyTests.java index 67480997a35..4c3f6baef11 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/ComponentScanParserScopedProxyTests.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/ComponentScanParserScopedProxyTests.java @@ -23,8 +23,8 @@ import org.junit.jupiter.api.Test; import org.springframework.aop.support.AopUtils; import org.springframework.beans.factory.parsing.BeanDefinitionParsingException; import org.springframework.context.support.ClassPathXmlApplicationContext; +import org.springframework.core.test.fixtures.io.SerializationTestUtils; import org.springframework.tests.context.SimpleMapScope; -import org.springframework.util.SerializationTestUtils; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; diff --git a/spring-context/src/test/java/org/springframework/context/expression/ApplicationContextExpressionTests.java b/spring-context/src/test/java/org/springframework/context/expression/ApplicationContextExpressionTests.java index adf27cd2db6..0c1e65b76f8 100644 --- a/spring-context/src/test/java/org/springframework/context/expression/ApplicationContextExpressionTests.java +++ b/spring-context/src/test/java/org/springframework/context/expression/ApplicationContextExpressionTests.java @@ -51,15 +51,15 @@ import org.springframework.core.convert.support.GenericConversionService; import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.Resource; import org.springframework.core.io.support.EncodedResource; -import org.springframework.tests.Assume; -import org.springframework.tests.EnabledForTestGroups; +import org.springframework.core.test.fixtures.Assume; +import org.springframework.core.test.fixtures.EnabledForTestGroups; +import org.springframework.core.test.fixtures.io.SerializationTestUtils; import org.springframework.tests.sample.beans.TestBean; import org.springframework.util.FileCopyUtils; -import org.springframework.util.SerializationTestUtils; import org.springframework.util.StopWatch; import static org.assertj.core.api.Assertions.assertThat; -import static org.springframework.tests.TestGroup.PERFORMANCE; +import static org.springframework.core.test.fixtures.TestGroup.PERFORMANCE; /** * @author Juergen Hoeller diff --git a/spring-context/src/test/java/org/springframework/context/expression/EnvironmentAccessorIntegrationTests.java b/spring-context/src/test/java/org/springframework/context/expression/EnvironmentAccessorIntegrationTests.java index 5f4600e82a4..a68066125eb 100644 --- a/spring-context/src/test/java/org/springframework/context/expression/EnvironmentAccessorIntegrationTests.java +++ b/spring-context/src/test/java/org/springframework/context/expression/EnvironmentAccessorIntegrationTests.java @@ -21,7 +21,7 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.context.support.AbstractApplicationContext; import org.springframework.context.support.GenericApplicationContext; -import org.springframework.mock.env.MockPropertySource; +import org.springframework.core.test.fixtures.env.MockPropertySource; import org.springframework.tests.sample.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-context/src/test/java/org/springframework/context/support/DefaultLifecycleProcessorTests.java b/spring-context/src/test/java/org/springframework/context/support/DefaultLifecycleProcessorTests.java index 6538d05bc5f..f24be678c73 100644 --- a/spring-context/src/test/java/org/springframework/context/support/DefaultLifecycleProcessorTests.java +++ b/spring-context/src/test/java/org/springframework/context/support/DefaultLifecycleProcessorTests.java @@ -27,10 +27,10 @@ import org.springframework.beans.factory.support.RootBeanDefinition; import org.springframework.context.Lifecycle; import org.springframework.context.LifecycleProcessor; import org.springframework.context.SmartLifecycle; -import org.springframework.tests.EnabledForTestGroups; +import org.springframework.core.test.fixtures.EnabledForTestGroups; import static org.assertj.core.api.Assertions.assertThat; -import static org.springframework.tests.TestGroup.PERFORMANCE; +import static org.springframework.core.test.fixtures.TestGroup.PERFORMANCE; /** * @author Mark Fisher diff --git a/spring-context/src/test/java/org/springframework/context/support/EnvironmentSecurityManagerIntegrationTests.java b/spring-context/src/test/java/org/springframework/context/support/EnvironmentSecurityManagerIntegrationTests.java index 584f242e7d9..190ba795821 100644 --- a/spring-context/src/test/java/org/springframework/context/support/EnvironmentSecurityManagerIntegrationTests.java +++ b/spring-context/src/test/java/org/springframework/context/support/EnvironmentSecurityManagerIntegrationTests.java @@ -28,13 +28,12 @@ import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.context.annotation.AnnotatedBeanDefinitionReader; import org.springframework.context.annotation.Profile; import org.springframework.core.env.AbstractEnvironment; -import org.springframework.core.env.StandardEnvironmentTests; +import org.springframework.core.test.fixtures.env.EnvironmentTestUtils; import org.springframework.stereotype.Component; import static java.lang.String.format; import static org.assertj.core.api.Assertions.assertThat; - /** * Tests integration between Environment and SecurityManagers. See SPR-9970. * @@ -50,7 +49,7 @@ public class EnvironmentSecurityManagerIntegrationTests { @BeforeEach public void setUp() { originalSecurityManager = System.getSecurityManager(); - env = StandardEnvironmentTests.getModifiableSystemEnvironment(); + env = EnvironmentTestUtils.getModifiableSystemEnvironment(); env.put(AbstractEnvironment.ACTIVE_PROFILES_PROPERTY_NAME, "p1"); } diff --git a/spring-context/src/test/java/org/springframework/context/support/PropertySourcesPlaceholderConfigurerTests.java b/spring-context/src/test/java/org/springframework/context/support/PropertySourcesPlaceholderConfigurerTests.java index c08b49210eb..fb1f12ac195 100644 --- a/spring-context/src/test/java/org/springframework/context/support/PropertySourcesPlaceholderConfigurerTests.java +++ b/spring-context/src/test/java/org/springframework/context/support/PropertySourcesPlaceholderConfigurerTests.java @@ -29,8 +29,8 @@ import org.springframework.core.env.PropertySource; import org.springframework.core.env.StandardEnvironment; import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.Resource; +import org.springframework.core.test.fixtures.env.MockPropertySource; import org.springframework.mock.env.MockEnvironment; -import org.springframework.mock.env.MockPropertySource; import org.springframework.tests.sample.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-context/src/test/java/org/springframework/mock/env/MockEnvironment.java b/spring-context/src/test/java/org/springframework/mock/env/MockEnvironment.java index f518bd40c86..bb23db28d4a 100644 --- a/spring-context/src/test/java/org/springframework/mock/env/MockEnvironment.java +++ b/spring-context/src/test/java/org/springframework/mock/env/MockEnvironment.java @@ -18,6 +18,7 @@ package org.springframework.mock.env; import org.springframework.core.env.AbstractEnvironment; import org.springframework.core.env.ConfigurableEnvironment; +import org.springframework.core.test.fixtures.env.MockPropertySource; /** * Simple {@link ConfigurableEnvironment} implementation exposing diff --git a/spring-context/src/test/java/org/springframework/scheduling/annotation/EnableSchedulingTests.java b/spring-context/src/test/java/org/springframework/scheduling/annotation/EnableSchedulingTests.java index 6911a0b37e0..6a155d4cc89 100644 --- a/spring-context/src/test/java/org/springframework/scheduling/annotation/EnableSchedulingTests.java +++ b/spring-context/src/test/java/org/springframework/scheduling/annotation/EnableSchedulingTests.java @@ -26,16 +26,16 @@ import org.junit.jupiter.api.Test; import org.springframework.context.annotation.AnnotationConfigApplicationContext; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; +import org.springframework.core.test.fixtures.EnabledForTestGroups; import org.springframework.scheduling.TaskScheduler; import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler; import org.springframework.scheduling.config.IntervalTask; import org.springframework.scheduling.config.ScheduledTaskHolder; import org.springframework.scheduling.config.ScheduledTaskRegistrar; import org.springframework.scheduling.config.TaskManagementConfigUtils; -import org.springframework.tests.EnabledForTestGroups; import static org.assertj.core.api.Assertions.assertThat; -import static org.springframework.tests.TestGroup.PERFORMANCE; +import static org.springframework.core.test.fixtures.TestGroup.PERFORMANCE; /** * Tests use of @EnableScheduling on @Configuration classes. diff --git a/spring-context/src/test/java/org/springframework/scheduling/concurrent/ScheduledExecutorFactoryBeanTests.java b/spring-context/src/test/java/org/springframework/scheduling/concurrent/ScheduledExecutorFactoryBeanTests.java index cb3099cccec..c35995d0f6b 100644 --- a/spring-context/src/test/java/org/springframework/scheduling/concurrent/ScheduledExecutorFactoryBeanTests.java +++ b/spring-context/src/test/java/org/springframework/scheduling/concurrent/ScheduledExecutorFactoryBeanTests.java @@ -23,7 +23,7 @@ import java.util.concurrent.ThreadFactory; import org.junit.jupiter.api.Test; import org.springframework.core.task.NoOpRunnable; -import org.springframework.tests.EnabledForTestGroups; +import org.springframework.core.test.fixtures.EnabledForTestGroups; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException; @@ -32,7 +32,7 @@ import static org.mockito.Mockito.atLeast; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.never; import static org.mockito.Mockito.verify; -import static org.springframework.tests.TestGroup.PERFORMANCE; +import static org.springframework.core.test.fixtures.TestGroup.PERFORMANCE; /** * @author Rick Evans diff --git a/spring-context/src/test/java/org/springframework/scripting/support/ScriptFactoryPostProcessorTests.java b/spring-context/src/test/java/org/springframework/scripting/support/ScriptFactoryPostProcessorTests.java index 88adb4e7bdf..65c9bfdb5e6 100644 --- a/spring-context/src/test/java/org/springframework/scripting/support/ScriptFactoryPostProcessorTests.java +++ b/spring-context/src/test/java/org/springframework/scripting/support/ScriptFactoryPostProcessorTests.java @@ -24,16 +24,16 @@ import org.springframework.beans.factory.config.BeanDefinition; import org.springframework.beans.factory.support.BeanDefinitionBuilder; import org.springframework.context.support.ClassPathXmlApplicationContext; import org.springframework.context.support.GenericApplicationContext; +import org.springframework.core.test.fixtures.EnabledForTestGroups; import org.springframework.scripting.Messenger; import org.springframework.scripting.ScriptCompilationException; import org.springframework.scripting.groovy.GroovyScriptFactory; -import org.springframework.tests.EnabledForTestGroups; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; import static org.assertj.core.api.Assertions.assertThatIllegalStateException; import static org.mockito.Mockito.mock; -import static org.springframework.tests.TestGroup.PERFORMANCE; +import static org.springframework.core.test.fixtures.TestGroup.PERFORMANCE; /** * @author Rick Evans diff --git a/spring-context/src/test/java/org/springframework/validation/beanvalidation/SpringValidatorAdapterTests.java b/spring-context/src/test/java/org/springframework/validation/beanvalidation/SpringValidatorAdapterTests.java index 4e7eaf4d09f..0145e155b78 100644 --- a/spring-context/src/test/java/org/springframework/validation/beanvalidation/SpringValidatorAdapterTests.java +++ b/spring-context/src/test/java/org/springframework/validation/beanvalidation/SpringValidatorAdapterTests.java @@ -50,8 +50,8 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.BeanWrapper; import org.springframework.beans.BeanWrapperImpl; import org.springframework.context.support.StaticMessageSource; +import org.springframework.core.test.fixtures.io.SerializationTestUtils; import org.springframework.util.ObjectUtils; -import org.springframework.util.SerializationTestUtils; import org.springframework.validation.BeanPropertyBindingResult; import org.springframework.validation.FieldError; diff --git a/spring-context/src/test/kotlin/org/springframework/context/support/BeanDefinitionDslTests.kt b/spring-context/src/test/kotlin/org/springframework/context/support/BeanDefinitionDslTests.kt index f54c7c94625..d9fc98990ae 100644 --- a/spring-context/src/test/kotlin/org/springframework/context/support/BeanDefinitionDslTests.kt +++ b/spring-context/src/test/kotlin/org/springframework/context/support/BeanDefinitionDslTests.kt @@ -25,7 +25,7 @@ import org.springframework.beans.factory.getBean import org.springframework.context.support.BeanDefinitionDsl.* import org.springframework.core.env.SimpleCommandLinePropertySource import org.springframework.core.env.get -import org.springframework.mock.env.MockPropertySource +import org.springframework.core.test.fixtures.env.MockPropertySource import java.util.stream.Collectors @Suppress("UNUSED_EXPRESSION") diff --git a/spring-core/spring-core.gradle b/spring-core/spring-core.gradle index 48fd9976b50..a84b8e75370 100644 --- a/spring-core/spring-core.gradle +++ b/spring-core/spring-core.gradle @@ -60,6 +60,12 @@ dependencies { testCompile("javax.xml.bind:jaxb-api") testCompile("com.fasterxml.woodstox:woodstox-core") testCompile(project(":kotlin-coroutines")) + testFixturesApi("org.junit.jupiter:junit-jupiter-api") + testFixturesApi("org.junit.jupiter:junit-jupiter-params") + testFixturesImplementation("com.google.code.findbugs:jsr305") + testFixturesImplementation("io.projectreactor:reactor-test") + testFixturesImplementation("org.assertj:assertj-core") + testFixturesImplementation("org.xmlunit:xmlunit-assertj") } jar { diff --git a/spring-core/src/test/java/example/type/AspectJTypeFilterTestsTypes.java b/spring-core/src/test/java/example/type/AspectJTypeFilterTestsTypes.java index d4151647525..bf17886f9b7 100644 --- a/spring-core/src/test/java/example/type/AspectJTypeFilterTestsTypes.java +++ b/spring-core/src/test/java/example/type/AspectJTypeFilterTestsTypes.java @@ -16,7 +16,7 @@ package example.type; -import org.springframework.stereotype.Component; +import org.springframework.core.test.fixtures.stereotype.Component; /** * We must use a standalone set of types to ensure that no one else is loading diff --git a/spring-core/src/test/java/org/springframework/core/annotation/AnnotatedElementUtilsTests.java b/spring-core/src/test/java/org/springframework/core/annotation/AnnotatedElementUtilsTests.java index 1b1bc2b0f98..0aca2ed6077 100644 --- a/spring-core/src/test/java/org/springframework/core/annotation/AnnotatedElementUtilsTests.java +++ b/spring-core/src/test/java/org/springframework/core/annotation/AnnotatedElementUtilsTests.java @@ -42,10 +42,10 @@ import org.springframework.core.annotation.AnnotationUtilsTests.ExtendsBaseClass import org.springframework.core.annotation.AnnotationUtilsTests.ImplementsInterfaceWithGenericAnnotatedMethod; import org.springframework.core.annotation.AnnotationUtilsTests.WebController; import org.springframework.core.annotation.AnnotationUtilsTests.WebMapping; +import org.springframework.core.test.fixtures.stereotype.Component; +import org.springframework.core.test.fixtures.stereotype.Indexed; import org.springframework.lang.NonNullApi; import org.springframework.lang.Nullable; -import org.springframework.stereotype.Component; -import org.springframework.stereotype.Indexed; import org.springframework.util.MultiValueMap; import static java.util.Arrays.asList; diff --git a/spring-core/src/test/java/org/springframework/core/annotation/AnnotationUtilsTests.java b/spring-core/src/test/java/org/springframework/core/annotation/AnnotationUtilsTests.java index 6270f108841..78ec17e6b8c 100644 --- a/spring-core/src/test/java/org/springframework/core/annotation/AnnotationUtilsTests.java +++ b/spring-core/src/test/java/org/springframework/core/annotation/AnnotationUtilsTests.java @@ -39,8 +39,8 @@ import org.junit.jupiter.api.Test; import org.springframework.core.Ordered; import org.springframework.core.annotation.subpackage.NonPublicAnnotatedClass; +import org.springframework.core.test.fixtures.stereotype.Component; import org.springframework.lang.NonNullApi; -import org.springframework.stereotype.Component; import static java.util.Arrays.asList; import static java.util.Arrays.stream; @@ -928,7 +928,7 @@ class AnnotationUtilsTests { Map map = Collections.singletonMap(VALUE, 42L); assertThatIllegalStateException().isThrownBy(() -> synthesizeAnnotation(map, Component.class, null).value()) - .withMessageContaining("Attribute 'value' in annotation org.springframework.stereotype.Component " + .withMessageContaining("Attribute 'value' in annotation org.springframework.core.test.fixtures.stereotype.Component " + "should be compatible with java.lang.String but a java.lang.Long value was returned"); } diff --git a/spring-core/src/test/java/org/springframework/core/annotation/MergedAnnotationsTests.java b/spring-core/src/test/java/org/springframework/core/annotation/MergedAnnotationsTests.java index 6241039c40f..956f93f549a 100644 --- a/spring-core/src/test/java/org/springframework/core/annotation/MergedAnnotationsTests.java +++ b/spring-core/src/test/java/org/springframework/core/annotation/MergedAnnotationsTests.java @@ -43,9 +43,9 @@ import org.springframework.core.Ordered; import org.springframework.core.annotation.MergedAnnotation.Adapt; import org.springframework.core.annotation.MergedAnnotations.SearchStrategy; import org.springframework.core.annotation.subpackage.NonPublicAnnotatedClass; +import org.springframework.core.test.fixtures.stereotype.Component; +import org.springframework.core.test.fixtures.stereotype.Indexed; import org.springframework.lang.Nullable; -import org.springframework.stereotype.Component; -import org.springframework.stereotype.Indexed; import org.springframework.util.ClassUtils; import org.springframework.util.MultiValueMap; import org.springframework.util.ReflectionUtils; @@ -1770,7 +1770,7 @@ class MergedAnnotationsTests { MergedAnnotation annotation = MergedAnnotation.of(Component.class, map); assertThatIllegalStateException().isThrownBy(() -> annotation.synthesize().value()) .withMessage("Attribute 'value' in annotation " + - "org.springframework.stereotype.Component should be " + + "org.springframework.core.test.fixtures.stereotype.Component should be " + "compatible with java.lang.String but a java.lang.Long value was returned"); } diff --git a/spring-core/src/test/java/org/springframework/core/codec/ByteArrayDecoderTests.java b/spring-core/src/test/java/org/springframework/core/codec/ByteArrayDecoderTests.java index 1eb50b011b9..c41874ef083 100644 --- a/spring-core/src/test/java/org/springframework/core/codec/ByteArrayDecoderTests.java +++ b/spring-core/src/test/java/org/springframework/core/codec/ByteArrayDecoderTests.java @@ -24,6 +24,7 @@ import reactor.core.publisher.Flux; import org.springframework.core.ResolvableType; import org.springframework.core.io.buffer.DataBuffer; +import org.springframework.core.test.fixtures.codec.AbstractDecoderTests; import org.springframework.util.MimeTypeUtils; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-core/src/test/java/org/springframework/core/codec/ByteArrayEncoderTests.java b/spring-core/src/test/java/org/springframework/core/codec/ByteArrayEncoderTests.java index 2c44c1a8381..12d40d64aad 100644 --- a/spring-core/src/test/java/org/springframework/core/codec/ByteArrayEncoderTests.java +++ b/spring-core/src/test/java/org/springframework/core/codec/ByteArrayEncoderTests.java @@ -22,6 +22,7 @@ import org.junit.jupiter.api.Test; import reactor.core.publisher.Flux; import org.springframework.core.ResolvableType; +import org.springframework.core.test.fixtures.codec.AbstractEncoderTests; import org.springframework.util.MimeTypeUtils; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-core/src/test/java/org/springframework/core/codec/ByteBufferDecoderTests.java b/spring-core/src/test/java/org/springframework/core/codec/ByteBufferDecoderTests.java index 2563ff8c9fa..1d0215ee58e 100644 --- a/spring-core/src/test/java/org/springframework/core/codec/ByteBufferDecoderTests.java +++ b/spring-core/src/test/java/org/springframework/core/codec/ByteBufferDecoderTests.java @@ -25,6 +25,7 @@ import reactor.core.publisher.Flux; import org.springframework.core.ResolvableType; import org.springframework.core.io.buffer.DataBuffer; +import org.springframework.core.test.fixtures.codec.AbstractDecoderTests; import org.springframework.util.MimeTypeUtils; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-core/src/test/java/org/springframework/core/codec/ByteBufferEncoderTests.java b/spring-core/src/test/java/org/springframework/core/codec/ByteBufferEncoderTests.java index aa18e0e1ecf..066aa9051d9 100644 --- a/spring-core/src/test/java/org/springframework/core/codec/ByteBufferEncoderTests.java +++ b/spring-core/src/test/java/org/springframework/core/codec/ByteBufferEncoderTests.java @@ -23,6 +23,7 @@ import org.junit.jupiter.api.Test; import reactor.core.publisher.Flux; import org.springframework.core.ResolvableType; +import org.springframework.core.test.fixtures.codec.AbstractEncoderTests; import org.springframework.util.MimeTypeUtils; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-core/src/test/java/org/springframework/core/codec/CharSequenceEncoderTests.java b/spring-core/src/test/java/org/springframework/core/codec/CharSequenceEncoderTests.java index c0a85d0816c..6356dfc810e 100644 --- a/spring-core/src/test/java/org/springframework/core/codec/CharSequenceEncoderTests.java +++ b/spring-core/src/test/java/org/springframework/core/codec/CharSequenceEncoderTests.java @@ -23,6 +23,7 @@ import org.junit.jupiter.api.Test; import reactor.core.publisher.Flux; import org.springframework.core.ResolvableType; +import org.springframework.core.test.fixtures.codec.AbstractEncoderTests; import org.springframework.util.MimeTypeUtils; import static java.nio.charset.StandardCharsets.ISO_8859_1; diff --git a/spring-core/src/test/java/org/springframework/core/codec/DataBufferDecoderTests.java b/spring-core/src/test/java/org/springframework/core/codec/DataBufferDecoderTests.java index efde8b15eb7..ec0ccdda086 100644 --- a/spring-core/src/test/java/org/springframework/core/codec/DataBufferDecoderTests.java +++ b/spring-core/src/test/java/org/springframework/core/codec/DataBufferDecoderTests.java @@ -25,6 +25,7 @@ import reactor.core.publisher.Flux; import org.springframework.core.ResolvableType; import org.springframework.core.io.buffer.DataBuffer; import org.springframework.core.io.buffer.DataBufferUtils; +import org.springframework.core.test.fixtures.codec.AbstractDecoderTests; import org.springframework.util.MimeTypeUtils; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-core/src/test/java/org/springframework/core/codec/DataBufferEncoderTests.java b/spring-core/src/test/java/org/springframework/core/codec/DataBufferEncoderTests.java index c9322af3c7e..cb6242c7182 100644 --- a/spring-core/src/test/java/org/springframework/core/codec/DataBufferEncoderTests.java +++ b/spring-core/src/test/java/org/springframework/core/codec/DataBufferEncoderTests.java @@ -24,6 +24,7 @@ import reactor.core.publisher.Mono; import org.springframework.core.ResolvableType; import org.springframework.core.io.buffer.DataBuffer; +import org.springframework.core.test.fixtures.codec.AbstractEncoderTests; import org.springframework.util.MimeTypeUtils; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-core/src/test/java/org/springframework/core/codec/ResourceDecoderTests.java b/spring-core/src/test/java/org/springframework/core/codec/ResourceDecoderTests.java index f05b34fbbbb..409d9c693e9 100644 --- a/spring-core/src/test/java/org/springframework/core/codec/ResourceDecoderTests.java +++ b/spring-core/src/test/java/org/springframework/core/codec/ResourceDecoderTests.java @@ -28,6 +28,7 @@ import org.springframework.core.io.ByteArrayResource; import org.springframework.core.io.InputStreamResource; import org.springframework.core.io.Resource; import org.springframework.core.io.buffer.DataBuffer; +import org.springframework.core.test.fixtures.codec.AbstractDecoderTests; import org.springframework.util.MimeTypeUtils; import org.springframework.util.StreamUtils; diff --git a/spring-core/src/test/java/org/springframework/core/codec/ResourceEncoderTests.java b/spring-core/src/test/java/org/springframework/core/codec/ResourceEncoderTests.java index 193c705a7ad..b99bcb3812c 100644 --- a/spring-core/src/test/java/org/springframework/core/codec/ResourceEncoderTests.java +++ b/spring-core/src/test/java/org/springframework/core/codec/ResourceEncoderTests.java @@ -28,6 +28,7 @@ import org.springframework.core.io.ByteArrayResource; import org.springframework.core.io.InputStreamResource; import org.springframework.core.io.Resource; import org.springframework.core.io.buffer.DataBuffer; +import org.springframework.core.test.fixtures.codec.AbstractEncoderTests; import org.springframework.lang.Nullable; import org.springframework.util.MimeType; import org.springframework.util.MimeTypeUtils; diff --git a/spring-core/src/test/java/org/springframework/core/codec/ResourceRegionEncoderTests.java b/spring-core/src/test/java/org/springframework/core/codec/ResourceRegionEncoderTests.java index ce83d5bebdf..8148ecf64e0 100644 --- a/spring-core/src/test/java/org/springframework/core/codec/ResourceRegionEncoderTests.java +++ b/spring-core/src/test/java/org/springframework/core/codec/ResourceRegionEncoderTests.java @@ -29,11 +29,11 @@ import reactor.test.StepVerifier; import org.springframework.core.ResolvableType; import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.Resource; -import org.springframework.core.io.buffer.AbstractLeakCheckingTests; import org.springframework.core.io.buffer.DataBuffer; import org.springframework.core.io.buffer.DataBufferUtils; -import org.springframework.core.io.buffer.support.DataBufferTestUtils; import org.springframework.core.io.support.ResourceRegion; +import org.springframework.core.test.fixtures.io.buffer.AbstractLeakCheckingTests; +import org.springframework.core.test.fixtures.io.buffer.DataBufferTestUtils; import org.springframework.util.MimeType; import org.springframework.util.MimeTypeUtils; diff --git a/spring-core/src/test/java/org/springframework/core/codec/StringDecoderTests.java b/spring-core/src/test/java/org/springframework/core/codec/StringDecoderTests.java index a17ae084c2f..bcfc43b498f 100644 --- a/spring-core/src/test/java/org/springframework/core/codec/StringDecoderTests.java +++ b/spring-core/src/test/java/org/springframework/core/codec/StringDecoderTests.java @@ -30,6 +30,7 @@ import reactor.test.StepVerifier; import org.springframework.core.ResolvableType; import org.springframework.core.io.buffer.DataBuffer; import org.springframework.core.io.buffer.DataBufferLimitException; +import org.springframework.core.test.fixtures.codec.AbstractDecoderTests; import org.springframework.util.MimeType; import org.springframework.util.MimeTypeUtils; diff --git a/spring-core/src/test/java/org/springframework/core/convert/converter/DefaultConversionServiceTests.java b/spring-core/src/test/java/org/springframework/core/convert/converter/DefaultConversionServiceTests.java index 8deb6d3f3cf..f5a932bacbd 100644 --- a/spring-core/src/test/java/org/springframework/core/convert/converter/DefaultConversionServiceTests.java +++ b/spring-core/src/test/java/org/springframework/core/convert/converter/DefaultConversionServiceTests.java @@ -51,13 +51,13 @@ import org.springframework.core.convert.ConversionFailedException; import org.springframework.core.convert.ConverterNotFoundException; import org.springframework.core.convert.TypeDescriptor; import org.springframework.core.convert.support.DefaultConversionService; -import org.springframework.tests.EnabledForTestGroups; +import org.springframework.core.test.fixtures.EnabledForTestGroups; import org.springframework.util.ClassUtils; import org.springframework.util.StopWatch; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; -import static org.springframework.tests.TestGroup.PERFORMANCE; +import static org.springframework.core.test.fixtures.TestGroup.PERFORMANCE; /** * Unit tests for {@link DefaultConversionService}. diff --git a/spring-core/src/test/java/org/springframework/core/convert/support/GenericConversionServiceTests.java b/spring-core/src/test/java/org/springframework/core/convert/support/GenericConversionServiceTests.java index a91c64bb320..fd2271d26f6 100644 --- a/spring-core/src/test/java/org/springframework/core/convert/support/GenericConversionServiceTests.java +++ b/spring-core/src/test/java/org/springframework/core/convert/support/GenericConversionServiceTests.java @@ -43,8 +43,8 @@ import org.springframework.core.convert.converter.ConverterFactory; import org.springframework.core.convert.converter.GenericConverter; import org.springframework.core.io.DescriptiveResource; import org.springframework.core.io.Resource; +import org.springframework.core.test.fixtures.EnabledForTestGroups; import org.springframework.lang.Nullable; -import org.springframework.tests.EnabledForTestGroups; import org.springframework.util.StopWatch; import org.springframework.util.StringUtils; @@ -54,7 +54,7 @@ import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException; import static org.assertj.core.api.Assertions.assertThatIllegalStateException; -import static org.springframework.tests.TestGroup.PERFORMANCE; +import static org.springframework.core.test.fixtures.TestGroup.PERFORMANCE; /** * Unit tests for {@link GenericConversionService}. diff --git a/spring-core/src/test/java/org/springframework/core/env/MutablePropertySourcesTests.java b/spring-core/src/test/java/org/springframework/core/env/MutablePropertySourcesTests.java index fa79f180440..9d04dcbd246 100644 --- a/spring-core/src/test/java/org/springframework/core/env/MutablePropertySourcesTests.java +++ b/spring-core/src/test/java/org/springframework/core/env/MutablePropertySourcesTests.java @@ -20,7 +20,7 @@ import java.util.Iterator; import org.junit.jupiter.api.Test; -import org.springframework.mock.env.MockPropertySource; +import org.springframework.core.test.fixtures.env.MockPropertySource; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; diff --git a/spring-core/src/test/java/org/springframework/core/env/PropertySourcesPropertyResolverTests.java b/spring-core/src/test/java/org/springframework/core/env/PropertySourcesPropertyResolverTests.java index d3eaa2804fb..bed53fce1f4 100644 --- a/spring-core/src/test/java/org/springframework/core/env/PropertySourcesPropertyResolverTests.java +++ b/spring-core/src/test/java/org/springframework/core/env/PropertySourcesPropertyResolverTests.java @@ -24,7 +24,7 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.springframework.core.convert.ConverterNotFoundException; -import org.springframework.mock.env.MockPropertySource; +import org.springframework.core.test.fixtures.env.MockPropertySource; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; diff --git a/spring-core/src/test/java/org/springframework/core/env/StandardEnvironmentTests.java b/spring-core/src/test/java/org/springframework/core/env/StandardEnvironmentTests.java index f7218b9c48b..24bb7143ebe 100644 --- a/spring-core/src/test/java/org/springframework/core/env/StandardEnvironmentTests.java +++ b/spring-core/src/test/java/org/springframework/core/env/StandardEnvironmentTests.java @@ -16,17 +16,16 @@ package org.springframework.core.env; -import java.lang.reflect.Field; import java.security.AccessControlException; import java.security.Permission; import java.util.Arrays; -import java.util.Collections; import java.util.Map; import org.junit.jupiter.api.Test; import org.springframework.core.SpringProperties; -import org.springframework.mock.env.MockPropertySource; +import org.springframework.core.test.fixtures.env.EnvironmentTestUtils; +import org.springframework.core.test.fixtures.env.MockPropertySource; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException; @@ -465,8 +464,8 @@ public class StandardEnvironmentTests { @Test void getSystemEnvironment_withAndWithoutSecurityManager() { - getModifiableSystemEnvironment().put(ALLOWED_PROPERTY_NAME, ALLOWED_PROPERTY_VALUE); - getModifiableSystemEnvironment().put(DISALLOWED_PROPERTY_NAME, DISALLOWED_PROPERTY_VALUE); + EnvironmentTestUtils.getModifiableSystemEnvironment().put(ALLOWED_PROPERTY_NAME, ALLOWED_PROPERTY_VALUE); + EnvironmentTestUtils.getModifiableSystemEnvironment().put(DISALLOWED_PROPERTY_NAME, DISALLOWED_PROPERTY_VALUE); { Map systemEnvironment = environment.getSystemEnvironment(); @@ -500,68 +499,8 @@ public class StandardEnvironmentTests { } System.setSecurityManager(oldSecurityManager); - getModifiableSystemEnvironment().remove(ALLOWED_PROPERTY_NAME); - getModifiableSystemEnvironment().remove(DISALLOWED_PROPERTY_NAME); - } - - - @SuppressWarnings("unchecked") - public static Map getModifiableSystemEnvironment() { - // for os x / linux - Class[] classes = Collections.class.getDeclaredClasses(); - Map env = System.getenv(); - for (Class cl : classes) { - if ("java.util.Collections$UnmodifiableMap".equals(cl.getName())) { - try { - Field field = cl.getDeclaredField("m"); - field.setAccessible(true); - Object obj = field.get(env); - if (obj != null && obj.getClass().getName().equals("java.lang.ProcessEnvironment$StringEnvironment")) { - return (Map) obj; - } - } - catch (Exception ex) { - throw new RuntimeException(ex); - } - } - } - - // for windows - Class processEnvironmentClass; - try { - processEnvironmentClass = Class.forName("java.lang.ProcessEnvironment"); - } - catch (Exception ex) { - throw new IllegalStateException(ex); - } - - try { - Field theCaseInsensitiveEnvironmentField = processEnvironmentClass.getDeclaredField("theCaseInsensitiveEnvironment"); - theCaseInsensitiveEnvironmentField.setAccessible(true); - Object obj = theCaseInsensitiveEnvironmentField.get(null); - return (Map) obj; - } - catch (NoSuchFieldException ex) { - // do nothing - } - catch (Exception ex) { - throw new IllegalStateException(ex); - } - - try { - Field theEnvironmentField = processEnvironmentClass.getDeclaredField("theEnvironment"); - theEnvironmentField.setAccessible(true); - Object obj = theEnvironmentField.get(null); - return (Map) obj; - } - catch (NoSuchFieldException ex) { - // do nothing - } - catch (Exception ex) { - throw new IllegalStateException(ex); - } - - throw new IllegalStateException(); + EnvironmentTestUtils.getModifiableSystemEnvironment().remove(ALLOWED_PROPERTY_NAME); + EnvironmentTestUtils.getModifiableSystemEnvironment().remove(DISALLOWED_PROPERTY_NAME); } } diff --git a/spring-core/src/test/java/org/springframework/core/io/buffer/DataBufferTests.java b/spring-core/src/test/java/org/springframework/core/io/buffer/DataBufferTests.java index f39c87d445e..2d006cd45a7 100644 --- a/spring-core/src/test/java/org/springframework/core/io/buffer/DataBufferTests.java +++ b/spring-core/src/test/java/org/springframework/core/io/buffer/DataBufferTests.java @@ -22,6 +22,8 @@ import java.nio.ByteBuffer; import java.nio.charset.StandardCharsets; import java.util.Arrays; +import org.springframework.core.test.fixtures.io.buffer.AbstractDataBufferAllocatingTests; + import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException; diff --git a/spring-core/src/test/java/org/springframework/core/io/buffer/DataBufferUtilsTests.java b/spring-core/src/test/java/org/springframework/core/io/buffer/DataBufferUtilsTests.java index 27067179cdc..168a6df23e8 100644 --- a/spring-core/src/test/java/org/springframework/core/io/buffer/DataBufferUtilsTests.java +++ b/spring-core/src/test/java/org/springframework/core/io/buffer/DataBufferUtilsTests.java @@ -45,7 +45,8 @@ import reactor.test.StepVerifier; import org.springframework.core.io.ByteArrayResource; import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.Resource; -import org.springframework.core.io.buffer.support.DataBufferTestUtils; +import org.springframework.core.test.fixtures.io.buffer.AbstractDataBufferAllocatingTests; +import org.springframework.core.test.fixtures.io.buffer.DataBufferTestUtils; import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.ArgumentMatchers.any; diff --git a/spring-core/src/test/java/org/springframework/core/io/buffer/LeakAwareDataBufferFactoryTests.java b/spring-core/src/test/java/org/springframework/core/io/buffer/LeakAwareDataBufferFactoryTests.java index ef329ea62bb..37d941dde6f 100644 --- a/spring-core/src/test/java/org/springframework/core/io/buffer/LeakAwareDataBufferFactoryTests.java +++ b/spring-core/src/test/java/org/springframework/core/io/buffer/LeakAwareDataBufferFactoryTests.java @@ -18,6 +18,8 @@ package org.springframework.core.io.buffer; import org.junit.jupiter.api.Test; +import org.springframework.core.test.fixtures.io.buffer.LeakAwareDataBufferFactory; + import static org.assertj.core.api.Assertions.assertThatExceptionOfType; import static org.springframework.core.io.buffer.DataBufferUtils.release; diff --git a/spring-core/src/test/java/org/springframework/core/io/buffer/support/DataBufferTestUtilsTests.java b/spring-core/src/test/java/org/springframework/core/io/buffer/support/DataBufferTestUtilsTests.java index 5100feb3ffc..576df265588 100644 --- a/spring-core/src/test/java/org/springframework/core/io/buffer/support/DataBufferTestUtilsTests.java +++ b/spring-core/src/test/java/org/springframework/core/io/buffer/support/DataBufferTestUtilsTests.java @@ -18,9 +18,10 @@ package org.springframework.core.io.buffer.support; import java.nio.charset.StandardCharsets; -import org.springframework.core.io.buffer.AbstractDataBufferAllocatingTests; import org.springframework.core.io.buffer.DataBuffer; import org.springframework.core.io.buffer.DataBufferFactory; +import org.springframework.core.test.fixtures.io.buffer.AbstractDataBufferAllocatingTests; +import org.springframework.core.test.fixtures.io.buffer.DataBufferTestUtils; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-core/src/test/java/org/springframework/tests/TestGroupTests.java b/spring-core/src/test/java/org/springframework/core/test/fixtures/TestGroupParsingTests.java similarity index 95% rename from spring-core/src/test/java/org/springframework/tests/TestGroupTests.java rename to spring-core/src/test/java/org/springframework/core/test/fixtures/TestGroupParsingTests.java index 5377c4b5f74..097fd19c8c7 100644 --- a/spring-core/src/test/java/org/springframework/tests/TestGroupTests.java +++ b/spring-core/src/test/java/org/springframework/core/test/fixtures/TestGroupParsingTests.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.tests; +package org.springframework.core.test.fixtures; import java.util.Collections; import java.util.EnumSet; @@ -26,12 +26,12 @@ import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException; /** - * Tests for {@link TestGroup}. + * Tests for {@link TestGroup} parsing. * * @author Phillip Webb * @author Sam Brannen */ -class TestGroupTests { +class TestGroupParsingTests { @Test void parseNull() { diff --git a/spring-core/src/test/java/org/springframework/tests/AssumeTests.java b/spring-core/src/test/java/org/springframework/core/test/fixtures/TestGroupTests.java similarity index 76% rename from spring-core/src/test/java/org/springframework/tests/AssumeTests.java rename to spring-core/src/test/java/org/springframework/core/test/fixtures/TestGroupTests.java index f077ffe6170..84eda4984c5 100644 --- a/spring-core/src/test/java/org/springframework/tests/AssumeTests.java +++ b/spring-core/src/test/java/org/springframework/core/test/fixtures/TestGroupTests.java @@ -14,9 +14,10 @@ * limitations under the License. */ -package org.springframework.tests; +package org.springframework.core.test.fixtures; import java.util.Arrays; +import java.util.Set; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; @@ -28,17 +29,20 @@ import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatCode; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; import static org.assertj.core.api.Assertions.assertThatIllegalStateException; -import static org.springframework.tests.Assume.TEST_GROUPS_SYSTEM_PROPERTY; -import static org.springframework.tests.TestGroup.LONG_RUNNING; -import static org.springframework.tests.TestGroup.PERFORMANCE; +import static org.junit.jupiter.api.Assumptions.assumeTrue; +import static org.springframework.core.test.fixtures.TestGroup.LONG_RUNNING; +import static org.springframework.core.test.fixtures.TestGroup.PERFORMANCE; /** - * Tests for {@link Assume}. + * Tests for {@link TestGroup}. * * @author Sam Brannen * @since 5.0 */ -class AssumeTests { +class TestGroupTests { + + private static final String TEST_GROUPS_SYSTEM_PROPERTY = "testGroups"; + private String originalTestGroups; @@ -59,25 +63,22 @@ class AssumeTests { } @Test - @SuppressWarnings("deprecation") void assumeGroupWithNoActiveTestGroups() { setTestGroups(""); - assertThatExceptionOfType(TestAbortedException.class).isThrownBy(() -> Assume.group(LONG_RUNNING)); + assertThatExceptionOfType(TestAbortedException.class).isThrownBy(() -> assumeGroup(LONG_RUNNING)); } @Test - @SuppressWarnings("deprecation") void assumeGroupWithNoMatchingActiveTestGroup() { setTestGroups(PERFORMANCE); - assertThatExceptionOfType(TestAbortedException.class).isThrownBy(() -> Assume.group(LONG_RUNNING)); + assertThatExceptionOfType(TestAbortedException.class).isThrownBy(() -> assumeGroup(LONG_RUNNING)); } @Test - @SuppressWarnings("deprecation") void assumeGroupWithMatchingActiveTestGroup() { setTestGroups(LONG_RUNNING); - assertThatCode(() -> Assume.group(LONG_RUNNING)) + assertThatCode(() -> assumeGroup(LONG_RUNNING)) .as("assumption should NOT have failed") .doesNotThrowAnyException(); } @@ -92,7 +93,6 @@ class AssumeTests { assertBogusActiveTestGroupBehavior("all-bogus"); } - @SuppressWarnings("deprecation") private void assertBogusActiveTestGroupBehavior(String testGroups) { // Should result in something similar to the following: // @@ -102,7 +102,7 @@ class AssumeTests { setTestGroups(testGroups); assertThatIllegalStateException() - .isThrownBy(() -> Assume.group(LONG_RUNNING)) + .isThrownBy(() -> assumeGroup(LONG_RUNNING)) .withMessageStartingWith("Failed to parse '" + TEST_GROUPS_SYSTEM_PROPERTY + "' system property: ") .withCauseInstanceOf(IllegalArgumentException.class) .satisfies(ex -> @@ -119,4 +119,15 @@ class AssumeTests { System.setProperty(TEST_GROUPS_SYSTEM_PROPERTY, testGroups); } + /** + * Assume that a particular {@link TestGroup} is active. + * @param group the group that must be active + * @throws org.opentest4j.TestAbortedException if the assumption fails + */ + private static void assumeGroup(TestGroup group) { + Set testGroups = TestGroup.loadTestGroups(); + assumeTrue(testGroups.contains(group), + () -> "Requires inactive test group " + group + "; active test groups: " + testGroups); + } + } diff --git a/spring-core/src/test/java/org/springframework/core/type/AnnotationMetadataTests.java b/spring-core/src/test/java/org/springframework/core/type/AnnotationMetadataTests.java index 571440dfaa7..0881e55de54 100644 --- a/spring-core/src/test/java/org/springframework/core/type/AnnotationMetadataTests.java +++ b/spring-core/src/test/java/org/springframework/core/type/AnnotationMetadataTests.java @@ -33,10 +33,10 @@ import org.junit.jupiter.api.Test; import org.springframework.core.annotation.AliasFor; import org.springframework.core.annotation.AnnotationAttributes; +import org.springframework.core.test.fixtures.stereotype.Component; import org.springframework.core.type.classreading.MetadataReader; import org.springframework.core.type.classreading.MetadataReaderFactory; import org.springframework.core.type.classreading.SimpleMetadataReaderFactory; -import org.springframework.stereotype.Component; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-core/src/test/java/org/springframework/core/type/AnnotationTypeFilterTests.java b/spring-core/src/test/java/org/springframework/core/type/AnnotationTypeFilterTests.java index 0fc09ecdf4f..d1c7d1652f6 100644 --- a/spring-core/src/test/java/org/springframework/core/type/AnnotationTypeFilterTests.java +++ b/spring-core/src/test/java/org/springframework/core/type/AnnotationTypeFilterTests.java @@ -21,11 +21,11 @@ import example.type.InheritedAnnotation; import example.type.NonInheritedAnnotation; import org.junit.jupiter.api.Test; +import org.springframework.core.test.fixtures.stereotype.Component; import org.springframework.core.type.classreading.MetadataReader; import org.springframework.core.type.classreading.MetadataReaderFactory; import org.springframework.core.type.classreading.SimpleMetadataReaderFactory; import org.springframework.core.type.filter.AnnotationTypeFilter; -import org.springframework.stereotype.Component; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-core/src/test/java/org/springframework/core/type/AspectJTypeFilterTests.java b/spring-core/src/test/java/org/springframework/core/type/AspectJTypeFilterTests.java index f1fc05a2082..a3dfed9fcc9 100644 --- a/spring-core/src/test/java/org/springframework/core/type/AspectJTypeFilterTests.java +++ b/spring-core/src/test/java/org/springframework/core/type/AspectJTypeFilterTests.java @@ -88,7 +88,7 @@ class AspectJTypeFilterTests { @Test void annotationPatternMatches() throws Exception { assertMatch("example.type.AspectJTypeFilterTestsTypes$SomeClassAnnotatedWithComponent", - "@org.springframework.stereotype.Component *..*"); + "@org.springframework.core.test.fixtures.stereotype.Component *..*"); assertMatch("example.type.AspectJTypeFilterTestsTypes$SomeClassAnnotatedWithComponent", "@* *..*"); assertMatch("example.type.AspectJTypeFilterTestsTypes$SomeClassAnnotatedWithComponent", @@ -96,9 +96,9 @@ class AspectJTypeFilterTests { assertMatch("example.type.AspectJTypeFilterTestsTypes$SomeClassAnnotatedWithComponent", "@*..*Component *..*"); assertMatch("example.type.AspectJTypeFilterTestsTypes$SomeClassAnnotatedWithComponent", - "@org.springframework.stereotype.Component *..*Component"); + "@org.springframework.core.test.fixtures.stereotype.Component *..*Component"); assertMatch("example.type.AspectJTypeFilterTestsTypes$SomeClassAnnotatedWithComponent", - "@org.springframework.stereotype.Component *"); + "@org.springframework.core.test.fixtures.stereotype.Component *"); } @Test diff --git a/spring-core/src/test/java/org/springframework/core/type/CachingMetadataReaderLeakTests.java b/spring-core/src/test/java/org/springframework/core/type/CachingMetadataReaderLeakTests.java index 9f61f132828..405a742034b 100644 --- a/spring-core/src/test/java/org/springframework/core/type/CachingMetadataReaderLeakTests.java +++ b/spring-core/src/test/java/org/springframework/core/type/CachingMetadataReaderLeakTests.java @@ -22,13 +22,13 @@ import org.junit.jupiter.api.Test; import org.springframework.core.io.Resource; import org.springframework.core.io.UrlResource; +import org.springframework.core.test.fixtures.EnabledForTestGroups; import org.springframework.core.type.classreading.CachingMetadataReaderFactory; import org.springframework.core.type.classreading.MetadataReader; import org.springframework.core.type.classreading.MetadataReaderFactory; -import org.springframework.tests.EnabledForTestGroups; import static org.assertj.core.api.Assertions.assertThat; -import static org.springframework.tests.TestGroup.LONG_RUNNING; +import static org.springframework.core.test.fixtures.TestGroup.LONG_RUNNING; /** * Unit tests for checking the behaviour of {@link CachingMetadataReaderFactory} under diff --git a/spring-core/src/test/java/org/springframework/core/type/Scope.java b/spring-core/src/test/java/org/springframework/core/type/Scope.java index 0a169a2e5f5..eb581928a96 100644 --- a/spring-core/src/test/java/org/springframework/core/type/Scope.java +++ b/spring-core/src/test/java/org/springframework/core/type/Scope.java @@ -16,21 +16,18 @@ package org.springframework.core.type; -import java.lang.annotation.Documented; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; -@Target({ElementType.TYPE, ElementType.METHOD}) +/** + * Copy of the {@code @Scope} annotation for testing purposes. + */ +@Target({ ElementType.TYPE, ElementType.METHOD }) @Retention(RetentionPolicy.RUNTIME) -@Documented public @interface Scope { - /** - * Specifies the scope to use for instances of the annotated class. - * @return the desired scope - */ String value() default "singleton"; } diff --git a/spring-core/src/test/java/org/springframework/tests/Assume.java b/spring-core/src/test/java/org/springframework/tests/Assume.java deleted file mode 100644 index 76503c01b2c..00000000000 --- a/spring-core/src/test/java/org/springframework/tests/Assume.java +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright 2002-2019 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. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.tests; - -import java.util.Set; - -import org.apache.commons.logging.Log; - -import static org.junit.jupiter.api.Assumptions.assumeFalse; -import static org.junit.jupiter.api.Assumptions.assumeTrue; - -/** - * Provides utility methods that allow JUnit tests to assume certain conditions - * hold {@code true}. If the assumption fails, it means the test should be - * aborted. - * - *

Tests can be categorized into {@link TestGroup}s. Active groups are enabled using - * the 'testGroups' system property, usually activated from the gradle command line: - * - *

- * gradle test -PtestGroups="performance"
- * 
- * - *

Groups can be activated as a comma separated list of values, or using the - * pseudo group 'all'. See {@link TestGroup} for a list of valid groups. - * - * @author Rob Winch - * @author Phillip Webb - * @author Sam Brannen - * @since 3.2 - * @see EnabledForTestGroups @EnabledForTestGroups - * @see #notLogging(Log) - * @see TestGroup - */ -public abstract class Assume { - - static final String TEST_GROUPS_SYSTEM_PROPERTY = "testGroups"; - - - /** - * Assume that a particular {@link TestGroup} is active. - * @param group the group that must be active - * @throws org.opentest4j.TestAbortedException if the assumption fails - * @deprecated as of Spring Framework 5.2 in favor of {@link EnabledForTestGroups} - */ - @Deprecated - public static void group(TestGroup group) { - Set testGroups = TestGroup.loadTestGroups(); - assumeTrue(testGroups.contains(group), - () -> "Requires inactive test group " + group + "; active test groups: " + testGroups); - } - - /** - * Assume that the specified log is not set to Trace or Debug. - * @param log the log to test - * @throws org.opentest4j.TestAbortedException if the assumption fails - */ - public static void notLogging(Log log) { - assumeFalse(log.isTraceEnabled()); - assumeFalse(log.isDebugEnabled()); - } - -} diff --git a/spring-core/src/test/java/org/springframework/util/AutoPopulatingListTests.java b/spring-core/src/test/java/org/springframework/util/AutoPopulatingListTests.java index 4401096721c..416ad92d2db 100644 --- a/spring-core/src/test/java/org/springframework/util/AutoPopulatingListTests.java +++ b/spring-core/src/test/java/org/springframework/util/AutoPopulatingListTests.java @@ -20,6 +20,7 @@ import java.util.LinkedList; import org.junit.jupiter.api.Test; +import org.springframework.core.test.fixtures.io.SerializationTestUtils; import org.springframework.tests.sample.objects.TestObject; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-core/src/test/java/org/springframework/util/ReflectionUtilsTests.java b/spring-core/src/test/java/org/springframework/util/ReflectionUtilsTests.java index cf8629948d5..4bef1397a21 100644 --- a/spring-core/src/test/java/org/springframework/util/ReflectionUtilsTests.java +++ b/spring-core/src/test/java/org/springframework/util/ReflectionUtilsTests.java @@ -27,12 +27,12 @@ import java.util.List; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -import org.springframework.tests.EnabledForTestGroups; +import org.springframework.core.test.fixtures.EnabledForTestGroups; import org.springframework.tests.sample.objects.TestObject; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException; -import static org.springframework.tests.TestGroup.PERFORMANCE; +import static org.springframework.core.test.fixtures.TestGroup.PERFORMANCE; /** * @author Rob Harrop diff --git a/spring-core/src/test/java/org/springframework/util/SerializationUtilsTests.java b/spring-core/src/test/java/org/springframework/util/SerializationUtilsTests.java index 98abc6b718b..d48b00b32f4 100644 --- a/spring-core/src/test/java/org/springframework/util/SerializationUtilsTests.java +++ b/spring-core/src/test/java/org/springframework/util/SerializationUtilsTests.java @@ -25,14 +25,14 @@ import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException import static org.assertj.core.api.Assertions.assertThatIllegalStateException; /** - * Test for static utility to help with serialization. + * Unit tests for {@link SerializationUtils}. * * @author Dave Syer * @since 3.0.5 */ class SerializationUtilsTests { - private static BigInteger FOO = new BigInteger( + private static final BigInteger FOO = new BigInteger( "-9702942423549012526722364838327831379660941553432801565505143675386108883970811292563757558516603356009681061" + "5697574744209306031461371833798723505120163874786203211176873686513374052845353833564048"); @@ -44,21 +44,17 @@ class SerializationUtilsTests { @Test void deserializeUndefined() throws Exception { - byte[] bytes = FOO.toByteArray(); - assertThatIllegalStateException().isThrownBy(() -> - SerializationUtils.deserialize(bytes)); + assertThatIllegalStateException().isThrownBy(() -> SerializationUtils.deserialize(FOO.toByteArray())); } @Test void serializeNonSerializable() throws Exception { - assertThatIllegalArgumentException().isThrownBy(() -> - SerializationUtils.serialize(new Object())); + assertThatIllegalArgumentException().isThrownBy(() -> SerializationUtils.serialize(new Object())); } @Test void deserializeNonSerializable() throws Exception { - assertThatIllegalArgumentException().isThrownBy(() -> - SerializationUtils.deserialize("foo".getBytes())); + assertThatIllegalArgumentException().isThrownBy(() -> SerializationUtils.deserialize("foo".getBytes())); } @Test diff --git a/spring-core/src/test/java/org/springframework/util/xml/AbstractStaxHandlerTests.java b/spring-core/src/test/java/org/springframework/util/xml/AbstractStaxHandlerTests.java index b127bce0067..2592d12a4a8 100644 --- a/spring-core/src/test/java/org/springframework/util/xml/AbstractStaxHandlerTests.java +++ b/spring-core/src/test/java/org/springframework/util/xml/AbstractStaxHandlerTests.java @@ -34,7 +34,7 @@ import org.xml.sax.InputSource; import org.xml.sax.XMLReader; import org.xmlunit.util.Predicate; -import org.springframework.tests.XmlContent; +import org.springframework.core.test.fixtures.xml.XmlContent; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-core/src/test/java/org/springframework/util/xml/DomContentHandlerTests.java b/spring-core/src/test/java/org/springframework/util/xml/DomContentHandlerTests.java index a32eb4a3474..a7fe73634c8 100644 --- a/spring-core/src/test/java/org/springframework/util/xml/DomContentHandlerTests.java +++ b/spring-core/src/test/java/org/springframework/util/xml/DomContentHandlerTests.java @@ -28,7 +28,7 @@ import org.w3c.dom.Element; import org.xml.sax.InputSource; import org.xml.sax.XMLReader; -import org.springframework.tests.XmlContent; +import org.springframework.core.test.fixtures.xml.XmlContent; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-core/src/test/java/org/springframework/util/xml/ListBasedXMLEventReaderTests.java b/spring-core/src/test/java/org/springframework/util/xml/ListBasedXMLEventReaderTests.java index 8a019329eb0..0049180a3c5 100644 --- a/spring-core/src/test/java/org/springframework/util/xml/ListBasedXMLEventReaderTests.java +++ b/spring-core/src/test/java/org/springframework/util/xml/ListBasedXMLEventReaderTests.java @@ -30,7 +30,7 @@ import javax.xml.stream.events.XMLEvent; import org.junit.jupiter.api.Test; -import org.springframework.tests.XmlContent; +import org.springframework.core.test.fixtures.xml.XmlContent; import static javax.xml.stream.XMLStreamConstants.END_DOCUMENT; import static javax.xml.stream.XMLStreamConstants.END_ELEMENT; diff --git a/spring-core/src/test/java/org/springframework/util/xml/StaxResultTests.java b/spring-core/src/test/java/org/springframework/util/xml/StaxResultTests.java index 78188adcbde..000307e318c 100644 --- a/spring-core/src/test/java/org/springframework/util/xml/StaxResultTests.java +++ b/spring-core/src/test/java/org/springframework/util/xml/StaxResultTests.java @@ -31,7 +31,7 @@ import javax.xml.transform.stream.StreamSource; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; -import org.springframework.tests.XmlContent; +import org.springframework.core.test.fixtures.xml.XmlContent; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-core/src/test/java/org/springframework/util/xml/StaxSourceTests.java b/spring-core/src/test/java/org/springframework/util/xml/StaxSourceTests.java index fb5ad8dcadb..908dfd3d1b9 100644 --- a/spring-core/src/test/java/org/springframework/util/xml/StaxSourceTests.java +++ b/spring-core/src/test/java/org/springframework/util/xml/StaxSourceTests.java @@ -34,7 +34,7 @@ import org.junit.jupiter.api.Test; import org.w3c.dom.Document; import org.xml.sax.InputSource; -import org.springframework.tests.XmlContent; +import org.springframework.core.test.fixtures.xml.XmlContent; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-core/src/test/java/org/springframework/util/xml/XMLEventStreamReaderTests.java b/spring-core/src/test/java/org/springframework/util/xml/XMLEventStreamReaderTests.java index 832784168d2..7d9719a3473 100644 --- a/spring-core/src/test/java/org/springframework/util/xml/XMLEventStreamReaderTests.java +++ b/spring-core/src/test/java/org/springframework/util/xml/XMLEventStreamReaderTests.java @@ -31,7 +31,7 @@ import org.junit.jupiter.api.Test; import org.w3c.dom.Node; import org.xmlunit.util.Predicate; -import org.springframework.tests.XmlContent; +import org.springframework.core.test.fixtures.xml.XmlContent; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-core/src/test/java/org/springframework/util/xml/XMLEventStreamWriterTests.java b/spring-core/src/test/java/org/springframework/util/xml/XMLEventStreamWriterTests.java index e35807870a6..7ed978406b4 100644 --- a/spring-core/src/test/java/org/springframework/util/xml/XMLEventStreamWriterTests.java +++ b/spring-core/src/test/java/org/springframework/util/xml/XMLEventStreamWriterTests.java @@ -27,7 +27,7 @@ import org.junit.jupiter.api.Test; import org.w3c.dom.Node; import org.xmlunit.util.Predicate; -import org.springframework.tests.XmlContent; +import org.springframework.core.test.fixtures.xml.XmlContent; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/Assume.java b/spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/Assume.java new file mode 100644 index 00000000000..1537f459a2a --- /dev/null +++ b/spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/Assume.java @@ -0,0 +1,46 @@ +/* + * Copyright 2002-2019 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. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.springframework.core.test.fixtures; + +import org.apache.commons.logging.Log; + +import static org.junit.jupiter.api.Assumptions.assumeFalse; + +/** + * Utility methods that allow JUnit tests to assume certain conditions hold + * {@code true}. If an assumption fails, it means the test should be aborted. + * + * @author Rob Winch + * @author Phillip Webb + * @author Sam Brannen + * @since 3.2 + * @see #notLogging(Log) + * @see EnabledForTestGroups @EnabledForTestGroups + */ +public abstract class Assume { + + /** + * Assume that the specified log is not set to Trace or Debug. + * @param log the log to test + * @throws org.opentest4j.TestAbortedException if the assumption fails + */ + public static void notLogging(Log log) { + assumeFalse(log.isTraceEnabled()); + assumeFalse(log.isDebugEnabled()); + } + +} diff --git a/spring-core/src/test/java/org/springframework/tests/EnabledForTestGroups.java b/spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/EnabledForTestGroups.java similarity index 96% rename from spring-core/src/test/java/org/springframework/tests/EnabledForTestGroups.java rename to spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/EnabledForTestGroups.java index 4ae6637caa4..5fd5eeab920 100644 --- a/spring-core/src/test/java/org/springframework/tests/EnabledForTestGroups.java +++ b/spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/EnabledForTestGroups.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.tests; +package org.springframework.core.test.fixtures; import java.lang.annotation.Documented; import java.lang.annotation.ElementType; diff --git a/spring-core/src/test/java/org/springframework/tests/TestGroup.java b/spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/TestGroup.java similarity index 98% rename from spring-core/src/test/java/org/springframework/tests/TestGroup.java rename to spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/TestGroup.java index f04c47bc182..0203908775b 100644 --- a/spring-core/src/test/java/org/springframework/tests/TestGroup.java +++ b/spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/TestGroup.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.tests; +package org.springframework.core.test.fixtures; import java.util.Collections; import java.util.EnumSet; @@ -29,7 +29,6 @@ import static java.lang.String.format; * A test group used to limit when certain tests are run. * * @see EnabledForTestGroups @EnabledForTestGroups - * @see Assume#group(TestGroup) * @author Phillip Webb * @author Chris Beams * @author Sam Brannen diff --git a/spring-core/src/test/java/org/springframework/tests/TestGroupsCondition.java b/spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/TestGroupsCondition.java similarity index 97% rename from spring-core/src/test/java/org/springframework/tests/TestGroupsCondition.java rename to spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/TestGroupsCondition.java index 90850b0acdf..e17d446033c 100644 --- a/spring-core/src/test/java/org/springframework/tests/TestGroupsCondition.java +++ b/spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/TestGroupsCondition.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.tests; +package org.springframework.core.test.fixtures; import java.util.Arrays; import java.util.Optional; diff --git a/spring-core/src/test/java/org/springframework/tests/TimeStamped.java b/spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/TimeStamped.java similarity index 95% rename from spring-core/src/test/java/org/springframework/tests/TimeStamped.java rename to spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/TimeStamped.java index 20904c8b9ab..27fe1634002 100644 --- a/spring-core/src/test/java/org/springframework/tests/TimeStamped.java +++ b/spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/TimeStamped.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.tests; +package org.springframework.core.test.fixtures; /** * This interface can be implemented by cacheable objects or cache entries, diff --git a/spring-core/src/test/java/org/springframework/core/codec/AbstractDecoderTests.java b/spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/codec/AbstractDecoderTests.java similarity index 98% rename from spring-core/src/test/java/org/springframework/core/codec/AbstractDecoderTests.java rename to spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/codec/AbstractDecoderTests.java index de9598edafd..72fece41b7e 100644 --- a/spring-core/src/test/java/org/springframework/core/codec/AbstractDecoderTests.java +++ b/spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/codec/AbstractDecoderTests.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.core.codec; +package org.springframework.core.test.fixtures.codec; import java.time.Duration; import java.util.Map; @@ -27,8 +27,9 @@ import reactor.core.publisher.Mono; import reactor.test.StepVerifier; import org.springframework.core.ResolvableType; -import org.springframework.core.io.buffer.AbstractLeakCheckingTests; +import org.springframework.core.codec.Decoder; import org.springframework.core.io.buffer.DataBuffer; +import org.springframework.core.test.fixtures.io.buffer.AbstractLeakCheckingTests; import org.springframework.lang.Nullable; import org.springframework.util.Assert; import org.springframework.util.MimeType; @@ -43,7 +44,6 @@ import static org.assertj.core.api.Assertions.assertThatExceptionOfType; * @author Arjen Poutsma * @since 5.1.3 */ -@SuppressWarnings("ProtectedField") public abstract class AbstractDecoderTests> extends AbstractLeakCheckingTests { /** diff --git a/spring-core/src/test/java/org/springframework/core/codec/AbstractEncoderTests.java b/spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/codec/AbstractEncoderTests.java similarity index 98% rename from spring-core/src/test/java/org/springframework/core/codec/AbstractEncoderTests.java rename to spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/codec/AbstractEncoderTests.java index 4eb7c811a59..33af4bb64b0 100644 --- a/spring-core/src/test/java/org/springframework/core/codec/AbstractEncoderTests.java +++ b/spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/codec/AbstractEncoderTests.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.core.codec; +package org.springframework.core.test.fixtures.codec; import java.util.Map; import java.util.function.Consumer; @@ -25,9 +25,10 @@ import reactor.core.publisher.Flux; import reactor.test.StepVerifier; import org.springframework.core.ResolvableType; -import org.springframework.core.io.buffer.AbstractLeakCheckingTests; +import org.springframework.core.codec.Encoder; import org.springframework.core.io.buffer.DataBuffer; import org.springframework.core.io.buffer.DataBufferUtils; +import org.springframework.core.test.fixtures.io.buffer.AbstractLeakCheckingTests; import org.springframework.lang.Nullable; import org.springframework.util.Assert; import org.springframework.util.MimeType; @@ -44,7 +45,6 @@ import static org.springframework.core.io.buffer.DataBufferUtils.release; * @author Arjen Poutsma * @since 5.1.3 */ -@SuppressWarnings("ProtectedField") public abstract class AbstractEncoderTests> extends AbstractLeakCheckingTests { /** diff --git a/spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/env/EnvironmentTestUtils.java b/spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/env/EnvironmentTestUtils.java new file mode 100644 index 00000000000..227c70a84b7 --- /dev/null +++ b/spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/env/EnvironmentTestUtils.java @@ -0,0 +1,92 @@ +/* + * Copyright 2002-2019 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. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.springframework.core.test.fixtures.env; + +import java.lang.reflect.Field; +import java.util.Collections; +import java.util.Map; + +import org.springframework.core.env.StandardEnvironment; + +/** + * Test utilities for {@link StandardEnvironment}. + * + * @author Chris Beams + * @author Juergen Hoeller + */ +public class EnvironmentTestUtils { + + @SuppressWarnings("unchecked") + public static Map getModifiableSystemEnvironment() { + // for os x / linux + Class[] classes = Collections.class.getDeclaredClasses(); + Map env = System.getenv(); + for (Class cl : classes) { + if ("java.util.Collections$UnmodifiableMap".equals(cl.getName())) { + try { + Field field = cl.getDeclaredField("m"); + field.setAccessible(true); + Object obj = field.get(env); + if (obj != null && obj.getClass().getName().equals("java.lang.ProcessEnvironment$StringEnvironment")) { + return (Map) obj; + } + } + catch (Exception ex) { + throw new RuntimeException(ex); + } + } + } + + // for windows + Class processEnvironmentClass; + try { + processEnvironmentClass = Class.forName("java.lang.ProcessEnvironment"); + } + catch (Exception ex) { + throw new IllegalStateException(ex); + } + + try { + Field theCaseInsensitiveEnvironmentField = processEnvironmentClass.getDeclaredField("theCaseInsensitiveEnvironment"); + theCaseInsensitiveEnvironmentField.setAccessible(true); + Object obj = theCaseInsensitiveEnvironmentField.get(null); + return (Map) obj; + } + catch (NoSuchFieldException ex) { + // do nothing + } + catch (Exception ex) { + throw new IllegalStateException(ex); + } + + try { + Field theEnvironmentField = processEnvironmentClass.getDeclaredField("theEnvironment"); + theEnvironmentField.setAccessible(true); + Object obj = theEnvironmentField.get(null); + return (Map) obj; + } + catch (NoSuchFieldException ex) { + // do nothing + } + catch (Exception ex) { + throw new IllegalStateException(ex); + } + + throw new IllegalStateException(); + } + +} diff --git a/spring-core/src/test/java/org/springframework/mock/env/MockPropertySource.java b/spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/env/MockPropertySource.java similarity index 98% rename from spring-core/src/test/java/org/springframework/mock/env/MockPropertySource.java rename to spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/env/MockPropertySource.java index b2dc34a41e6..9037af3d5b8 100644 --- a/spring-core/src/test/java/org/springframework/mock/env/MockPropertySource.java +++ b/spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/env/MockPropertySource.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.mock.env; +package org.springframework.core.test.fixtures.env; import java.util.Properties; diff --git a/spring-core/src/test/java/org/springframework/tests/TestResourceUtils.java b/spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/io/ResourceTestUtils.java similarity index 89% rename from spring-core/src/test/java/org/springframework/tests/TestResourceUtils.java rename to spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/io/ResourceTestUtils.java index 6f2a67f58ad..3925c486876 100644 --- a/spring-core/src/test/java/org/springframework/tests/TestResourceUtils.java +++ b/spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/io/ResourceTestUtils.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2016 the original author or authors. + * Copyright 2002-2019 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. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.tests; +package org.springframework.core.test.fixtures.io; import org.springframework.core.io.ClassPathResource; @@ -23,7 +23,7 @@ import org.springframework.core.io.ClassPathResource; * * @author Chris Beams */ -public abstract class TestResourceUtils { +public abstract class ResourceTestUtils { /** * Load a {@link ClassPathResource} qualified by the simple name of clazz, diff --git a/spring-core/src/test/java/org/springframework/util/SerializationTestUtils.java b/spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/io/SerializationTestUtils.java similarity index 97% rename from spring-core/src/test/java/org/springframework/util/SerializationTestUtils.java rename to spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/io/SerializationTestUtils.java index 38c48dea347..798dc834776 100644 --- a/spring-core/src/test/java/org/springframework/util/SerializationTestUtils.java +++ b/spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/io/SerializationTestUtils.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.util; +package org.springframework.core.test.fixtures.io; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; diff --git a/spring-core/src/test/java/org/springframework/core/io/buffer/AbstractDataBufferAllocatingTests.java b/spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/io/buffer/AbstractDataBufferAllocatingTests.java similarity index 92% rename from spring-core/src/test/java/org/springframework/core/io/buffer/AbstractDataBufferAllocatingTests.java rename to spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/io/buffer/AbstractDataBufferAllocatingTests.java index dc8717e0df4..e8f40a82e1f 100644 --- a/spring-core/src/test/java/org/springframework/core/io/buffer/AbstractDataBufferAllocatingTests.java +++ b/spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/io/buffer/AbstractDataBufferAllocatingTests.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.core.io.buffer; +package org.springframework.core.test.fixtures.io.buffer; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; @@ -40,7 +40,11 @@ import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; import reactor.core.publisher.Mono; -import org.springframework.core.io.buffer.support.DataBufferTestUtils; +import org.springframework.core.io.buffer.DataBuffer; +import org.springframework.core.io.buffer.DataBufferFactory; +import org.springframework.core.io.buffer.DataBufferUtils; +import org.springframework.core.io.buffer.DefaultDataBufferFactory; +import org.springframework.core.io.buffer.NettyDataBufferFactory; import static org.assertj.core.api.Assertions.assertThat; import static org.junit.jupiter.params.provider.Arguments.arguments; @@ -144,7 +148,7 @@ public abstract class AbstractDataBufferAllocatingTests { @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.METHOD) @ParameterizedTest(name = "[{index}] {0}") - @MethodSource("org.springframework.core.io.buffer.AbstractDataBufferAllocatingTests#dataBufferFactories()") + @MethodSource("org.springframework.core.test.fixtures.io.buffer.AbstractDataBufferAllocatingTests#dataBufferFactories()") public @interface ParameterizedDataBufferAllocatingTest { } diff --git a/spring-core/src/test/java/org/springframework/core/io/buffer/AbstractLeakCheckingTests.java b/spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/io/buffer/AbstractLeakCheckingTests.java similarity index 92% rename from spring-core/src/test/java/org/springframework/core/io/buffer/AbstractLeakCheckingTests.java rename to spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/io/buffer/AbstractLeakCheckingTests.java index 13c8207f1ec..e6b5f3b425a 100644 --- a/spring-core/src/test/java/org/springframework/core/io/buffer/AbstractLeakCheckingTests.java +++ b/spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/io/buffer/AbstractLeakCheckingTests.java @@ -14,10 +14,12 @@ * limitations under the License. */ -package org.springframework.core.io.buffer; +package org.springframework.core.test.fixtures.io.buffer; import org.junit.jupiter.api.AfterEach; +import org.springframework.core.io.buffer.DataBufferFactory; + /** * Abstract base class for unit tests that allocate data buffers via a {@link DataBufferFactory}. * After each unit test, this base class checks whether all created buffers have been released, @@ -32,7 +34,6 @@ public abstract class AbstractLeakCheckingTests { /** * The data buffer factory. */ - @SuppressWarnings("ProtectedField") protected final LeakAwareDataBufferFactory bufferFactory = new LeakAwareDataBufferFactory(); /** diff --git a/spring-core/src/test/java/org/springframework/core/io/buffer/support/DataBufferTestUtils.java b/spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/io/buffer/DataBufferTestUtils.java similarity index 97% rename from spring-core/src/test/java/org/springframework/core/io/buffer/support/DataBufferTestUtils.java rename to spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/io/buffer/DataBufferTestUtils.java index dc331d73144..d66fca19479 100644 --- a/spring-core/src/test/java/org/springframework/core/io/buffer/support/DataBufferTestUtils.java +++ b/spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/io/buffer/DataBufferTestUtils.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.core.io.buffer.support; +package org.springframework.core.test.fixtures.io.buffer; import java.nio.charset.Charset; diff --git a/spring-core/src/test/java/org/springframework/core/io/buffer/LeakAwareDataBuffer.java b/spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/io/buffer/LeakAwareDataBuffer.java similarity index 92% rename from spring-core/src/test/java/org/springframework/core/io/buffer/LeakAwareDataBuffer.java rename to spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/io/buffer/LeakAwareDataBuffer.java index 80879f82eb4..cb42a0468e4 100644 --- a/spring-core/src/test/java/org/springframework/core/io/buffer/LeakAwareDataBuffer.java +++ b/spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/io/buffer/LeakAwareDataBuffer.java @@ -14,8 +14,11 @@ * limitations under the License. */ -package org.springframework.core.io.buffer; +package org.springframework.core.test.fixtures.io.buffer; +import org.springframework.core.io.buffer.DataBuffer; +import org.springframework.core.io.buffer.DataBufferWrapper; +import org.springframework.core.io.buffer.PooledDataBuffer; import org.springframework.util.Assert; /** diff --git a/spring-core/src/test/java/org/springframework/core/io/buffer/LeakAwareDataBufferFactory.java b/spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/io/buffer/LeakAwareDataBufferFactory.java similarity index 93% rename from spring-core/src/test/java/org/springframework/core/io/buffer/LeakAwareDataBufferFactory.java rename to spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/io/buffer/LeakAwareDataBufferFactory.java index 4769e3a23aa..e3c8dced702 100644 --- a/spring-core/src/test/java/org/springframework/core/io/buffer/LeakAwareDataBufferFactory.java +++ b/spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/io/buffer/LeakAwareDataBufferFactory.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.core.io.buffer; +package org.springframework.core.test.fixtures.io.buffer; import java.nio.ByteBuffer; import java.time.Duration; @@ -28,6 +28,10 @@ import io.netty.buffer.PooledByteBufAllocator; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; +import org.springframework.core.io.buffer.DataBuffer; +import org.springframework.core.io.buffer.DataBufferFactory; +import org.springframework.core.io.buffer.DefaultDataBufferFactory; +import org.springframework.core.io.buffer.NettyDataBufferFactory; import org.springframework.util.Assert; /** diff --git a/spring-core/src/test/java/org/springframework/stereotype/Component.java b/spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/stereotype/Component.java similarity index 84% rename from spring-core/src/test/java/org/springframework/stereotype/Component.java rename to spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/stereotype/Component.java index 16dc18dcd67..04bf3e0fc7e 100644 --- a/spring-core/src/test/java/org/springframework/stereotype/Component.java +++ b/spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/stereotype/Component.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.stereotype; +package org.springframework.core.test.fixtures.stereotype; import java.lang.annotation.Documented; import java.lang.annotation.ElementType; @@ -23,9 +23,7 @@ import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** - * Indicates that an annotated class is a "component". - * Such classes are considered as candidates for auto-detection - * when using annotation-based configuration and classpath scanning. + * Copy of the standard {@code Component} annotation for testing purposes. * * @author Mark Fisher * @since 2.5 diff --git a/spring-core/src/test/java/org/springframework/stereotype/Indexed.java b/spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/stereotype/Indexed.java similarity index 94% rename from spring-core/src/test/java/org/springframework/stereotype/Indexed.java rename to spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/stereotype/Indexed.java index 63502acaf80..2da265f6cb7 100644 --- a/spring-core/src/test/java/org/springframework/stereotype/Indexed.java +++ b/spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/stereotype/Indexed.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.stereotype; +package org.springframework.core.test.fixtures.stereotype; import java.lang.annotation.Documented; import java.lang.annotation.ElementType; diff --git a/spring-core/src/test/java/org/springframework/tests/XmlContent.java b/spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/xml/XmlContent.java similarity index 94% rename from spring-core/src/test/java/org/springframework/tests/XmlContent.java rename to spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/xml/XmlContent.java index df4342a68ed..becbae6d2c7 100644 --- a/spring-core/src/test/java/org/springframework/tests/XmlContent.java +++ b/spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/xml/XmlContent.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.tests; +package org.springframework.core.test.fixtures.xml; import java.io.StringWriter; @@ -29,7 +29,7 @@ import org.xmlunit.assertj.XmlAssert; */ public class XmlContent implements AssertProvider { - private Object source; + private final Object source; private XmlContent(Object source) { this.source = source; diff --git a/spring-core/src/test/java/org/springframework/tests/XmlContentAssert.java b/spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/xml/XmlContentAssert.java similarity index 77% rename from spring-core/src/test/java/org/springframework/tests/XmlContentAssert.java rename to spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/xml/XmlContentAssert.java index b598f5f3634..c76d1cb3a5c 100644 --- a/spring-core/src/test/java/org/springframework/tests/XmlContentAssert.java +++ b/spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/xml/XmlContentAssert.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.tests; +package org.springframework.core.test.fixtures.xml; import org.assertj.core.api.AbstractAssert; import org.w3c.dom.Node; @@ -35,30 +35,30 @@ public class XmlContentAssert extends AbstractAssert { } public XmlContentAssert isSimilarTo(Object control) { - XmlAssert.assertThat(actual).and(control).areSimilar(); + XmlAssert.assertThat(super.actual).and(control).areSimilar(); return this; } public XmlContentAssert isSimilarTo(Object control, Predicate nodeFilter) { - XmlAssert.assertThat(actual).and(control).withNodeFilter(nodeFilter).areSimilar(); + XmlAssert.assertThat(super.actual).and(control).withNodeFilter(nodeFilter).areSimilar(); return this; } public XmlContentAssert isSimilarTo(String control, DifferenceEvaluator differenceEvaluator) { - XmlAssert.assertThat(actual).and(control).withDifferenceEvaluator( + XmlAssert.assertThat(super.actual).and(control).withDifferenceEvaluator( differenceEvaluator).areSimilar(); return this; } public XmlContentAssert isSimilarToIgnoringWhitespace(Object control) { - XmlAssert.assertThat(actual).and(control).ignoreWhitespace().areSimilar(); + XmlAssert.assertThat(super.actual).and(control).ignoreWhitespace().areSimilar(); return this; } public XmlContentAssert isSimilarToIgnoringWhitespace(String control, NodeMatcher nodeMatcher) { - XmlAssert.assertThat(actual).and(control).ignoreWhitespace().withNodeMatcher(nodeMatcher).areSimilar(); + XmlAssert.assertThat(super.actual).and(control).ignoreWhitespace().withNodeMatcher(nodeMatcher).areSimilar(); return this; } diff --git a/spring-expression/spring-expression.gradle b/spring-expression/spring-expression.gradle index 432179877a9..9f8299d4db9 100644 --- a/spring-expression/spring-expression.gradle +++ b/spring-expression/spring-expression.gradle @@ -4,6 +4,7 @@ apply plugin: "kotlin" dependencies { compile(project(":spring-core")) + testCompile(testFixtures(project(":spring-core"))) testCompile("org.jetbrains.kotlin:kotlin-reflect") testCompile("org.jetbrains.kotlin:kotlin-stdlib") } diff --git a/spring-expression/src/test/java/org/springframework/expression/spel/MapAccessTests.java b/spring-expression/src/test/java/org/springframework/expression/spel/MapAccessTests.java index 5673cc1d3f2..a18114da24d 100644 --- a/spring-expression/src/test/java/org/springframework/expression/spel/MapAccessTests.java +++ b/spring-expression/src/test/java/org/springframework/expression/spel/MapAccessTests.java @@ -21,6 +21,7 @@ import java.util.Map; import org.junit.jupiter.api.Test; +import org.springframework.core.test.fixtures.EnabledForTestGroups; import org.springframework.expression.AccessException; import org.springframework.expression.EvaluationContext; import org.springframework.expression.Expression; @@ -29,11 +30,10 @@ import org.springframework.expression.PropertyAccessor; import org.springframework.expression.TypedValue; import org.springframework.expression.spel.standard.SpelExpressionParser; import org.springframework.expression.spel.support.StandardEvaluationContext; -import org.springframework.tests.EnabledForTestGroups; import org.springframework.util.StopWatch; import static org.assertj.core.api.Assertions.assertThat; -import static org.springframework.tests.TestGroup.PERFORMANCE; +import static org.springframework.core.test.fixtures.TestGroup.PERFORMANCE; /** * Testing variations on map access. diff --git a/spring-expression/src/test/java/org/springframework/expression/spel/PerformanceTests.java b/spring-expression/src/test/java/org/springframework/expression/spel/PerformanceTests.java index 7db14d0e011..b1cbb7f0aa6 100644 --- a/spring-expression/src/test/java/org/springframework/expression/spel/PerformanceTests.java +++ b/spring-expression/src/test/java/org/springframework/expression/spel/PerformanceTests.java @@ -18,15 +18,15 @@ package org.springframework.expression.spel; import org.junit.jupiter.api.Test; +import org.springframework.core.test.fixtures.EnabledForTestGroups; import org.springframework.expression.EvaluationContext; import org.springframework.expression.Expression; import org.springframework.expression.ExpressionParser; import org.springframework.expression.spel.standard.SpelExpressionParser; -import org.springframework.tests.EnabledForTestGroups; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.fail; -import static org.springframework.tests.TestGroup.PERFORMANCE; +import static org.springframework.core.test.fixtures.TestGroup.PERFORMANCE; ///CLOVER:OFF diff --git a/spring-jdbc/spring-jdbc.gradle b/spring-jdbc/spring-jdbc.gradle index 78e5cced895..3dc083492fc 100644 --- a/spring-jdbc/spring-jdbc.gradle +++ b/spring-jdbc/spring-jdbc.gradle @@ -14,4 +14,5 @@ dependencies { optional("org.apache.derby:derbyclient") optional("org.jetbrains.kotlin:kotlin-reflect") optional("org.jetbrains.kotlin:kotlin-stdlib") + testCompile(testFixtures(project(":spring-core"))) } diff --git a/spring-jdbc/src/test/java/org/springframework/jdbc/config/JdbcNamespaceIntegrationTests.java b/spring-jdbc/src/test/java/org/springframework/jdbc/config/JdbcNamespaceIntegrationTests.java index 25b4a13d2dc..ad5e78c6cf9 100644 --- a/spring-jdbc/src/test/java/org/springframework/jdbc/config/JdbcNamespaceIntegrationTests.java +++ b/spring-jdbc/src/test/java/org/springframework/jdbc/config/JdbcNamespaceIntegrationTests.java @@ -29,17 +29,17 @@ import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; import org.springframework.context.ConfigurableApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; import org.springframework.core.io.ClassPathResource; +import org.springframework.core.test.fixtures.EnabledForTestGroups; import org.springframework.jdbc.BadSqlGrammarException; import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.jdbc.datasource.AbstractDriverBasedDataSource; import org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseFactoryBean; import org.springframework.jdbc.datasource.init.DataSourceInitializer; -import org.springframework.tests.EnabledForTestGroups; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; +import static org.springframework.core.test.fixtures.TestGroup.LONG_RUNNING; import static org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseFactory.DEFAULT_DATABASE_NAME; -import static org.springframework.tests.TestGroup.LONG_RUNNING; /** * @author Dave Syer diff --git a/spring-jdbc/src/test/java/org/springframework/jdbc/datasource/DataSourceTransactionManagerTests.java b/spring-jdbc/src/test/java/org/springframework/jdbc/datasource/DataSourceTransactionManagerTests.java index d1cf8f5c8fe..919f4b17dab 100644 --- a/spring-jdbc/src/test/java/org/springframework/jdbc/datasource/DataSourceTransactionManagerTests.java +++ b/spring-jdbc/src/test/java/org/springframework/jdbc/datasource/DataSourceTransactionManagerTests.java @@ -30,9 +30,9 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.mockito.InOrder; +import org.springframework.core.test.fixtures.EnabledForTestGroups; import org.springframework.dao.DataAccessResourceFailureException; import org.springframework.jdbc.UncategorizedSQLException; -import org.springframework.tests.EnabledForTestGroups; import org.springframework.transaction.CannotCreateTransactionException; import org.springframework.transaction.IllegalTransactionStateException; import org.springframework.transaction.PlatformTransactionManager; @@ -58,7 +58,7 @@ import static org.mockito.Mockito.inOrder; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; -import static org.springframework.tests.TestGroup.PERFORMANCE; +import static org.springframework.core.test.fixtures.TestGroup.PERFORMANCE; /** * @author Juergen Hoeller diff --git a/spring-messaging/spring-messaging.gradle b/spring-messaging/spring-messaging.gradle index 66ddd442ebd..a2851000418 100644 --- a/spring-messaging/spring-messaging.gradle +++ b/spring-messaging/spring-messaging.gradle @@ -16,6 +16,8 @@ dependencies { optional("com.google.protobuf:protobuf-java-util") optional("org.jetbrains.kotlinx:kotlinx-coroutines-core") optional("org.jetbrains.kotlinx:kotlinx-coroutines-reactor") + testCompile(project(":kotlin-coroutines")) + testCompile(testFixtures(project(":spring-core"))) testCompile("javax.inject:javax.inject-tck") testCompile("javax.servlet:javax.servlet-api") testCompile("javax.validation:validation-api") @@ -29,7 +31,6 @@ dependencies { testCompile("org.jetbrains.kotlin:kotlin-stdlib") testCompile("org.xmlunit:xmlunit-assertj") testCompile("org.xmlunit:xmlunit-matchers") - testCompile(project(":kotlin-coroutines")) testRuntime("com.sun.xml.bind:jaxb-core") testRuntime("com.sun.xml.bind:jaxb-impl") testRuntime("com.sun.activation:javax.activation") diff --git a/spring-messaging/src/test/java/org/springframework/messaging/MessageHeadersTests.java b/spring-messaging/src/test/java/org/springframework/messaging/MessageHeadersTests.java index eb1e3278cbb..088a53804c4 100644 --- a/spring-messaging/src/test/java/org/springframework/messaging/MessageHeadersTests.java +++ b/spring-messaging/src/test/java/org/springframework/messaging/MessageHeadersTests.java @@ -25,7 +25,7 @@ import java.util.concurrent.atomic.AtomicLong; import org.junit.jupiter.api.Test; -import org.springframework.util.SerializationTestUtils; +import org.springframework.core.test.fixtures.io.SerializationTestUtils; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException; diff --git a/spring-messaging/src/test/java/org/springframework/messaging/converter/MarshallingMessageConverterTests.java b/spring-messaging/src/test/java/org/springframework/messaging/converter/MarshallingMessageConverterTests.java index 9fb9b0b5aa9..8f256aa5077 100644 --- a/spring-messaging/src/test/java/org/springframework/messaging/converter/MarshallingMessageConverterTests.java +++ b/spring-messaging/src/test/java/org/springframework/messaging/converter/MarshallingMessageConverterTests.java @@ -25,10 +25,10 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.xmlunit.diff.DifferenceEvaluator; +import org.springframework.core.test.fixtures.xml.XmlContent; import org.springframework.messaging.Message; import org.springframework.messaging.support.MessageBuilder; import org.springframework.oxm.jaxb.Jaxb2Marshaller; -import org.springframework.tests.XmlContent; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; diff --git a/spring-messaging/src/test/java/org/springframework/messaging/handler/invocation/reactive/TestEncoderMethodReturnValueHandler.java b/spring-messaging/src/test/java/org/springframework/messaging/handler/invocation/reactive/TestEncoderMethodReturnValueHandler.java index 74087f82e13..ed40c25a9dd 100644 --- a/spring-messaging/src/test/java/org/springframework/messaging/handler/invocation/reactive/TestEncoderMethodReturnValueHandler.java +++ b/spring-messaging/src/test/java/org/springframework/messaging/handler/invocation/reactive/TestEncoderMethodReturnValueHandler.java @@ -24,7 +24,7 @@ import org.springframework.core.MethodParameter; import org.springframework.core.ReactiveAdapterRegistry; import org.springframework.core.codec.Encoder; import org.springframework.core.io.buffer.DataBuffer; -import org.springframework.core.io.buffer.support.DataBufferTestUtils; +import org.springframework.core.test.fixtures.io.buffer.DataBufferTestUtils; import org.springframework.messaging.Message; import static java.nio.charset.StandardCharsets.UTF_8; diff --git a/spring-messaging/src/test/java/org/springframework/messaging/rsocket/LeakAwareNettyDataBufferFactory.java b/spring-messaging/src/test/java/org/springframework/messaging/rsocket/LeakAwareNettyDataBufferFactory.java index 321ff4e3845..762ba52151b 100644 --- a/spring-messaging/src/test/java/org/springframework/messaging/rsocket/LeakAwareNettyDataBufferFactory.java +++ b/spring-messaging/src/test/java/org/springframework/messaging/rsocket/LeakAwareNettyDataBufferFactory.java @@ -31,7 +31,7 @@ import org.springframework.core.io.buffer.PooledDataBuffer; import org.springframework.util.ObjectUtils; /** - * Unlike {@link org.springframework.core.io.buffer.LeakAwareDataBufferFactory} + * Unlike {@link org.springframework.core.test.fixtures.io.buffer.LeakAwareDataBufferFactory} * this one is an instance of {@link NettyDataBufferFactory} which is necessary * since {@link PayloadUtils} does instanceof checks, and that also allows * intercepting {@link NettyDataBufferFactory#wrap(ByteBuf)}. diff --git a/spring-messaging/src/test/java/org/springframework/messaging/rsocket/MetadataEncoderTests.java b/spring-messaging/src/test/java/org/springframework/messaging/rsocket/MetadataEncoderTests.java index a1ca77d15dd..23d73df77ab 100644 --- a/spring-messaging/src/test/java/org/springframework/messaging/rsocket/MetadataEncoderTests.java +++ b/spring-messaging/src/test/java/org/springframework/messaging/rsocket/MetadataEncoderTests.java @@ -33,7 +33,7 @@ import org.springframework.core.io.buffer.DataBuffer; import org.springframework.core.io.buffer.DefaultDataBufferFactory; import org.springframework.core.io.buffer.NettyDataBuffer; import org.springframework.core.io.buffer.NettyDataBufferFactory; -import org.springframework.core.io.buffer.support.DataBufferTestUtils; +import org.springframework.core.test.fixtures.io.buffer.DataBufferTestUtils; import org.springframework.util.MimeType; import org.springframework.util.MimeTypeUtils; diff --git a/spring-messaging/src/test/java/org/springframework/messaging/rsocket/PayloadUtilsTests.java b/spring-messaging/src/test/java/org/springframework/messaging/rsocket/PayloadUtilsTests.java index 904032a29da..f368ce74577 100644 --- a/spring-messaging/src/test/java/org/springframework/messaging/rsocket/PayloadUtilsTests.java +++ b/spring-messaging/src/test/java/org/springframework/messaging/rsocket/PayloadUtilsTests.java @@ -30,7 +30,7 @@ import org.springframework.core.io.buffer.DataBufferUtils; import org.springframework.core.io.buffer.DefaultDataBuffer; import org.springframework.core.io.buffer.DefaultDataBufferFactory; import org.springframework.core.io.buffer.NettyDataBuffer; -import org.springframework.core.io.buffer.support.DataBufferTestUtils; +import org.springframework.core.test.fixtures.io.buffer.DataBufferTestUtils; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-messaging/src/test/java/org/springframework/messaging/support/MessageHeaderAccessorTests.java b/spring-messaging/src/test/java/org/springframework/messaging/support/MessageHeaderAccessorTests.java index 99a32034011..3d59175823a 100644 --- a/spring-messaging/src/test/java/org/springframework/messaging/support/MessageHeaderAccessorTests.java +++ b/spring-messaging/src/test/java/org/springframework/messaging/support/MessageHeaderAccessorTests.java @@ -24,10 +24,10 @@ import java.util.UUID; import org.junit.jupiter.api.Test; +import org.springframework.core.test.fixtures.io.SerializationTestUtils; import org.springframework.messaging.Message; import org.springframework.messaging.MessageHeaders; import org.springframework.util.MimeTypeUtils; -import org.springframework.util.SerializationTestUtils; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatIllegalStateException; diff --git a/spring-orm/spring-orm.gradle b/spring-orm/spring-orm.gradle index 279b74437f9..7c213fbbc7b 100644 --- a/spring-orm/spring-orm.gradle +++ b/spring-orm/spring-orm.gradle @@ -11,6 +11,7 @@ dependencies { optional("org.eclipse.persistence:org.eclipse.persistence.jpa") optional("org.hibernate:hibernate-core") optional("javax.servlet:javax.servlet-api:3.1.0") + testCompile(testFixtures(project(":spring-core"))) testCompile("org.aspectj:aspectjweaver") testCompile("org.hsqldb:hsqldb") testRuntime("javax.xml.bind:jaxb-api") diff --git a/spring-orm/src/test/java/org/springframework/orm/jpa/AbstractContainerEntityManagerFactoryIntegrationTests.java b/spring-orm/src/test/java/org/springframework/orm/jpa/AbstractContainerEntityManagerFactoryIntegrationTests.java index 3212318ec79..51ffa961aa3 100644 --- a/spring-orm/src/test/java/org/springframework/orm/jpa/AbstractContainerEntityManagerFactoryIntegrationTests.java +++ b/spring-orm/src/test/java/org/springframework/orm/jpa/AbstractContainerEntityManagerFactoryIntegrationTests.java @@ -26,9 +26,9 @@ import javax.persistence.Query; import org.junit.jupiter.api.Test; +import org.springframework.core.test.fixtures.io.SerializationTestUtils; import org.springframework.orm.jpa.domain.DriversLicense; import org.springframework.orm.jpa.domain.Person; -import org.springframework.util.SerializationTestUtils; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; diff --git a/spring-orm/src/test/java/org/springframework/orm/jpa/LocalContainerEntityManagerFactoryBeanTests.java b/spring-orm/src/test/java/org/springframework/orm/jpa/LocalContainerEntityManagerFactoryBeanTests.java index 6cbbdab3c00..23fb944acef 100644 --- a/spring-orm/src/test/java/org/springframework/orm/jpa/LocalContainerEntityManagerFactoryBeanTests.java +++ b/spring-orm/src/test/java/org/springframework/orm/jpa/LocalContainerEntityManagerFactoryBeanTests.java @@ -32,13 +32,13 @@ import javax.persistence.spi.ProviderUtil; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.support.DefaultListableBeanFactory; +import org.springframework.core.test.fixtures.io.SerializationTestUtils; import org.springframework.dao.DataAccessException; import org.springframework.dao.OptimisticLockingFailureException; import org.springframework.instrument.classloading.InstrumentationLoadTimeWeaver; import org.springframework.orm.jpa.persistenceunit.MutablePersistenceUnitInfo; import org.springframework.transaction.TransactionStatus; import org.springframework.transaction.interceptor.DefaultTransactionAttribute; -import org.springframework.util.SerializationTestUtils; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; diff --git a/spring-orm/src/test/java/org/springframework/orm/jpa/support/PersistenceInjectionTests.java b/spring-orm/src/test/java/org/springframework/orm/jpa/support/PersistenceInjectionTests.java index cee641e864c..3be9625da31 100644 --- a/spring-orm/src/test/java/org/springframework/orm/jpa/support/PersistenceInjectionTests.java +++ b/spring-orm/src/test/java/org/springframework/orm/jpa/support/PersistenceInjectionTests.java @@ -37,6 +37,7 @@ import org.springframework.beans.factory.FactoryBean; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.support.RootBeanDefinition; import org.springframework.context.support.GenericApplicationContext; +import org.springframework.core.test.fixtures.io.SerializationTestUtils; import org.springframework.lang.Nullable; import org.springframework.orm.jpa.AbstractEntityManagerFactoryBeanTests; import org.springframework.orm.jpa.DefaultJpaDialect; @@ -46,7 +47,6 @@ import org.springframework.stereotype.Repository; import org.springframework.tests.context.SimpleMapScope; import org.springframework.tests.mock.jndi.ExpectedLookupTemplate; import org.springframework.transaction.support.TransactionSynchronizationManager; -import org.springframework.util.SerializationTestUtils; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatIllegalStateException; diff --git a/spring-oxm/spring-oxm.gradle b/spring-oxm/spring-oxm.gradle index 3b31d45b5d8..0c8a0af2442 100644 --- a/spring-oxm/spring-oxm.gradle +++ b/spring-oxm/spring-oxm.gradle @@ -62,6 +62,7 @@ dependencies { optional("com.thoughtworks.xstream:xstream") optional("org.jibx:jibx-run") testCompile(project(":spring-context")) + testCompile(testFixtures(project(":spring-core"))) testCompile("org.ogce:xpp3") testCompile("org.codehaus.jettison:jettison") { exclude group: "stax", module: "stax-api" diff --git a/spring-oxm/src/test/java/org/springframework/oxm/AbstractMarshallerTests.java b/spring-oxm/src/test/java/org/springframework/oxm/AbstractMarshallerTests.java index e588e74dbc6..6dd6a91f1f7 100644 --- a/spring-oxm/src/test/java/org/springframework/oxm/AbstractMarshallerTests.java +++ b/spring-oxm/src/test/java/org/springframework/oxm/AbstractMarshallerTests.java @@ -36,7 +36,7 @@ import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Text; -import org.springframework.tests.XmlContent; +import org.springframework.core.test.fixtures.xml.XmlContent; import org.springframework.util.xml.StaxUtils; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-oxm/src/test/java/org/springframework/oxm/jaxb/Jaxb2MarshallerTests.java b/spring-oxm/src/test/java/org/springframework/oxm/jaxb/Jaxb2MarshallerTests.java index 59ab3c43936..2dc7d433610 100644 --- a/spring-oxm/src/test/java/org/springframework/oxm/jaxb/Jaxb2MarshallerTests.java +++ b/spring-oxm/src/test/java/org/springframework/oxm/jaxb/Jaxb2MarshallerTests.java @@ -46,6 +46,7 @@ import org.xmlunit.diff.DifferenceEvaluator; import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.Resource; +import org.springframework.core.test.fixtures.xml.XmlContent; import org.springframework.oxm.AbstractMarshallerTests; import org.springframework.oxm.UncategorizedMappingException; import org.springframework.oxm.XmlMappingException; @@ -53,7 +54,6 @@ import org.springframework.oxm.jaxb.test.FlightType; import org.springframework.oxm.jaxb.test.Flights; import org.springframework.oxm.jaxb.test.ObjectFactory; import org.springframework.oxm.mime.MimeContainer; -import org.springframework.tests.XmlContent; import org.springframework.util.FileCopyUtils; import org.springframework.util.ReflectionUtils; diff --git a/spring-oxm/src/test/java/org/springframework/oxm/jibx/JibxMarshallerTests.java b/spring-oxm/src/test/java/org/springframework/oxm/jibx/JibxMarshallerTests.java index 88a0ee8154d..6a904c2dd7d 100644 --- a/spring-oxm/src/test/java/org/springframework/oxm/jibx/JibxMarshallerTests.java +++ b/spring-oxm/src/test/java/org/springframework/oxm/jibx/JibxMarshallerTests.java @@ -23,8 +23,8 @@ import javax.xml.transform.stream.StreamResult; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.condition.EnabledOnJre; +import org.springframework.core.test.fixtures.xml.XmlContent; import org.springframework.oxm.AbstractMarshallerTests; -import org.springframework.tests.XmlContent; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException; diff --git a/spring-oxm/src/test/java/org/springframework/oxm/xstream/XStreamMarshallerTests.java b/spring-oxm/src/test/java/org/springframework/oxm/xstream/XStreamMarshallerTests.java index e3321c2e88d..c57a3045547 100644 --- a/spring-oxm/src/test/java/org/springframework/oxm/xstream/XStreamMarshallerTests.java +++ b/spring-oxm/src/test/java/org/springframework/oxm/xstream/XStreamMarshallerTests.java @@ -56,7 +56,7 @@ import org.xml.sax.ContentHandler; import org.xmlunit.builder.Input; import org.xmlunit.xpath.JAXPXPathEngine; -import org.springframework.tests.XmlContent; +import org.springframework.core.test.fixtures.xml.XmlContent; import org.springframework.util.xml.StaxUtils; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-test/spring-test.gradle b/spring-test/spring-test.gradle index 894a06344f4..0b66f51e277 100644 --- a/spring-test/spring-test.gradle +++ b/spring-test/spring-test.gradle @@ -42,6 +42,7 @@ dependencies { optional("org.jetbrains.kotlinx:kotlinx-coroutines-reactor") testCompile(project(":spring-context-support")) testCompile(project(":spring-oxm")) + testCompile(testFixtures(project(":spring-core"))) testCompile("javax.annotation:javax.annotation-api") testCompile("javax.cache:cache-api") testCompile("javax.ejb:javax.ejb-api") diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/concurrency/SpringJUnit4ConcurrencyTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/concurrency/SpringJUnit4ConcurrencyTests.java index af170e25114..5075ccd9f6e 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/concurrency/SpringJUnit4ConcurrencyTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/concurrency/SpringJUnit4ConcurrencyTests.java @@ -24,6 +24,7 @@ import org.junit.Ignore; import org.junit.Test; import org.junit.experimental.ParallelComputer; +import org.springframework.core.test.fixtures.TestGroup; import org.springframework.test.context.junit4.InheritedConfigSpringJUnit4ClassRunnerAppCtxTests; import org.springframework.test.context.junit4.MethodLevelTransactionalSpringRunnerTests; import org.springframework.test.context.junit4.SpringJUnit47ClassRunnerRuleTests; @@ -34,7 +35,6 @@ import org.springframework.test.context.junit4.rules.BaseAppCtxRuleTests; import org.springframework.test.context.junit4.rules.BasicAnnotationConfigWacSpringRuleTests; import org.springframework.test.context.junit4.rules.SpringClassRule; import org.springframework.test.context.junit4.rules.SpringMethodRule; -import org.springframework.tests.TestGroup; import org.springframework.util.ReflectionUtils; import static org.junit.Assume.assumeTrue; diff --git a/spring-test/src/test/java/org/springframework/test/web/reactive/server/HttpHandlerConnectorTests.java b/spring-test/src/test/java/org/springframework/test/web/reactive/server/HttpHandlerConnectorTests.java index 83a2e4c251b..08c0948f33e 100644 --- a/spring-test/src/test/java/org/springframework/test/web/reactive/server/HttpHandlerConnectorTests.java +++ b/spring-test/src/test/java/org/springframework/test/web/reactive/server/HttpHandlerConnectorTests.java @@ -28,7 +28,7 @@ import reactor.core.scheduler.Schedulers; import org.springframework.core.io.buffer.DataBuffer; import org.springframework.core.io.buffer.DefaultDataBufferFactory; -import org.springframework.core.io.buffer.support.DataBufferTestUtils; +import org.springframework.core.test.fixtures.io.buffer.DataBufferTestUtils; import org.springframework.http.HttpCookie; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpMethod; diff --git a/spring-test/src/test/java/org/springframework/test/web/servlet/htmlunit/DelegatingWebConnectionTests.java b/spring-test/src/test/java/org/springframework/test/web/servlet/htmlunit/DelegatingWebConnectionTests.java index cc5911e788f..c5fae22e884 100644 --- a/spring-test/src/test/java/org/springframework/test/web/servlet/htmlunit/DelegatingWebConnectionTests.java +++ b/spring-test/src/test/java/org/springframework/test/web/servlet/htmlunit/DelegatingWebConnectionTests.java @@ -32,17 +32,17 @@ import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; +import org.springframework.core.test.fixtures.EnabledForTestGroups; import org.springframework.stereotype.Controller; import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.htmlunit.DelegatingWebConnection.DelegateWebConnection; import org.springframework.test.web.servlet.setup.MockMvcBuilders; -import org.springframework.tests.EnabledForTestGroups; import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.BDDMockito.given; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.verifyNoMoreInteractions; -import static org.springframework.tests.TestGroup.PERFORMANCE; +import static org.springframework.core.test.fixtures.TestGroup.PERFORMANCE; /** * Unit and integration tests for {@link DelegatingWebConnection}. diff --git a/spring-test/src/test/java/org/springframework/test/web/servlet/htmlunit/MockMvcWebClientBuilderTests.java b/spring-test/src/test/java/org/springframework/test/web/servlet/htmlunit/MockMvcWebClientBuilderTests.java index da4918121d2..981e25d01a4 100644 --- a/spring-test/src/test/java/org/springframework/test/web/servlet/htmlunit/MockMvcWebClientBuilderTests.java +++ b/spring-test/src/test/java/org/springframework/test/web/servlet/htmlunit/MockMvcWebClientBuilderTests.java @@ -30,10 +30,10 @@ import com.gargoylesoftware.htmlunit.util.Cookie; import org.junit.jupiter.api.Test; import org.springframework.context.annotation.Configuration; +import org.springframework.core.test.fixtures.TestGroup; import org.springframework.test.context.junit.jupiter.web.SpringJUnitWebConfig; import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.setup.MockMvcBuilders; -import org.springframework.tests.TestGroup; import org.springframework.web.bind.annotation.CookieValue; import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.PostMapping; diff --git a/spring-test/src/test/java/org/springframework/test/web/servlet/htmlunit/webdriver/MockMvcHtmlUnitDriverBuilderTests.java b/spring-test/src/test/java/org/springframework/test/web/servlet/htmlunit/webdriver/MockMvcHtmlUnitDriverBuilderTests.java index 7e9513c6bff..16670b908bd 100644 --- a/spring-test/src/test/java/org/springframework/test/web/servlet/htmlunit/webdriver/MockMvcHtmlUnitDriverBuilderTests.java +++ b/spring-test/src/test/java/org/springframework/test/web/servlet/htmlunit/webdriver/MockMvcHtmlUnitDriverBuilderTests.java @@ -25,10 +25,10 @@ import org.junit.jupiter.api.Test; import org.openqa.selenium.htmlunit.HtmlUnitDriver; import org.springframework.context.annotation.Configuration; +import org.springframework.core.test.fixtures.TestGroup; import org.springframework.test.context.junit.jupiter.web.SpringJUnitWebConfig; import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.setup.MockMvcBuilders; -import org.springframework.tests.TestGroup; import org.springframework.web.bind.annotation.CookieValue; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; diff --git a/spring-tx/spring-tx.gradle b/spring-tx/spring-tx.gradle index aa2a6a3fa09..c026fb2991b 100644 --- a/spring-tx/spring-tx.gradle +++ b/spring-tx/spring-tx.gradle @@ -19,6 +19,7 @@ dependencies { optional("org.jetbrains.kotlin:kotlin-stdlib") optional("org.jetbrains.kotlinx:kotlinx-coroutines-core") optional("org.jetbrains.kotlinx:kotlinx-coroutines-reactor") + testCompile(testFixtures(project(":spring-core"))) testCompile("org.aspectj:aspectjweaver") testCompile("org.codehaus.groovy:groovy") testCompile("org.eclipse.persistence:javax.persistence") diff --git a/spring-tx/src/test/java/org/springframework/transaction/annotation/AnnotationTransactionAttributeSourceTests.java b/spring-tx/src/test/java/org/springframework/transaction/annotation/AnnotationTransactionAttributeSourceTests.java index a883fabc756..62ecf10fd5f 100644 --- a/spring-tx/src/test/java/org/springframework/transaction/annotation/AnnotationTransactionAttributeSourceTests.java +++ b/spring-tx/src/test/java/org/springframework/transaction/annotation/AnnotationTransactionAttributeSourceTests.java @@ -31,13 +31,13 @@ import org.junit.jupiter.api.Test; import org.springframework.aop.framework.Advised; import org.springframework.aop.framework.ProxyFactory; import org.springframework.core.annotation.AnnotationUtils; +import org.springframework.core.test.fixtures.io.SerializationTestUtils; import org.springframework.tests.transaction.CallCountingTransactionManager; import org.springframework.transaction.interceptor.NoRollbackRuleAttribute; import org.springframework.transaction.interceptor.RollbackRuleAttribute; import org.springframework.transaction.interceptor.RuleBasedTransactionAttribute; import org.springframework.transaction.interceptor.TransactionAttribute; import org.springframework.transaction.interceptor.TransactionInterceptor; -import org.springframework.util.SerializationTestUtils; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-tx/src/test/java/org/springframework/transaction/config/AnnotationDrivenTests.java b/spring-tx/src/test/java/org/springframework/transaction/config/AnnotationDrivenTests.java index e172b7d7e8d..114348dcbcb 100644 --- a/spring-tx/src/test/java/org/springframework/transaction/config/AnnotationDrivenTests.java +++ b/spring-tx/src/test/java/org/springframework/transaction/config/AnnotationDrivenTests.java @@ -27,9 +27,9 @@ import org.springframework.beans.factory.support.RootBeanDefinition; import org.springframework.context.ApplicationContext; import org.springframework.context.annotation.AnnotationConfigApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; +import org.springframework.core.test.fixtures.io.SerializationTestUtils; import org.springframework.tests.transaction.CallCountingTransactionManager; import org.springframework.transaction.support.TransactionSynchronizationManager; -import org.springframework.util.SerializationTestUtils; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-tx/src/test/java/org/springframework/transaction/interceptor/TransactionAttributeSourceAdvisorTests.java b/spring-tx/src/test/java/org/springframework/transaction/interceptor/TransactionAttributeSourceAdvisorTests.java index 213a591cf22..dc4d69b840b 100644 --- a/spring-tx/src/test/java/org/springframework/transaction/interceptor/TransactionAttributeSourceAdvisorTests.java +++ b/spring-tx/src/test/java/org/springframework/transaction/interceptor/TransactionAttributeSourceAdvisorTests.java @@ -20,7 +20,7 @@ import java.util.Properties; import org.junit.jupiter.api.Test; -import org.springframework.util.SerializationTestUtils; +import org.springframework.core.test.fixtures.io.SerializationTestUtils; /** * @author Rod Johnson diff --git a/spring-tx/src/test/java/org/springframework/transaction/interceptor/TransactionInterceptorTests.java b/spring-tx/src/test/java/org/springframework/transaction/interceptor/TransactionInterceptorTests.java index bc138e813ce..5eb598d6688 100644 --- a/spring-tx/src/test/java/org/springframework/transaction/interceptor/TransactionInterceptorTests.java +++ b/spring-tx/src/test/java/org/springframework/transaction/interceptor/TransactionInterceptorTests.java @@ -24,13 +24,13 @@ import org.junit.jupiter.api.Test; import org.springframework.aop.framework.ProxyFactory; import org.springframework.beans.factory.BeanFactory; import org.springframework.beans.factory.NoSuchBeanDefinitionException; +import org.springframework.core.test.fixtures.io.SerializationTestUtils; import org.springframework.lang.Nullable; import org.springframework.transaction.PlatformTransactionManager; import org.springframework.transaction.TransactionDefinition; import org.springframework.transaction.TransactionException; import org.springframework.transaction.TransactionManager; import org.springframework.transaction.TransactionStatus; -import org.springframework.util.SerializationTestUtils; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; diff --git a/spring-tx/src/test/java/org/springframework/transaction/support/JtaTransactionManagerSerializationTests.java b/spring-tx/src/test/java/org/springframework/transaction/support/JtaTransactionManagerSerializationTests.java index 978dc018d54..6e63dbbde83 100644 --- a/spring-tx/src/test/java/org/springframework/transaction/support/JtaTransactionManagerSerializationTests.java +++ b/spring-tx/src/test/java/org/springframework/transaction/support/JtaTransactionManagerSerializationTests.java @@ -21,9 +21,9 @@ import javax.transaction.UserTransaction; import org.junit.jupiter.api.Test; +import org.springframework.core.test.fixtures.io.SerializationTestUtils; import org.springframework.tests.mock.jndi.SimpleNamingContextBuilder; import org.springframework.transaction.jta.JtaTransactionManager; -import org.springframework.util.SerializationTestUtils; import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; diff --git a/spring-web/spring-web.gradle b/spring-web/spring-web.gradle index 6784d44483b..d8ee7176679 100644 --- a/spring-web/spring-web.gradle +++ b/spring-web/spring-web.gradle @@ -54,6 +54,7 @@ dependencies { optional("org.codehaus.groovy:groovy") optional("org.jetbrains.kotlin:kotlin-reflect") optional("org.jetbrains.kotlin:kotlin-stdlib") + testCompile(testFixtures(project(":spring-core"))) testCompile("io.projectreactor:reactor-test") testCompile("org.apache.taglibs:taglibs-standard-jstlel") testCompile("com.fasterxml.jackson.datatype:jackson-datatype-jdk8") diff --git a/spring-web/src/test/java/org/springframework/http/codec/CancelWithoutDemandCodecTests.java b/spring-web/src/test/java/org/springframework/http/codec/CancelWithoutDemandCodecTests.java index 9b50f64516f..22a30a2af02 100644 --- a/spring-web/src/test/java/org/springframework/http/codec/CancelWithoutDemandCodecTests.java +++ b/spring-web/src/test/java/org/springframework/http/codec/CancelWithoutDemandCodecTests.java @@ -33,7 +33,7 @@ import org.springframework.core.ResolvableType; import org.springframework.core.codec.CharSequenceEncoder; import org.springframework.core.io.buffer.DataBuffer; import org.springframework.core.io.buffer.DataBufferFactory; -import org.springframework.core.io.buffer.LeakAwareDataBufferFactory; +import org.springframework.core.test.fixtures.io.buffer.LeakAwareDataBufferFactory; import org.springframework.http.HttpHeaders; import org.springframework.http.MediaType; import org.springframework.http.ReactiveHttpOutputMessage; diff --git a/spring-web/src/test/java/org/springframework/http/codec/FormHttpMessageReaderTests.java b/spring-web/src/test/java/org/springframework/http/codec/FormHttpMessageReaderTests.java index b75f0d81956..26bdaaa5b2f 100644 --- a/spring-web/src/test/java/org/springframework/http/codec/FormHttpMessageReaderTests.java +++ b/spring-web/src/test/java/org/springframework/http/codec/FormHttpMessageReaderTests.java @@ -27,8 +27,8 @@ import reactor.core.publisher.Mono; import reactor.test.StepVerifier; import org.springframework.core.ResolvableType; -import org.springframework.core.io.buffer.AbstractLeakCheckingTests; import org.springframework.core.io.buffer.DataBuffer; +import org.springframework.core.test.fixtures.io.buffer.AbstractLeakCheckingTests; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpMethod; import org.springframework.http.MediaType; diff --git a/spring-web/src/test/java/org/springframework/http/codec/FormHttpMessageWriterTests.java b/spring-web/src/test/java/org/springframework/http/codec/FormHttpMessageWriterTests.java index 595444ac73d..152a3eb31cd 100644 --- a/spring-web/src/test/java/org/springframework/http/codec/FormHttpMessageWriterTests.java +++ b/spring-web/src/test/java/org/springframework/http/codec/FormHttpMessageWriterTests.java @@ -25,10 +25,10 @@ import reactor.core.publisher.Mono; import reactor.test.StepVerifier; import org.springframework.core.ResolvableType; -import org.springframework.core.io.buffer.AbstractLeakCheckingTests; import org.springframework.core.io.buffer.DataBuffer; import org.springframework.core.io.buffer.DataBufferUtils; -import org.springframework.core.io.buffer.support.DataBufferTestUtils; +import org.springframework.core.test.fixtures.io.buffer.AbstractLeakCheckingTests; +import org.springframework.core.test.fixtures.io.buffer.DataBufferTestUtils; import org.springframework.http.HttpHeaders; import org.springframework.http.MediaType; import org.springframework.mock.http.server.reactive.test.MockServerHttpResponse; diff --git a/spring-web/src/test/java/org/springframework/http/codec/ServerSentEventHttpMessageReaderTests.java b/spring-web/src/test/java/org/springframework/http/codec/ServerSentEventHttpMessageReaderTests.java index fa13b1c0747..b213758b4b7 100644 --- a/spring-web/src/test/java/org/springframework/http/codec/ServerSentEventHttpMessageReaderTests.java +++ b/spring-web/src/test/java/org/springframework/http/codec/ServerSentEventHttpMessageReaderTests.java @@ -26,8 +26,8 @@ import reactor.core.publisher.Mono; import reactor.test.StepVerifier; import org.springframework.core.ResolvableType; -import org.springframework.core.io.buffer.AbstractLeakCheckingTests; import org.springframework.core.io.buffer.DataBuffer; +import org.springframework.core.test.fixtures.io.buffer.AbstractLeakCheckingTests; import org.springframework.http.MediaType; import org.springframework.http.codec.json.Jackson2JsonDecoder; import org.springframework.mock.http.server.reactive.test.MockServerHttpRequest; diff --git a/spring-web/src/test/java/org/springframework/http/codec/ServerSentEventHttpMessageWriterTests.java b/spring-web/src/test/java/org/springframework/http/codec/ServerSentEventHttpMessageWriterTests.java index 68cf59d39c1..8e9bc707086 100644 --- a/spring-web/src/test/java/org/springframework/http/codec/ServerSentEventHttpMessageWriterTests.java +++ b/spring-web/src/test/java/org/springframework/http/codec/ServerSentEventHttpMessageWriterTests.java @@ -29,10 +29,10 @@ import reactor.core.publisher.Mono; import reactor.test.StepVerifier; import org.springframework.core.ResolvableType; -import org.springframework.core.io.buffer.AbstractDataBufferAllocatingTests; import org.springframework.core.io.buffer.DataBufferFactory; import org.springframework.core.io.buffer.DataBufferUtils; -import org.springframework.core.io.buffer.support.DataBufferTestUtils; +import org.springframework.core.test.fixtures.io.buffer.AbstractDataBufferAllocatingTests; +import org.springframework.core.test.fixtures.io.buffer.DataBufferTestUtils; import org.springframework.http.MediaType; import org.springframework.http.codec.json.Jackson2JsonEncoder; import org.springframework.http.converter.json.Jackson2ObjectMapperBuilder; diff --git a/spring-web/src/test/java/org/springframework/http/codec/cbor/Jackson2CborDecoderTests.java b/spring-web/src/test/java/org/springframework/http/codec/cbor/Jackson2CborDecoderTests.java index a3bc2974820..4cfe5cb3868 100644 --- a/spring-web/src/test/java/org/springframework/http/codec/cbor/Jackson2CborDecoderTests.java +++ b/spring-web/src/test/java/org/springframework/http/codec/cbor/Jackson2CborDecoderTests.java @@ -25,8 +25,8 @@ import org.junit.jupiter.api.Test; import reactor.core.publisher.Flux; import org.springframework.core.ResolvableType; -import org.springframework.core.codec.AbstractDecoderTests; import org.springframework.core.io.buffer.DataBuffer; +import org.springframework.core.test.fixtures.codec.AbstractDecoderTests; import org.springframework.http.codec.Pojo; import org.springframework.http.converter.json.Jackson2ObjectMapperBuilder; import org.springframework.util.MimeType; diff --git a/spring-web/src/test/java/org/springframework/http/codec/cbor/Jackson2CborEncoderTests.java b/spring-web/src/test/java/org/springframework/http/codec/cbor/Jackson2CborEncoderTests.java index 0241a13287d..e1293d55883 100644 --- a/spring-web/src/test/java/org/springframework/http/codec/cbor/Jackson2CborEncoderTests.java +++ b/spring-web/src/test/java/org/springframework/http/codec/cbor/Jackson2CborEncoderTests.java @@ -25,9 +25,9 @@ import org.junit.jupiter.api.Test; import reactor.core.publisher.Flux; import org.springframework.core.ResolvableType; -import org.springframework.core.io.buffer.AbstractLeakCheckingTests; import org.springframework.core.io.buffer.DataBuffer; -import org.springframework.core.io.buffer.support.DataBufferTestUtils; +import org.springframework.core.test.fixtures.io.buffer.AbstractLeakCheckingTests; +import org.springframework.core.test.fixtures.io.buffer.DataBufferTestUtils; import org.springframework.http.codec.Pojo; import org.springframework.http.codec.ServerSentEvent; import org.springframework.http.converter.json.Jackson2ObjectMapperBuilder; diff --git a/spring-web/src/test/java/org/springframework/http/codec/json/Jackson2JsonDecoderTests.java b/spring-web/src/test/java/org/springframework/http/codec/json/Jackson2JsonDecoderTests.java index 3d4ffb8b84d..6ec074bafb8 100644 --- a/spring-web/src/test/java/org/springframework/http/codec/json/Jackson2JsonDecoderTests.java +++ b/spring-web/src/test/java/org/springframework/http/codec/json/Jackson2JsonDecoderTests.java @@ -34,10 +34,10 @@ import reactor.core.publisher.Mono; import reactor.test.StepVerifier; import org.springframework.core.ResolvableType; -import org.springframework.core.codec.AbstractDecoderTests; import org.springframework.core.codec.CodecException; import org.springframework.core.codec.DecodingException; import org.springframework.core.io.buffer.DataBuffer; +import org.springframework.core.test.fixtures.codec.AbstractDecoderTests; import org.springframework.http.MediaType; import org.springframework.http.codec.Pojo; import org.springframework.http.codec.json.JacksonViewBean.MyJacksonView1; diff --git a/spring-web/src/test/java/org/springframework/http/codec/json/Jackson2JsonEncoderTests.java b/spring-web/src/test/java/org/springframework/http/codec/json/Jackson2JsonEncoderTests.java index 78083abba24..84a979c0fdc 100644 --- a/spring-web/src/test/java/org/springframework/http/codec/json/Jackson2JsonEncoderTests.java +++ b/spring-web/src/test/java/org/springframework/http/codec/json/Jackson2JsonEncoderTests.java @@ -32,9 +32,9 @@ import reactor.core.publisher.Mono; import reactor.test.StepVerifier; import org.springframework.core.ResolvableType; -import org.springframework.core.codec.AbstractEncoderTests; import org.springframework.core.io.buffer.DataBuffer; import org.springframework.core.io.buffer.DataBufferUtils; +import org.springframework.core.test.fixtures.codec.AbstractEncoderTests; import org.springframework.http.MediaType; import org.springframework.http.codec.Pojo; import org.springframework.http.codec.ServerSentEvent; diff --git a/spring-web/src/test/java/org/springframework/http/codec/json/Jackson2SmileDecoderTests.java b/spring-web/src/test/java/org/springframework/http/codec/json/Jackson2SmileDecoderTests.java index ffb301459eb..13a8326fd7c 100644 --- a/spring-web/src/test/java/org/springframework/http/codec/json/Jackson2SmileDecoderTests.java +++ b/spring-web/src/test/java/org/springframework/http/codec/json/Jackson2SmileDecoderTests.java @@ -25,8 +25,8 @@ import org.junit.jupiter.api.Test; import reactor.core.publisher.Flux; import org.springframework.core.ResolvableType; -import org.springframework.core.codec.AbstractDecoderTests; import org.springframework.core.io.buffer.DataBuffer; +import org.springframework.core.test.fixtures.codec.AbstractDecoderTests; import org.springframework.http.codec.Pojo; import org.springframework.http.converter.json.Jackson2ObjectMapperBuilder; import org.springframework.util.MimeType; diff --git a/spring-web/src/test/java/org/springframework/http/codec/json/Jackson2SmileEncoderTests.java b/spring-web/src/test/java/org/springframework/http/codec/json/Jackson2SmileEncoderTests.java index 8890c7e9373..3fdffe872e5 100644 --- a/spring-web/src/test/java/org/springframework/http/codec/json/Jackson2SmileEncoderTests.java +++ b/spring-web/src/test/java/org/springframework/http/codec/json/Jackson2SmileEncoderTests.java @@ -28,9 +28,9 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; import org.springframework.core.ResolvableType; -import org.springframework.core.codec.AbstractEncoderTests; import org.springframework.core.io.buffer.DataBuffer; -import org.springframework.core.io.buffer.support.DataBufferTestUtils; +import org.springframework.core.test.fixtures.codec.AbstractEncoderTests; +import org.springframework.core.test.fixtures.io.buffer.DataBufferTestUtils; import org.springframework.http.codec.Pojo; import org.springframework.http.codec.ServerSentEvent; import org.springframework.http.converter.json.Jackson2ObjectMapperBuilder; diff --git a/spring-web/src/test/java/org/springframework/http/codec/json/Jackson2TokenizerTests.java b/spring-web/src/test/java/org/springframework/http/codec/json/Jackson2TokenizerTests.java index 6f829a056ec..20dc4d994b5 100644 --- a/spring-web/src/test/java/org/springframework/http/codec/json/Jackson2TokenizerTests.java +++ b/spring-web/src/test/java/org/springframework/http/codec/json/Jackson2TokenizerTests.java @@ -33,9 +33,9 @@ import reactor.core.publisher.Flux; import reactor.test.StepVerifier; import org.springframework.core.codec.DecodingException; -import org.springframework.core.io.buffer.AbstractLeakCheckingTests; import org.springframework.core.io.buffer.DataBuffer; import org.springframework.core.io.buffer.DataBufferLimitException; +import org.springframework.core.test.fixtures.io.buffer.AbstractLeakCheckingTests; import static java.util.Arrays.asList; import static java.util.Collections.singletonList; diff --git a/spring-web/src/test/java/org/springframework/http/codec/multipart/MultipartHttpMessageWriterTests.java b/spring-web/src/test/java/org/springframework/http/codec/multipart/MultipartHttpMessageWriterTests.java index d1ef5e26f02..87e1f3300dc 100644 --- a/spring-web/src/test/java/org/springframework/http/codec/multipart/MultipartHttpMessageWriterTests.java +++ b/spring-web/src/test/java/org/springframework/http/codec/multipart/MultipartHttpMessageWriterTests.java @@ -32,10 +32,10 @@ import org.springframework.core.ResolvableType; import org.springframework.core.codec.StringDecoder; import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.Resource; -import org.springframework.core.io.buffer.AbstractLeakCheckingTests; import org.springframework.core.io.buffer.DataBuffer; import org.springframework.core.io.buffer.DataBufferUtils; import org.springframework.core.io.buffer.DefaultDataBufferFactory; +import org.springframework.core.test.fixtures.io.buffer.AbstractLeakCheckingTests; import org.springframework.http.HttpEntity; import org.springframework.http.MediaType; import org.springframework.http.client.MultipartBodyBuilder; diff --git a/spring-web/src/test/java/org/springframework/http/codec/multipart/SynchronossPartHttpMessageReaderTests.java b/spring-web/src/test/java/org/springframework/http/codec/multipart/SynchronossPartHttpMessageReaderTests.java index 8c09becc439..b2fb11b3c77 100644 --- a/spring-web/src/test/java/org/springframework/http/codec/multipart/SynchronossPartHttpMessageReaderTests.java +++ b/spring-web/src/test/java/org/springframework/http/codec/multipart/SynchronossPartHttpMessageReaderTests.java @@ -34,10 +34,10 @@ import reactor.test.StepVerifier; import org.springframework.core.ResolvableType; import org.springframework.core.codec.DecodingException; import org.springframework.core.io.ClassPathResource; -import org.springframework.core.io.buffer.AbstractLeakCheckingTests; import org.springframework.core.io.buffer.DataBuffer; import org.springframework.core.io.buffer.DataBufferUtils; -import org.springframework.core.io.buffer.support.DataBufferTestUtils; +import org.springframework.core.test.fixtures.io.buffer.AbstractLeakCheckingTests; +import org.springframework.core.test.fixtures.io.buffer.DataBufferTestUtils; import org.springframework.http.HttpMethod; import org.springframework.http.MediaType; import org.springframework.http.client.MultipartBodyBuilder; diff --git a/spring-web/src/test/java/org/springframework/http/codec/protobuf/ProtobufDecoderTests.java b/spring-web/src/test/java/org/springframework/http/codec/protobuf/ProtobufDecoderTests.java index 20b4e490518..1d3c367ce02 100644 --- a/spring-web/src/test/java/org/springframework/http/codec/protobuf/ProtobufDecoderTests.java +++ b/spring-web/src/test/java/org/springframework/http/codec/protobuf/ProtobufDecoderTests.java @@ -26,10 +26,10 @@ import reactor.core.publisher.Mono; import reactor.test.StepVerifier; import org.springframework.core.ResolvableType; -import org.springframework.core.codec.AbstractDecoderTests; import org.springframework.core.codec.DecodingException; import org.springframework.core.io.buffer.DataBuffer; import org.springframework.core.io.buffer.DataBufferUtils; +import org.springframework.core.test.fixtures.codec.AbstractDecoderTests; import org.springframework.http.MediaType; import org.springframework.protobuf.Msg; import org.springframework.protobuf.SecondMsg; diff --git a/spring-web/src/test/java/org/springframework/http/codec/protobuf/ProtobufEncoderTests.java b/spring-web/src/test/java/org/springframework/http/codec/protobuf/ProtobufEncoderTests.java index 8bbe558118d..f0bfbd15a70 100644 --- a/spring-web/src/test/java/org/springframework/http/codec/protobuf/ProtobufEncoderTests.java +++ b/spring-web/src/test/java/org/springframework/http/codec/protobuf/ProtobufEncoderTests.java @@ -25,9 +25,9 @@ import org.junit.jupiter.api.Test; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -import org.springframework.core.codec.AbstractEncoderTests; import org.springframework.core.io.buffer.DataBuffer; import org.springframework.core.io.buffer.DataBufferUtils; +import org.springframework.core.test.fixtures.codec.AbstractEncoderTests; import org.springframework.http.MediaType; import org.springframework.protobuf.Msg; import org.springframework.protobuf.SecondMsg; diff --git a/spring-web/src/test/java/org/springframework/http/codec/xml/Jaxb2XmlDecoderTests.java b/spring-web/src/test/java/org/springframework/http/codec/xml/Jaxb2XmlDecoderTests.java index 7e969c18ee4..9bc7894d1a0 100644 --- a/spring-web/src/test/java/org/springframework/http/codec/xml/Jaxb2XmlDecoderTests.java +++ b/spring-web/src/test/java/org/springframework/http/codec/xml/Jaxb2XmlDecoderTests.java @@ -29,8 +29,8 @@ import reactor.core.publisher.Mono; import reactor.test.StepVerifier; import org.springframework.core.ResolvableType; -import org.springframework.core.io.buffer.AbstractLeakCheckingTests; import org.springframework.core.io.buffer.DataBuffer; +import org.springframework.core.test.fixtures.io.buffer.AbstractLeakCheckingTests; import org.springframework.http.MediaType; import org.springframework.http.codec.Pojo; import org.springframework.http.codec.xml.jaxb.XmlRootElement; diff --git a/spring-web/src/test/java/org/springframework/http/codec/xml/Jaxb2XmlEncoderTests.java b/spring-web/src/test/java/org/springframework/http/codec/xml/Jaxb2XmlEncoderTests.java index 89def2af9e2..6522f57bf0f 100644 --- a/spring-web/src/test/java/org/springframework/http/codec/xml/Jaxb2XmlEncoderTests.java +++ b/spring-web/src/test/java/org/springframework/http/codec/xml/Jaxb2XmlEncoderTests.java @@ -29,11 +29,11 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; import org.springframework.core.ResolvableType; -import org.springframework.core.codec.AbstractEncoderTests; import org.springframework.core.io.buffer.DataBuffer; +import org.springframework.core.test.fixtures.codec.AbstractEncoderTests; +import org.springframework.core.test.fixtures.xml.XmlContent; import org.springframework.http.MediaType; import org.springframework.http.codec.Pojo; -import org.springframework.tests.XmlContent; import static java.nio.charset.StandardCharsets.UTF_8; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-web/src/test/java/org/springframework/http/codec/xml/XmlEventDecoderTests.java b/spring-web/src/test/java/org/springframework/http/codec/xml/XmlEventDecoderTests.java index eb1a7b38910..3bd9b8ff50a 100644 --- a/spring-web/src/test/java/org/springframework/http/codec/xml/XmlEventDecoderTests.java +++ b/spring-web/src/test/java/org/springframework/http/codec/xml/XmlEventDecoderTests.java @@ -26,9 +26,9 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; import reactor.test.StepVerifier; -import org.springframework.core.io.buffer.AbstractLeakCheckingTests; import org.springframework.core.io.buffer.DataBuffer; import org.springframework.core.io.buffer.DataBufferLimitException; +import org.springframework.core.test.fixtures.io.buffer.AbstractLeakCheckingTests; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-web/src/test/java/org/springframework/http/converter/feed/AtomFeedHttpMessageConverterTests.java b/spring-web/src/test/java/org/springframework/http/converter/feed/AtomFeedHttpMessageConverterTests.java index 1b057e584ae..4f733570186 100644 --- a/spring-web/src/test/java/org/springframework/http/converter/feed/AtomFeedHttpMessageConverterTests.java +++ b/spring-web/src/test/java/org/springframework/http/converter/feed/AtomFeedHttpMessageConverterTests.java @@ -31,10 +31,10 @@ import org.xmlunit.diff.DefaultNodeMatcher; import org.xmlunit.diff.ElementSelectors; import org.xmlunit.diff.NodeMatcher; +import org.springframework.core.test.fixtures.xml.XmlContent; import org.springframework.http.MediaType; import org.springframework.http.MockHttpInputMessage; import org.springframework.http.MockHttpOutputMessage; -import org.springframework.tests.XmlContent; import static java.util.Collections.singletonMap; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-web/src/test/java/org/springframework/http/converter/feed/RssChannelHttpMessageConverterTests.java b/spring-web/src/test/java/org/springframework/http/converter/feed/RssChannelHttpMessageConverterTests.java index 928c2cb9e1f..cea67dac411 100644 --- a/spring-web/src/test/java/org/springframework/http/converter/feed/RssChannelHttpMessageConverterTests.java +++ b/spring-web/src/test/java/org/springframework/http/converter/feed/RssChannelHttpMessageConverterTests.java @@ -27,10 +27,10 @@ import com.rometools.rome.feed.rss.Channel; import com.rometools.rome.feed.rss.Item; import org.junit.jupiter.api.Test; +import org.springframework.core.test.fixtures.xml.XmlContent; import org.springframework.http.MediaType; import org.springframework.http.MockHttpInputMessage; import org.springframework.http.MockHttpOutputMessage; -import org.springframework.tests.XmlContent; import static java.util.Collections.singletonMap; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-web/src/test/java/org/springframework/http/converter/xml/Jaxb2RootElementHttpMessageConverterTests.java b/spring-web/src/test/java/org/springframework/http/converter/xml/Jaxb2RootElementHttpMessageConverterTests.java index 49c69b616a6..277eb3291fa 100644 --- a/spring-web/src/test/java/org/springframework/http/converter/xml/Jaxb2RootElementHttpMessageConverterTests.java +++ b/spring-web/src/test/java/org/springframework/http/converter/xml/Jaxb2RootElementHttpMessageConverterTests.java @@ -36,11 +36,11 @@ import org.springframework.aop.framework.AopProxy; import org.springframework.aop.framework.DefaultAopProxyFactory; import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.Resource; +import org.springframework.core.test.fixtures.xml.XmlContent; import org.springframework.http.MediaType; import org.springframework.http.MockHttpInputMessage; import org.springframework.http.MockHttpOutputMessage; import org.springframework.http.converter.HttpMessageNotReadableException; -import org.springframework.tests.XmlContent; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; diff --git a/spring-web/src/test/java/org/springframework/http/converter/xml/SourceHttpMessageConverterTests.java b/spring-web/src/test/java/org/springframework/http/converter/xml/SourceHttpMessageConverterTests.java index 38bc72c0c3b..53ccbb62f9e 100644 --- a/spring-web/src/test/java/org/springframework/http/converter/xml/SourceHttpMessageConverterTests.java +++ b/spring-web/src/test/java/org/springframework/http/converter/xml/SourceHttpMessageConverterTests.java @@ -41,11 +41,11 @@ import org.xml.sax.helpers.DefaultHandler; import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.Resource; +import org.springframework.core.test.fixtures.xml.XmlContent; import org.springframework.http.MediaType; import org.springframework.http.MockHttpInputMessage; import org.springframework.http.MockHttpOutputMessage; import org.springframework.http.converter.HttpMessageNotReadableException; -import org.springframework.tests.XmlContent; import org.springframework.util.FileCopyUtils; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-web/src/test/java/org/springframework/http/server/reactive/ChannelSendOperatorTests.java b/spring-web/src/test/java/org/springframework/http/server/reactive/ChannelSendOperatorTests.java index 6c5918a13cd..24d14c548f4 100644 --- a/spring-web/src/test/java/org/springframework/http/server/reactive/ChannelSendOperatorTests.java +++ b/spring-web/src/test/java/org/springframework/http/server/reactive/ChannelSendOperatorTests.java @@ -35,7 +35,7 @@ import reactor.core.publisher.Signal; import reactor.test.StepVerifier; import org.springframework.core.io.buffer.DataBuffer; -import org.springframework.core.io.buffer.LeakAwareDataBufferFactory; +import org.springframework.core.test.fixtures.io.buffer.LeakAwareDataBufferFactory; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-web/src/test/java/org/springframework/http/server/reactive/HttpHeadResponseDecoratorTests.java b/spring-web/src/test/java/org/springframework/http/server/reactive/HttpHeadResponseDecoratorTests.java index b34104c7c1c..83ccd8b089e 100644 --- a/spring-web/src/test/java/org/springframework/http/server/reactive/HttpHeadResponseDecoratorTests.java +++ b/spring-web/src/test/java/org/springframework/http/server/reactive/HttpHeadResponseDecoratorTests.java @@ -23,8 +23,8 @@ import org.junit.jupiter.api.Test; import reactor.core.publisher.Flux; import org.springframework.core.io.buffer.DataBuffer; -import org.springframework.core.io.buffer.LeakAwareDataBufferFactory; import org.springframework.core.io.buffer.NettyDataBufferFactory; +import org.springframework.core.test.fixtures.io.buffer.LeakAwareDataBufferFactory; import org.springframework.mock.http.server.reactive.test.MockServerHttpResponse; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-web/src/test/java/org/springframework/web/bind/ServletRequestUtilsTests.java b/spring-web/src/test/java/org/springframework/web/bind/ServletRequestUtilsTests.java index 8472653a717..f459f4f04aa 100644 --- a/spring-web/src/test/java/org/springframework/web/bind/ServletRequestUtilsTests.java +++ b/spring-web/src/test/java/org/springframework/web/bind/ServletRequestUtilsTests.java @@ -18,13 +18,13 @@ package org.springframework.web.bind; import org.junit.jupiter.api.Test; +import org.springframework.core.test.fixtures.EnabledForTestGroups; import org.springframework.mock.web.test.MockHttpServletRequest; -import org.springframework.tests.EnabledForTestGroups; import org.springframework.util.StopWatch; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; -import static org.springframework.tests.TestGroup.PERFORMANCE; +import static org.springframework.core.test.fixtures.TestGroup.PERFORMANCE; /** * @author Juergen Hoeller diff --git a/spring-web/src/test/java/org/springframework/web/context/request/SessionScopeTests.java b/spring-web/src/test/java/org/springframework/web/context/request/SessionScopeTests.java index 9d296bbe642..25c0898ed87 100644 --- a/spring-web/src/test/java/org/springframework/web/context/request/SessionScopeTests.java +++ b/spring-web/src/test/java/org/springframework/web/context/request/SessionScopeTests.java @@ -29,11 +29,11 @@ import org.springframework.beans.factory.config.DestructionAwareBeanPostProcesso import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; import org.springframework.core.io.ClassPathResource; +import org.springframework.core.test.fixtures.io.SerializationTestUtils; import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.mock.web.test.MockHttpSession; import org.springframework.tests.sample.beans.DerivedTestBean; import org.springframework.tests.sample.beans.TestBean; -import org.springframework.util.SerializationTestUtils; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-webflux/spring-webflux.gradle b/spring-webflux/spring-webflux.gradle index e056a47f283..900d53484b4 100644 --- a/spring-webflux/spring-webflux.gradle +++ b/spring-webflux/spring-webflux.gradle @@ -30,6 +30,8 @@ dependencies { optional("com.google.protobuf:protobuf-java-util") optional("org.jetbrains.kotlinx:kotlinx-coroutines-core") optional("org.jetbrains.kotlinx:kotlinx-coroutines-reactor") + testCompile(project(":kotlin-coroutines")) + testCompile(testFixtures(project(":spring-core"))) testCompile("javax.xml.bind:jaxb-api") testCompile("com.fasterxml:aalto-xml") testCompile("org.hibernate:hibernate-validator") @@ -44,7 +46,6 @@ dependencies { testCompile("org.eclipse.jetty:jetty-reactive-httpclient") testCompile("org.junit.platform:junit-platform-launcher") testCompile("com.squareup.okhttp3:mockwebserver") - testCompile(project(":kotlin-coroutines")) testCompile("org.jetbrains.kotlin:kotlin-script-runtime") testRuntime("org.jetbrains.kotlin:kotlin-scripting-jsr223-embeddable") testRuntime("org.jruby:jruby") diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/config/ResourceHandlerRegistryTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/config/ResourceHandlerRegistryTests.java index 5c7dae213d5..dec3055660d 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/config/ResourceHandlerRegistryTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/config/ResourceHandlerRegistryTests.java @@ -28,7 +28,7 @@ import reactor.test.StepVerifier; import org.springframework.cache.concurrent.ConcurrentMapCache; import org.springframework.context.support.GenericApplicationContext; -import org.springframework.core.io.buffer.support.DataBufferTestUtils; +import org.springframework.core.test.fixtures.io.buffer.DataBufferTestUtils; import org.springframework.http.CacheControl; import org.springframework.http.server.PathContainer; import org.springframework.mock.http.server.reactive.test.MockServerHttpRequest; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/function/BodyInsertersTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/function/BodyInsertersTests.java index edcdb983ee5..2a37cf84781 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/function/BodyInsertersTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/function/BodyInsertersTests.java @@ -45,7 +45,7 @@ import org.springframework.core.io.buffer.DataBuffer; import org.springframework.core.io.buffer.DataBufferUtils; import org.springframework.core.io.buffer.DefaultDataBuffer; import org.springframework.core.io.buffer.DefaultDataBufferFactory; -import org.springframework.core.io.buffer.support.DataBufferTestUtils; +import org.springframework.core.test.fixtures.io.buffer.DataBufferTestUtils; import org.springframework.http.HttpMethod; import org.springframework.http.HttpRange; import org.springframework.http.ReactiveHttpOutputMessage; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/function/client/ExchangeFilterFunctionsTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/function/client/ExchangeFilterFunctionsTests.java index b6b6e42182c..64e016e55ec 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/function/client/ExchangeFilterFunctionsTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/function/client/ExchangeFilterFunctionsTests.java @@ -27,7 +27,7 @@ import reactor.test.StepVerifier; import org.springframework.core.io.buffer.DataBuffer; import org.springframework.core.io.buffer.DataBufferUtils; import org.springframework.core.io.buffer.DefaultDataBufferFactory; -import org.springframework.core.io.buffer.support.DataBufferTestUtils; +import org.springframework.core.test.fixtures.io.buffer.DataBufferTestUtils; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpMethod; import org.springframework.http.HttpStatus; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/function/client/WebClientDataBufferAllocatingTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/function/client/WebClientDataBufferAllocatingTests.java index 758d8f625a5..a2e80fe6403 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/function/client/WebClientDataBufferAllocatingTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/function/client/WebClientDataBufferAllocatingTests.java @@ -32,9 +32,9 @@ import reactor.core.publisher.Mono; import reactor.test.StepVerifier; import org.springframework.core.ParameterizedTypeReference; -import org.springframework.core.io.buffer.AbstractDataBufferAllocatingTests; import org.springframework.core.io.buffer.DataBufferFactory; import org.springframework.core.io.buffer.NettyDataBufferFactory; +import org.springframework.core.test.fixtures.io.buffer.AbstractDataBufferAllocatingTests; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/resource/ResourceWebHandlerTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/resource/ResourceWebHandlerTests.java index 83821b2d025..838a11cca3a 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/resource/ResourceWebHandlerTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/resource/ResourceWebHandlerTests.java @@ -39,7 +39,7 @@ import org.springframework.core.io.buffer.DataBuffer; import org.springframework.core.io.buffer.DataBufferFactory; import org.springframework.core.io.buffer.DataBufferUtils; import org.springframework.core.io.buffer.DefaultDataBufferFactory; -import org.springframework.core.io.buffer.support.DataBufferTestUtils; +import org.springframework.core.test.fixtures.io.buffer.DataBufferTestUtils; import org.springframework.http.CacheControl; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpMethod; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/MessageWriterResultHandlerTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/MessageWriterResultHandlerTests.java index b695cc9ae6c..5da68b75be6 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/MessageWriterResultHandlerTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/MessageWriterResultHandlerTests.java @@ -54,7 +54,7 @@ import org.springframework.web.reactive.accept.RequestedContentTypeResolver; import org.springframework.web.reactive.accept.RequestedContentTypeResolverBuilder; import static org.assertj.core.api.Assertions.assertThat; -import static org.springframework.core.io.buffer.support.DataBufferTestUtils.dumpString; +import static org.springframework.core.test.fixtures.io.buffer.DataBufferTestUtils.dumpString; import static org.springframework.http.MediaType.APPLICATION_JSON; import static org.springframework.web.method.ResolvableMethod.on; import static org.springframework.web.reactive.HandlerMapping.PRODUCIBLE_MEDIA_TYPES_ATTRIBUTE; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestPartMethodArgumentResolverTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestPartMethodArgumentResolverTests.java index 26019f40b9f..d55746f8381 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestPartMethodArgumentResolverTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestPartMethodArgumentResolverTests.java @@ -33,7 +33,7 @@ import org.springframework.core.MethodParameter; import org.springframework.core.ReactiveAdapterRegistry; import org.springframework.core.io.buffer.DataBuffer; import org.springframework.core.io.buffer.DataBufferUtils; -import org.springframework.core.io.buffer.support.DataBufferTestUtils; +import org.springframework.core.test.fixtures.io.buffer.DataBufferTestUtils; import org.springframework.http.HttpMethod; import org.springframework.http.MediaType; import org.springframework.http.client.MultipartBodyBuilder; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/ResponseEntityResultHandlerTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/ResponseEntityResultHandlerTests.java index 7a302b6ab4d..58c90779e1f 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/ResponseEntityResultHandlerTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/ResponseEntityResultHandlerTests.java @@ -40,7 +40,7 @@ import org.springframework.core.MethodParameter; import org.springframework.core.ResolvableType; import org.springframework.core.codec.ByteBufferEncoder; import org.springframework.core.codec.CharSequenceEncoder; -import org.springframework.core.io.buffer.support.DataBufferTestUtils; +import org.springframework.core.test.fixtures.io.buffer.DataBufferTestUtils; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpMethod; import org.springframework.http.HttpStatus; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/view/HttpMessageWriterViewTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/view/HttpMessageWriterViewTests.java index 87803b6a703..acee2437d10 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/view/HttpMessageWriterViewTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/view/HttpMessageWriterViewTests.java @@ -29,7 +29,7 @@ import reactor.test.StepVerifier; import org.springframework.core.codec.CharSequenceEncoder; import org.springframework.core.io.buffer.DataBuffer; -import org.springframework.core.io.buffer.support.DataBufferTestUtils; +import org.springframework.core.test.fixtures.io.buffer.DataBufferTestUtils; import org.springframework.http.MediaType; import org.springframework.http.codec.json.Jackson2JsonEncoder; import org.springframework.http.codec.xml.Jaxb2XmlEncoder; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/view/ViewResolutionResultHandlerTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/view/ViewResolutionResultHandlerTests.java index af52ff8b444..b461aaaa076 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/view/ViewResolutionResultHandlerTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/view/ViewResolutionResultHandlerTests.java @@ -38,7 +38,7 @@ import org.springframework.core.Ordered; import org.springframework.core.ResolvableType; import org.springframework.core.io.buffer.DataBuffer; import org.springframework.core.io.buffer.DefaultDataBufferFactory; -import org.springframework.core.io.buffer.support.DataBufferTestUtils; +import org.springframework.core.test.fixtures.io.buffer.DataBufferTestUtils; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.server.reactive.ServerHttpResponse; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/view/ZeroDemandResponse.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/view/ZeroDemandResponse.java index e75fcdf783a..d7e150bac8d 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/view/ZeroDemandResponse.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/view/ZeroDemandResponse.java @@ -24,7 +24,7 @@ import reactor.core.publisher.Mono; import org.springframework.core.io.buffer.DataBuffer; import org.springframework.core.io.buffer.DataBufferFactory; -import org.springframework.core.io.buffer.LeakAwareDataBufferFactory; +import org.springframework.core.test.fixtures.io.buffer.LeakAwareDataBufferFactory; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseCookie; diff --git a/spring-webmvc/spring-webmvc.gradle b/spring-webmvc/spring-webmvc.gradle index 8951a318f8d..f118436eb7d 100644 --- a/spring-webmvc/spring-webmvc.gradle +++ b/spring-webmvc/spring-webmvc.gradle @@ -35,6 +35,7 @@ dependencies { optional("org.jetbrains.kotlin:kotlin-reflect") optional("org.jetbrains.kotlin:kotlin-stdlib") optional("org.reactivestreams:reactive-streams") + testCompile(testFixtures(project(":spring-core"))) testCompile("javax.servlet:javax.servlet-api") testCompile("org.eclipse.jetty:jetty-servlet") { exclude group: "javax.servlet", module: "javax.servlet" diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/DispatcherServletTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/DispatcherServletTests.java index 4fa838cfd3e..22486a37426 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/DispatcherServletTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/DispatcherServletTests.java @@ -35,7 +35,6 @@ import org.springframework.beans.PropertyValue; import org.springframework.context.ApplicationContextInitializer; import org.springframework.context.ConfigurableApplicationContext; import org.springframework.core.env.ConfigurableEnvironment; -import org.springframework.core.env.DummyEnvironment; import org.springframework.http.HttpHeaders; import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.mock.web.test.MockHttpServletResponse; diff --git a/spring-core/src/test/java/org/springframework/core/env/DummyEnvironment.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/DummyEnvironment.java similarity index 88% rename from spring-core/src/test/java/org/springframework/core/env/DummyEnvironment.java rename to spring-webmvc/src/test/java/org/springframework/web/servlet/DummyEnvironment.java index bc1cd17899a..a4f4343b367 100644 --- a/spring-core/src/test/java/org/springframework/core/env/DummyEnvironment.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/DummyEnvironment.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2018 the original author or authors. + * Copyright 2002-2019 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. @@ -14,9 +14,12 @@ * limitations under the License. */ -package org.springframework.core.env; +package org.springframework.web.servlet; -public class DummyEnvironment implements Environment { +import org.springframework.core.env.Environment; +import org.springframework.core.env.Profiles; + +class DummyEnvironment implements Environment { @Override public boolean containsProperty(String key) { diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ServletAnnotationControllerHandlerMethodTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ServletAnnotationControllerHandlerMethodTests.java index 565f785d296..bbcd9379f55 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ServletAnnotationControllerHandlerMethodTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ServletAnnotationControllerHandlerMethodTests.java @@ -74,6 +74,7 @@ import org.springframework.context.annotation.AnnotationConfigUtils; import org.springframework.context.support.PropertySourcesPlaceholderConfigurer; import org.springframework.core.MethodParameter; import org.springframework.core.convert.converter.Converter; +import org.springframework.core.test.fixtures.io.SerializationTestUtils; import org.springframework.format.annotation.DateTimeFormat; import org.springframework.format.support.DefaultFormattingConversionService; import org.springframework.format.support.FormattingConversionServiceFactoryBean; @@ -110,7 +111,6 @@ import org.springframework.ui.Model; import org.springframework.ui.ModelMap; import org.springframework.util.Assert; import org.springframework.util.MultiValueMap; -import org.springframework.util.SerializationTestUtils; import org.springframework.util.StringUtils; import org.springframework.validation.BindingResult; import org.springframework.validation.Errors; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/view/feed/AtomFeedViewTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/view/feed/AtomFeedViewTests.java index 38f8772e727..f8b7bc7c535 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/view/feed/AtomFeedViewTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/view/feed/AtomFeedViewTests.java @@ -29,9 +29,9 @@ import com.rometools.rome.feed.atom.Entry; import com.rometools.rome.feed.atom.Feed; import org.junit.jupiter.api.Test; +import org.springframework.core.test.fixtures.xml.XmlContent; import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.mock.web.test.MockHttpServletResponse; -import org.springframework.tests.XmlContent; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/view/feed/RssFeedViewTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/view/feed/RssFeedViewTests.java index a70d0d5d451..bc4a2ac49f3 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/view/feed/RssFeedViewTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/view/feed/RssFeedViewTests.java @@ -29,9 +29,9 @@ import com.rometools.rome.feed.rss.Description; import com.rometools.rome.feed.rss.Item; import org.junit.jupiter.api.Test; +import org.springframework.core.test.fixtures.xml.XmlContent; import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.mock.web.test.MockHttpServletResponse; -import org.springframework.tests.XmlContent; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-websocket/spring-websocket.gradle b/spring-websocket/spring-websocket.gradle index 96355eef536..614f3c40175 100644 --- a/spring-websocket/spring-websocket.gradle +++ b/spring-websocket/spring-websocket.gradle @@ -21,6 +21,7 @@ dependencies { optional("io.undertow:undertow-servlet") optional("io.undertow:undertow-websockets-jsr") optional("com.fasterxml.jackson.core:jackson-databind") + testCompile(testFixtures(project(":spring-core"))) testCompile("org.apache.tomcat.embed:tomcat-embed-core") testCompile("org.apache.tomcat.embed:tomcat-embed-websocket") testCompile("io.projectreactor.netty:reactor-netty") diff --git a/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/client/AbstractSockJsIntegrationTests.java b/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/client/AbstractSockJsIntegrationTests.java index bb78d3fa2e9..8af8d83e3d0 100644 --- a/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/client/AbstractSockJsIntegrationTests.java +++ b/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/client/AbstractSockJsIntegrationTests.java @@ -49,10 +49,10 @@ import org.junit.jupiter.api.Timeout; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; +import org.springframework.core.test.fixtures.EnabledForTestGroups; import org.springframework.http.HttpHeaders; import org.springframework.http.server.ServletServerHttpRequest; import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler; -import org.springframework.tests.EnabledForTestGroups; import org.springframework.util.concurrent.ListenableFutureCallback; import org.springframework.web.context.support.AnnotationConfigWebApplicationContext; import org.springframework.web.socket.TextMessage; @@ -69,7 +69,7 @@ import org.springframework.web.socket.server.support.DefaultHandshakeHandler; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.fail; -import static org.springframework.tests.TestGroup.PERFORMANCE; +import static org.springframework.core.test.fixtures.TestGroup.PERFORMANCE; /** * Abstract base class for integration tests using the diff --git a/src/checkstyle/checkstyle-suppressions.xml b/src/checkstyle/checkstyle-suppressions.xml index 2726dce2576..1c8fbe7218a 100644 --- a/src/checkstyle/checkstyle-suppressions.xml +++ b/src/checkstyle/checkstyle-suppressions.xml @@ -3,9 +3,9 @@ - - - + + + @@ -25,7 +25,7 @@ - + From 61d4ee594d38b2b6e793c4ae21e036a6d5ad8d86 Mon Sep 17 00:00:00 2001 From: Sam Brannen Date: Sat, 28 Dec 2019 17:13:39 +0100 Subject: [PATCH 02/13] Use Gradle test fixture support for spring-beans and spring-context See gh-23550 --- .../build/testsources/TestSourcesPlugin.java | 2 +- integration-tests/integration-tests.gradle | 1 + ...NamespaceHandlerScopeIntegrationTests.java | 4 +- ...visorAutoProxyCreatorIntegrationTests.java | 2 +- ...ceHandlerScopeIntegrationTests-context.xml | 8 +- ...toProxyCreatorIntegrationTests-context.xml | 10 +- spring-aop/spring-aop.gradle | 1 + .../AspectJExpressionPointcutTests.java | 26 +- .../BeanNamePointcutMatchingTests.java | 2 +- ...hodInvocationProceedingJoinPointTests.java | 4 +- .../TigerAspectJExpressionPointcutTests.java | 4 +- .../aspectj/TypePatternClassFilterTests.java | 28 +- .../AbstractAspectJAdvisorFactoryTests.java | 8 +- .../annotation/ArgumentBindingTests.java | 4 +- .../AspectJPointcutAdvisorTests.java | 2 +- .../AspectJNamespaceHandlerTests.java | 2 +- .../config/AopNamespaceHandlerEventTests.java | 2 +- .../aop/framework/AopProxyUtilsTests.java | 4 +- .../framework/IntroductionBenchmarkTests.java | 4 +- .../aop/framework/MethodInvocationTests.java | 2 +- .../aop/framework/ProxyFactoryTests.java | 6 +- .../ConcurrencyThrottleInterceptorTests.java | 6 +- .../ExposeBeanNameAdvisorsTests.java | 4 +- .../ExposeInvocationInterceptorTests.java | 4 +- .../AbstractRegexpMethodPointcutTests.java | 2 +- .../aop/support/AopUtilsTests.java | 2 +- .../aop/support/ClassFiltersTests.java | 4 +- .../aop/support/ClassUtilsTests.java | 2 +- .../aop/support/ComposablePointcutTests.java | 2 +- .../aop/support/ControlFlowPointcutTests.java | 4 +- ...elegatingIntroductionInterceptorTests.java | 12 +- .../aop/support/MethodMatchersTests.java | 6 +- .../support/NameMatchMethodPointcutTests.java | 4 +- .../aop/support/PointcutsTests.java | 2 +- ...MethodPointcutAdvisorIntegrationTests.java | 6 +- .../aop/support/RootClassFilterTests.java | 2 +- .../CommonsPool2TargetSourceProxyTests.java | 2 +- .../target/HotSwappableTargetSourceTests.java | 6 +- .../aop/target/LazyInitTargetSourceTests.java | 2 +- .../PrototypeBasedTargetSourceTests.java | 4 +- .../target/PrototypeTargetSourceTests.java | 2 +- .../target/ThreadLocalTargetSourceTests.java | 4 +- .../AopNamespaceHandlerEventTests-context.xml | 2 +- ...PointcutErrorTests-pointcutDuplication.xml | 2 +- ...dlerPointcutErrorTests-pointcutMissing.xml | 2 +- ...ointcutAdvisorIntegrationTests-context.xml | 10 +- ...onsPool2TargetSourceProxyTests-context.xml | 2 +- .../HotSwappableTargetSourceTests-context.xml | 4 +- ...LazyInitTargetSourceTests-customTarget.xml | 2 +- .../LazyInitTargetSourceTests-singleton.xml | 2 +- .../PrototypeTargetSourceTests-context.xml | 4 +- .../ThreadLocalTargetSourceTests-context.xml | 6 +- spring-aspects/spring-aspects.gradle | 1 + .../aspectj/AbstractCacheAnnotationTests.java | 882 ++++++++++++++++++ .../aspectj/AspectJCacheAnnotationTests.java | 1 - .../AspectJEnableCachingIsolatedTests.java | 12 +- .../aspectj/AspectJEnableCachingTests.java | 9 +- .../AnnotatedClassCacheableService.java | 4 + .../cache/config/CacheableService.java | 6 +- .../cache/config/DefaultCacheableService.java | 6 +- .../cache/config/SomeKeyGenerator.java | 22 - .../cache/config/TestEntity.java | 9 +- .../cache/config/annotation-cache-aspectj.xml | 4 +- spring-beans/spring-beans.gradle | 2 + .../beans/AbstractPropertyAccessorTests.java | 10 +- .../springframework/beans/BeanUtilsTests.java | 6 +- .../beans/BeanWrapperEnumTests.java | 4 +- .../beans/BeanWrapperGenericsTests.java | 8 +- .../beans/BeanWrapperTests.java | 2 +- .../CachedIntrospectionResultsTests.java | 4 +- .../beans/DirectFieldAccessorTests.java | 2 +- .../beans/ExtendedBeanInfoTests.java | 2 +- .../beans/factory/BeanFactoryUtilsTests.java | 12 +- .../DefaultListableBeanFactoryTests.java | 16 +- ...wiredAnnotationBeanPostProcessorTests.java | 8 +- ...njectAnnotationBeanPostProcessorTests.java | 8 +- .../annotation/LookupAnnotationTests.java | 2 +- .../config/CustomEditorConfigurerTests.java | 2 +- .../FieldRetrievingFactoryBeanTests.java | 4 +- .../config/PropertyPathFactoryBeanTests.java | 4 +- .../PropertyPlaceholderConfigurerTests.java | 2 +- .../PropertyResourceConfigurerTests.java | 4 +- .../factory/config/SimpleScopeTests.java | 2 +- .../parsing/CustomProblemReporterTests.java | 2 +- .../support/BeanDefinitionBuilderTests.java | 2 +- .../factory/support/BeanDefinitionTests.java | 2 +- .../support/BeanFactoryGenericsTests.java | 8 +- .../DefaultSingletonBeanRegistryTests.java | 4 +- ...DefinitionMetadataEqualsHashCodeTests.java | 2 +- .../factory/support/LookupMethodTests.java | 2 +- .../PropertiesBeanDefinitionReaderTests.java | 2 +- .../wiring/BeanConfigurerSupportTests.java | 2 +- .../xml/AutowireWithExclusionTests.java | 2 +- .../factory/xml/CollectionMergingTests.java | 2 +- .../xml/CollectionsWithDefaultTypesTests.java | 2 +- .../xml/ConstructorDependenciesBean.java | 4 +- .../beans/factory/xml/CountingFactory.java | 2 +- .../beans/factory/xml/DummyReferencer.java | 4 +- .../factory/xml/DuplicateBeanIdTests.java | 2 +- .../factory/xml/EventPublicationTests.java | 2 +- .../beans/factory/xml/FactoryMethodTests.java | 2 +- .../beans/factory/xml/FactoryMethods.java | 2 +- .../beans/factory/xml/InstanceFactory.java | 2 +- ...edBeansElementAttributeRecursionTests.java | 2 +- .../factory/xml/SchemaValidationTests.java | 2 +- ...impleConstructorNamespaceHandlerTests.java | 4 +- .../SimplePropertyNamespaceHandlerTests.java | 4 +- .../beans/factory/xml/TestBeanCreator.java | 2 +- .../xml/UtilNamespaceHandlerTests.java | 6 +- .../factory/xml/XmlBeanCollectionTests.java | 4 +- .../xml/XmlBeanDefinitionReaderTests.java | 2 +- .../xml/XmlListableBeanFactoryTests.java | 9 +- .../propertyeditors/CustomEditorTests.java | 14 +- .../beans/support/PagedListHolderTests.java | 2 +- .../annotation/KotlinAutowiredTests.kt | 4 +- .../factory/BeanFactoryUtilsTests-leaf.xml | 2 +- .../factory/BeanFactoryUtilsTests-middle.xml | 4 +- .../factory/BeanFactoryUtilsTests-root.xml | 12 +- ...ieldRetrievingFactoryBeanTests-context.xml | 2 +- .../PropertyPathFactoryBeanTests-context.xml | 18 +- .../config/SimpleScopeTests-context.xml | 2 +- .../CustomProblemReporterTests-context.xml | 9 +- .../factory/support/genericBeanTests.xml | 6 +- .../factory/support/lookupMethodTests.xml | 4 +- .../support/multiConstructorArgs.properties | 2 +- .../support/refConstructorArg.properties | 4 +- .../support/simpleConstructorArg.properties | 2 +- ...uplicateBeanIdTests-multiLevel-context.xml | 4 +- ...DuplicateBeanIdTests-sameLevel-context.xml | 4 +- ...tAttributeRecursionTests-merge-context.xml | 2 +- .../autowire-constructor-with-exclusion.xml | 4 +- .../factory/xml/autowire-with-exclusion.xml | 4 +- .../factory/xml/autowire-with-inclusion.xml | 4 +- .../xml/autowire-with-selective-inclusion.xml | 4 +- .../beans/factory/xml/beanEvents.xml | 8 +- .../beans/factory/xml/collectionMerging.xml | 28 +- .../beans/factory/xml/collections.xml | 54 +- .../xml/collectionsWithDefaultTypes.xml | 4 +- .../beans/factory/xml/factory-methods.xml | 4 +- .../beans/factory/xml/schemaValidated.xml | 10 +- ...simpleConstructorNamespaceHandlerTests.xml | 22 +- ...tructorNamespaceHandlerTestsWithErrors.xml | 2 +- .../simplePropertyNamespaceHandlerTests.xml | 10 +- ...ropertyNamespaceHandlerTestsWithErrors.xml | 4 +- .../beans/factory/xml/test.xml | 32 +- .../beans/factory/xml/testUtilNamespace.xml | 20 +- .../beans/factory/xml/validateWithDtd.xml | 2 +- .../beans/factory/xml/validateWithXsd.xml | 2 +- .../beans/factory/xml/withMeta.xml | 6 +- .../beans/test/fixtures}/beans/AgeHolder.java | 2 +- .../test/fixtures}/beans/AnnotatedBean.java | 2 +- .../test/fixtures}/beans/BooleanTestBean.java | 2 +- .../beans/CollectingReaderEventListener.java | 2 +- .../beans/test/fixtures}/beans/Colour.java | 2 +- .../fixtures}/beans/CountingTestBean.java | 2 +- .../test/fixtures}/beans/CustomEnum.java | 2 +- .../fixtures}/beans/DependenciesBean.java | 2 +- .../test/fixtures}/beans/DerivedTestBean.java | 2 +- .../beans/test/fixtures}/beans/DummyBean.java | 2 +- .../test/fixtures}/beans/DummyFactory.java | 2 +- .../beans/test/fixtures}/beans/Employee.java | 4 +- .../test/fixtures}/beans/GenericBean.java | 2 +- .../fixtures}/beans/GenericIntegerBean.java | 2 +- .../beans/GenericSetOfIntegerBean.java | 2 +- .../beans/test/fixtures}/beans/HasMap.java | 2 +- .../test/fixtures}/beans/INestedTestBean.java | 2 +- .../beans/test/fixtures}/beans/IOther.java | 2 +- .../beans/test/fixtures}/beans/ITestBean.java | 4 +- .../test/fixtures}/beans/IndexedTestBean.java | 2 +- .../test/fixtures}/beans/LifecycleBean.java | 2 +- .../fixtures}/beans/MustBeInitialized.java | 2 +- .../test/fixtures}/beans/NestedTestBean.java | 2 +- .../test/fixtures}/beans/NumberTestBean.java | 2 +- .../beans/PackageLevelVisibleBean.java | 2 +- .../beans/test/fixtures}/beans/Person.java | 2 +- .../beans/test/fixtures}/beans/Pet.java | 2 +- .../fixtures}/beans/SerializablePerson.java | 2 +- .../test/fixtures}/beans/SideEffectBean.java | 2 +- .../test/fixtures}/beans/TestAnnotation.java | 2 +- .../beans/test/fixtures}/beans/TestBean.java | 8 +- .../fixtures}/beans/factory/DummyFactory.java | 4 +- .../test/fixtures}/beans/package-info.java | 2 +- .../test/fixtures}/beans/subpkg/DeepBean.java | 8 +- .../factory/xml/AbstractBeanFactoryTests.java | 10 +- .../xml/AbstractListableBeanFactoryTests.java | 8 +- .../spring-context-support.gradle | 2 + .../cache/caffeine/CaffeineCacheTests.java | 2 +- .../cache/ehcache/EhCacheCacheTests.java | 2 +- .../jcache/JCacheEhCacheAnnotationTests.java | 10 +- .../cache/jcache/JCacheEhCacheApiTests.java | 2 +- .../jcache/config/JCacheJavaConfigTests.java | 2 +- .../scheduling/quartz/QuartzSupportTests.java | 2 +- .../BeanValidationPostProcessorTests.java | 2 +- spring-context/spring-context.gradle | 5 + .../aop/aspectj/AfterAdviceBindingTests.java | 4 +- .../AfterReturningAdviceBindingTests.java | 4 +- .../AfterThrowingAdviceBindingTests.java | 2 +- .../aop/aspectj/AroundAdviceBindingTests.java | 4 +- .../AspectAndAdvicePrecedenceTests.java | 2 +- ...AspectJExpressionPointcutAdvisorTests.java | 2 +- .../BeanNamePointcutAtAspectTests.java | 4 +- .../aop/aspectj/BeanNamePointcutTests.java | 2 +- .../aop/aspectj/BeforeAdviceBindingTests.java | 4 +- .../aop/aspectj/DeclareParentsTests.java | 2 +- ...licitJPArgumentMatchingAtAspectJTests.java | 10 +- .../AspectImplementingInterfaceTests.java | 2 +- ...xyCreatorAndLazyInitTargetSourceTests.java | 4 +- .../AspectJAutoProxyCreatorTests.java | 8 +- .../AtAspectJAfterThrowingTests.java | 4 +- .../autoproxy/benchmark/BenchmarkTests.java | 2 +- ...fterReturningGenericTypeMatchingTests.java | 4 +- ...NamespaceHandlerProxyTargetClassTests.java | 2 +- .../aop/config/AopNamespaceHandlerTests.java | 4 +- .../aop/framework/AbstractAopProxyTests.java | 10 +- .../aop/framework/CglibProxyTests.java | 4 +- .../aop/framework/JdkDynamicProxyTests.java | 6 +- .../aop/framework/ProxyFactoryBeanTests.java | 12 +- .../AdvisorAdapterRegistrationTests.java | 2 +- .../AdvisorAutoProxyCreatorTests.java | 4 +- .../autoproxy/AutoProxyCreatorTests.java | 8 +- .../BeanNameAutoProxyCreatorInitTests.java | 2 +- .../BeanNameAutoProxyCreatorTests.java | 4 +- .../aop/scope/ScopedProxyTests.java | 6 +- .../target/CommonsPool2TargetSourceTests.java | 6 +- .../LookupMethodWrappedByCglibProxyTests.java | 2 +- ...aceHandlerWithExpressionLanguageTests.java | 2 +- .../factory/xml/XmlBeanFactoryTestTypes.java | 8 +- .../factory/xml/XmlBeanFactoryTests.java | 12 +- .../support/CustomNamespaceHandlerTests.java | 4 +- .../cache/CacheReproTests.java | 2 +- .../concurrent/ConcurrentMapCacheTests.java | 2 +- .../AnnotationDrivenCacheConfigTests.java | 1 + .../AnnotationNamespaceDrivenTests.java | 1 + .../config/CacheAdviceNamespaceTests.java | 1 + .../cache/config/CustomInterceptorTests.java | 4 +- .../config/EnableCachingIntegrationTests.java | 6 +- .../cache/config/EnableCachingTests.java | 8 +- .../cache/config/SomeCustomKeyGenerator.java | 46 - .../CacheResolverCustomizationTests.java | 6 +- .../interceptor/CacheSyncFailureTests.java | 2 +- .../springframework/context/ACATester.java | 49 - .../context/BeanThatBroadcasts.java | 37 - .../context/LifecycleContextBean.java | 2 +- .../springframework/context/TestListener.java | 42 - .../AbstractCircularImportDetectionTests.java | 2 +- .../AnnotationProcessorPerformanceTests.java | 4 +- .../ClassPathBeanDefinitionScannerTests.java | 2 +- ...PathFactoryBeanDefinitionScannerTests.java | 4 +- ...anningCandidateComponentProviderTests.java | 2 +- ...ommonAnnotationBeanPostProcessorTests.java | 10 +- ...mponentScanAnnotationIntegrationTests.java | 2 +- .../ComponentScanParserScopedProxyTests.java | 2 +- .../ConfigurationClassAndBFPPTests.java | 2 +- ...nClassPostConstructAndAutowiringTests.java | 2 +- .../ConfigurationClassPostProcessorTests.java | 4 +- .../FooServiceDependentConverter.java | 6 +- ...wiredAnnotationBeanPostProcessorTests.java | 2 +- .../context/annotation/MyTestBean.java | 4 +- .../NestedConfigurationClassTests.java | 2 +- .../PropertySourceAnnotationTests.java | 2 +- .../componentscan/level1/Level1Config.java | 2 +- .../componentscan/level2/Level2Config.java | 2 +- .../AutowiredConfigurationTests.java | 4 +- .../BeanMethodQualificationTests.java | 4 +- ...figurationClassAspectIntegrationTests.java | 6 +- .../ConfigurationClassProcessingTests.java | 6 +- ...assWithPlaceholderConfigurerBeanTests.java | 4 +- .../ConfigurationMetaAnnotationTests.java | 2 +- .../ImportAnnotationDetectionTests.java | 2 +- .../configuration/ImportResourceTests.java | 4 +- .../annotation/configuration/ImportTests.java | 4 +- ...tedConfigurationClassEnhancementTests.java | 2 +- .../configuration/ScopingTests.java | 4 +- .../annotation4/FactoryMethodComponent.java | 2 +- .../context/annotation4/SimpleBean.java | 2 +- .../annotation6/ConfigForScanning.java | 2 +- .../event/ApplicationContextEventTests.java | 6 +- .../EventPublicationInterceptorTests.java | 12 +- .../ApplicationContextExpressionTests.java | 2 +- .../EnvironmentAccessorIntegrationTests.java | 2 +- .../CandidateComponentsIndexLoaderTests.java | 1 + .../BeanFactoryPostProcessorTests.java | 2 +- ...rtyResourceConfigurerIntegrationTests.java | 2 +- ...ertySourcesPlaceholderConfigurerTests.java | 2 +- .../support/SimpleThreadScopeTests.java | 2 +- ...ticApplicationContextMulticasterTests.java | 8 +- .../StaticApplicationContextTests.java | 8 +- .../support/StaticMessageSourceTests.java | 10 +- .../config/JeeNamespaceHandlerEventTests.java | 2 +- .../ejb/config/JeeNamespaceHandlerTests.java | 4 +- .../jmx/export/MBeanExporterTests.java | 2 +- .../jndi/JndiObjectFactoryBeanTests.java | 10 +- .../jndi/JndiPropertySourceTests.java | 2 +- .../scripting/ContextScriptBean.java | 2 +- .../scripting/TestBeanAwareMessenger.java | 2 +- .../scripting/bsh/BshScriptFactoryTests.java | 2 +- .../groovy/GroovyScriptFactoryTests.java | 2 +- .../tests/context/TestMethodInvokingTask.java | 52 -- .../tests/mock/jndi/package-info.java | 9 - .../tests/sample/beans/FieldAccessBean.java | 2 + .../org/springframework/ui/ModelMapTests.java | 2 +- .../DataBinderFieldAccessTests.java | 2 +- .../validation/DataBinderTests.java | 20 +- .../DefaultMessageCodesResolverTests.java | 17 +- .../validation/ValidationUtilsTests.java | 2 +- .../BeanValidationPostProcessorTests.java | 2 +- .../java/test/aspect/TwoAdviceAspect.java | 4 +- .../aop/aspectj/AfterAdviceBindingTests.xml | 2 +- .../AfterReturningAdviceBindingTests.xml | 4 +- .../AfterThrowingAdviceBindingTests.xml | 2 +- .../aop/aspectj/AroundAdviceBindingTests.xml | 2 +- .../aop/aspectj/AroundAdviceCircularTests.xml | 4 +- .../AspectAndAdvicePrecedenceTests.xml | 2 +- .../AspectJExpressionPointcutAdvisorTests.xml | 4 +- .../aspectj/BeanNamePointcutAtAspectTests.xml | 6 +- .../aop/aspectj/BeanNamePointcutTests.xml | 12 +- .../aop/aspectj/BeforeAdviceBindingTests.xml | 2 +- .../aop/aspectj/DeclareParentsTests.xml | 4 +- ...plicitJPArgumentMatchingAtAspectJTests.xml | 2 +- .../ImplicitJPArgumentMatchingTests.xml | 4 +- .../OverloadedAdviceTests-ambiguous.xml | 2 +- .../aop/aspectj/OverloadedAdviceTests.xml | 2 +- ...pectImplementingInterfaceTests-context.xml | 2 +- .../AspectJAutoProxyCreatorTests-aspects.xml | 4 +- ...toProxyCreatorTests-aspectsPlusAdvisor.xml | 6 +- ...xyCreatorTests-aspectsWithAbstractBean.xml | 2 +- ...oProxyCreatorTests-aspectsWithOrdering.xml | 2 +- ...AspectJAutoProxyCreatorTests-pertarget.xml | 4 +- .../AspectJAutoProxyCreatorTests-perthis.xml | 2 +- ...JAutoProxyCreatorTests-twoAdviceAspect.xml | 2 +- ...yCreatorTests-twoAdviceAspectPrototype.xml | 2 +- ...yCreatorTests-twoAdviceAspectSingleton.xml | 2 +- ...pectJAutoProxyCreatorTests-usesInclude.xml | 2 +- ...oProxyCreatorTests-usesJoinPointAspect.xml | 2 +- .../AtAspectJAfterThrowingTests-context.xml | 2 +- .../benchmark/BenchmarkTests-aspectj.xml | 2 +- .../benchmark/BenchmarkTests-springAop.xml | 2 +- ...pNamespaceHandlerAdviceTypeTests-error.xml | 2 +- .../AopNamespaceHandlerAdviceTypeTests-ok.xml | 2 +- ...AopNamespaceHandlerArgNamesTests-error.xml | 2 +- .../AopNamespaceHandlerArgNamesTests-ok.xml | 2 +- ...ceHandlerProxyTargetClassTests-context.xml | 2 +- ...opNamespaceHandlerReturningTests-error.xml | 2 +- .../AopNamespaceHandlerReturningTests-ok.xml | 2 +- .../AopNamespaceHandlerTests-context.xml | 2 +- ...AopNamespaceHandlerThrowingTests-error.xml | 2 +- .../AopNamespaceHandlerThrowingTests-ok.xml | 2 +- .../config/PrototypeProxyTests-context.xml | 8 +- .../ProxyFactoryBeanTests-autowiring.xml | 2 +- .../ProxyFactoryBeanTests-context.xml | 26 +- ...xyFactoryBeanTests-double-targetsource.xml | 8 +- .../ProxyFactoryBeanTests-frozen.xml | 4 +- ...roxyFactoryBeanTests-inner-bean-target.xml | 2 +- .../ProxyFactoryBeanTests-invalid.xml | 4 +- ...yFactoryBeanTests-notlast-targetsource.xml | 4 +- .../ProxyFactoryBeanTests-prototype.xml | 4 +- .../ProxyFactoryBeanTests-serialization.xml | 10 +- .../ProxyFactoryBeanTests-targetsource.xml | 4 +- ...visorAdapterRegistrationTests-with-bpp.xml | 4 +- ...orAdapterRegistrationTests-without-bpp.xml | 4 +- ...oProxyCreatorTests-common-interceptors.xml | 4 +- ...oProxyCreatorTests-custom-targetsource.xml | 8 +- ...AdvisorAutoProxyCreatorTests-optimized.xml | 2 +- ...toProxyCreatorTests-quick-targetsource.xml | 10 +- ...nNameAutoProxyCreatorInitTests-context.xml | 2 +- .../BeanNameAutoProxyCreatorTests-context.xml | 16 +- .../aop/scope/ScopedProxyTests-list.xml | 2 +- .../aop/scope/ScopedProxyTests-override.xml | 2 +- .../aop/scope/ScopedProxyTests-testbean.xml | 2 +- .../CommonsPool2TargetSourceTests-context.xml | 4 +- ...MethodWrappedByCglibProxyTests-context.xml | 2 +- .../xml/XmlBeanFactoryTests-autowire.xml | 12 +- .../factory/xml/XmlBeanFactoryTests-child.xml | 6 +- .../xml/XmlBeanFactoryTests-collections.xml | 46 +- ...lBeanFactoryTests-complexFactoryCircle.xml | 8 +- .../XmlBeanFactoryTests-constructorArg.xml | 12 +- ...lBeanFactoryTests-constructorOverrides.xml | 2 +- .../XmlBeanFactoryTests-defaultAutowire.xml | 8 +- .../XmlBeanFactoryTests-defaultLazyInit.xml | 2 +- ...mlBeanFactoryTests-delegationOverrides.xml | 4 +- .../xml/XmlBeanFactoryTests-factoryCircle.xml | 2 +- .../xml/XmlBeanFactoryTests-initializers.xml | 2 +- .../xml/XmlBeanFactoryTests-invalid.xml | 2 +- ...toryTests-invalidOverridesNoSuchMethod.xml | 2 +- ...nFactoryTests-localCollectionsUsingXsd.xml | 2 +- .../xml/XmlBeanFactoryTests-overrides.xml | 16 +- .../xml/XmlBeanFactoryTests-parent.xml | 6 +- .../xml/XmlBeanFactoryTests-reftypes.xml | 80 +- ...toryTests-testWithDuplicateNameInAlias.xml | 4 +- ...eanFactoryTests-testWithDuplicateNames.xml | 4 +- ...paceHandlerWithExpressionLanguageTests.xml | 4 +- .../CustomNamespaceHandlerTests-context.xml | 8 +- .../config/annotationDrivenCacheConfig.xml | 8 +- .../config/annotationDrivenCacheNamespace.xml | 8 +- .../cache/config/cache-advice.xml | 8 +- ...ndiBeanFactoryLocatorTests-collections.xml | 46 +- ...textJndiBeanFactoryLocatorTests-parent.xml | 6 +- ...ortNonXmlResourceConfig-context.properties | 2 +- .../configuration/ImportXmlConfig-context.xml | 2 +- .../ImportXmlWithAopNamespace-context.xml | 2 +- .../support/simpleThreadScopeTests.xml | 18 +- .../context/support/testBeans.properties | 20 +- .../ejb/config/jeeNamespaceHandlerTests.xml | 14 +- .../export/propertyPlaceholderConfigurer.xml | 2 +- .../scripting/bsh/MessengerImpl.bsh | 2 +- .../scripting/bsh/bsh-with-xsd.xml | 2 +- .../scripting/groovy/ScriptBean.groovy | 2 +- .../groovy/groovy-multiple-properties.xml | 2 +- .../AbstractApplicationContextTests.java | 21 +- .../test/fixtures}/SimpleMapScope.java | 2 +- .../test/fixtures/beans}/ACATester.java | 11 +- .../fixtures/beans}/BeanThatBroadcasts.java | 7 +- .../test/fixtures/beans}/BeanThatListens.java | 7 +- .../beans/TestApplicationListener.java | 7 +- .../cache}/AbstractCacheAnnotationTests.java | 11 +- .../fixtures}/cache/AbstractCacheTests.java | 4 +- .../AbstractValueAdaptingCacheTests.java | 2 +- .../test/fixtures}/cache/CacheTestUtils.java | 4 +- .../cache}/SomeCustomKeyGenerator.java | 6 +- .../fixtures/cache}/SomeKeyGenerator.java | 2 +- .../AnnotatedClassCacheableService.java | 2 +- .../cache/beans}/CacheableService.java | 2 +- .../cache/beans}/DefaultCacheableService.java | 2 +- .../fixtures/cache/beans}/TestEntity.java | 2 +- .../CandidateComponentsTestClassLoader.java | 7 +- .../jndi/ExpectedLookupTemplate.java | 9 +- .../fixtures}/jndi/SimpleNamingContext.java | 11 +- .../jndi/SimpleNamingContextBuilder.java | 9 +- spring-jdbc/spring-jdbc.gradle | 1 + .../jdbc/core/RowMapperTests.java | 2 +- .../BeanPropertySqlParameterSourceTests.java | 2 +- .../JdbcBeanDefinitionReaderTests.java | 5 +- spring-jms/spring-jms.gradle | 1 + .../jms/config/JmsNamespaceHandlerTests.java | 2 +- .../jms/remoting/JmsInvokerTests.java | 4 +- .../jms/config/jmsNamespaceHandlerTests.xml | 4 +- spring-orm/spring-orm.gradle | 2 + .../orm/jpa/domain/Person.java | 2 +- .../DefaultPersistenceUnitManagerTests.java | 2 +- .../PersistenceXmlParsingTests.java | 2 +- .../support/PersistenceInjectionTests.java | 4 +- .../orm/jpa/domain/persistence-multi.xml | 2 +- spring-test/spring-test.gradle | 2 + .../mock}/jndi/SimpleNamingContextTests.java | 14 +- ...dingPropertiesAndInheritedLoaderTests.java | 2 +- ...ithPropertiesExtendingPropertiesTests.java | 2 +- .../ActiveProfilesInterfaceTests.java | 2 +- .../ContextConfigurationInterfaceTests.java | 2 +- .../ContextConfigurationTestInterface.java | 2 +- ...riptDetectionGroovySpringContextTests.java | 4 +- .../groovy/GroovyControlGroupTests.java | 4 +- .../groovy/GroovySpringContextTests.java | 4 +- .../MixedXmlAndGroovySpringContextTests.java | 4 +- ...TransactionalJUnit4SpringContextTests.java | 4 +- ...ltContextLoaderClassSpringRunnerTests.java | 2 +- ...ParameterizedDependencyInjectionTests.java | 4 +- ...sedSpringJUnit4ClassRunnerAppCtxTests.java | 2 +- .../SpringJUnit4ClassRunnerAppCtxTests.java | 4 +- ...ingDefaultConfigClassesInheritedTests.java | 2 +- .../DefaultConfigClassesBaseTests.java | 2 +- .../DefaultConfigClassesInheritedTests.java | 2 +- ...ingDefaultConfigClassesInheritedTests.java | 2 +- ...ltLoaderDefaultConfigClassesBaseTests.java | 2 +- ...derDefaultConfigClassesInheritedTests.java | 2 +- ...tLoaderExplicitConfigClassesBaseTests.java | 2 +- ...erExplicitConfigClassesInheritedTests.java | 2 +- .../ExplicitConfigClassesBaseTests.java | 2 +- .../ExplicitConfigClassesInheritedTests.java | 2 +- .../annotation/PojoAndStringConfig.java | 4 +- ...mDefaultsMetaConfigWithOverridesTests.java | 4 +- .../DefaultProfileAnnotationConfigTests.java | 4 +- .../annotation/DefaultProfileConfig.java | 2 +- .../profile/annotation/DevProfileConfig.java | 2 +- .../DefaultProfileAnnotationConfigTests.java | 4 +- .../importresource/DefaultProfileConfig.java | 2 +- .../xml/DefaultProfileXmlConfigTests.java | 4 +- .../rules/ParameterizedSpringRuleTests.java | 4 +- .../spr3896/DefaultLocationsBaseTests.java | 2 +- .../DefaultLocationsInheritedTests.java | 2 +- .../spr3896/ExplicitLocationsBaseTests.java | 2 +- .../ExplicitLocationsInheritedTests.java | 2 +- ...ransactionalAnnotatedConfigClassTests.java | 2 +- ...edConfigClassWithAtConfigurationTests.java | 2 +- ...figClassesWithoutAtConfigurationTests.java | 2 +- ...otationConfigTestNGSpringContextTests.java | 4 +- ...TransactionalTestNGSpringContextTests.java | 4 +- ...TransactionalTestNGSpringContextTests.java | 4 +- .../RequestAndSessionScopedBeansWacTests.java | 2 +- ...AndInheritedLoaderTests-context.properties | 2 +- ...xtendingPropertiesTests-context.properties | 2 +- ...tionGroovySpringContextTestsContext.groovy | 4 +- .../test/context/groovy/context.groovy | 4 +- .../test/context/groovy/contextB.xml | 4 +- ...tionalJUnit4SpringContextTests-context.xml | 4 +- ...gJUnit4ClassRunnerAppCtxTests-context1.xml | 2 +- ...gJUnit4ClassRunnerAppCtxTests-context2.xml | 2 +- ...erizedDependencyInjectionTests-context.xml | 6 +- ...4ClassRunnerAppCtxTests-context.properties | 2 +- ...ngJUnit4ClassRunnerAppCtxTests-context.xml | 4 +- .../junit4/profile/importresource/import.xml | 2 +- .../DefaultProfileXmlConfigTests-context.xml | 4 +- ...DefaultLocationsInheritedTests-context.xml | 2 +- .../DefaultLocationsBaseTests-context.xml | 2 +- ...DefaultLocationsInheritedTests-context.xml | 2 +- ...tionalTestNGSpringContextTests-context.xml | 4 +- ...tAndSessionScopedBeansWacTests-context.xml | 4 +- spring-tx/spring-tx.gradle | 2 + .../JndiJtaTransactionManagerTests.java | 2 +- .../TxNamespaceHandlerEventTests.java | 2 +- .../transaction/TxNamespaceHandlerTests.java | 2 +- .../AbstractTransactionAspectTests.java | 4 +- .../BeanFactoryTransactionTests.java | 6 +- .../interceptor/ImplementsNoInterfaces.java | 2 +- .../WebSphereUowTransactionManagerTests.java | 2 +- ...aTransactionManagerSerializationTests.java | 2 +- .../support/SimpleTransactionScopeTests.java | 4 +- .../noTransactionAttributeSource.xml | 2 +- .../interceptor/transactionalBeanFactory.xml | 12 +- .../transaction/txNamespaceHandlerTests.xml | 2 +- spring-web/spring-web.gradle | 2 + .../remoting/caucho/CauchoRemotingTests.java | 4 +- .../httpinvoker/HttpInvokerTests.java | 4 +- .../web/bind/EscapedErrorsTests.java | 2 +- .../bind/ServletRequestDataBinderTests.java | 4 +- .../support/WebExchangeDataBinderTests.java | 4 +- .../support/WebRequestDataBinderTests.java | 4 +- .../RequestAndSessionScopedBeanTests.java | 2 +- .../context/request/RequestScopeTests.java | 4 +- .../request/RequestScopedProxyTests.java | 8 +- .../context/request/SessionScopeTests.java | 4 +- .../WebApplicationContextScopeTests.java | 2 +- .../SpringBeanAutowiringSupportTests.java | 4 +- .../StandardServletEnvironmentTests.java | 2 +- .../ModelAttributeMethodProcessorTests.java | 2 +- .../SessionAttributesHandlerTests.java | 2 +- .../web/context/request/requestScopeTests.xml | 18 +- .../request/requestScopedProxyTests.xml | 20 +- .../web/context/request/sessionScopeTests.xml | 4 +- spring-webflux/spring-webflux.gradle | 1 + .../SessionAttributesHandlerTests.java | 2 +- .../result/view/AbstractViewTests.java | 2 +- .../view/freemarker/FreeMarkerMacroTests.java | 2 +- spring-webmvc/spring-webmvc.gradle | 2 + .../context/BeanThatListens.java | 62 -- .../context/LifecycleContextBean.java | 3 +- .../web/context/ContextLoaderTests.java | 4 +- .../XmlWebApplicationContextTests.java | 14 +- .../support/ServletContextSupportTests.java | 2 +- .../web/servlet/DispatcherServletTests.java | 2 +- ...MvcConfigurationSupportExtensionTests.java | 2 +- .../ResponseStatusExceptionResolverTests.java | 2 +- ...ExtendedServletRequestDataBinderTests.java | 2 +- ...ResolverMethodReturnValueHandlerTests.java | 2 +- ...MappingHandlerAdapterIntegrationTests.java | 2 +- ...nnotationControllerHandlerMethodTests.java | 10 +- ...letModelAttributeMethodProcessorTests.java | 2 +- .../DefaultHandlerExceptionResolverTests.java | 2 +- .../RedirectAttributesModelMapTests.java | 2 +- .../web/servlet/tags/BindTagTests.java | 6 +- .../tags/form/AbstractFormTagTests.java | 2 +- .../web/servlet/tags/form/ButtonTagTests.java | 2 +- .../servlet/tags/form/CheckboxTagTests.java | 6 +- .../servlet/tags/form/CheckboxesTagTests.java | 6 +- .../web/servlet/tags/form/ErrorsTagTests.java | 2 +- .../tags/form/HiddenInputTagTests.java | 2 +- .../web/servlet/tags/form/InputTagTests.java | 2 +- .../web/servlet/tags/form/LabelTagTests.java | 2 +- .../servlet/tags/form/OptionTagEnumTests.java | 4 +- .../web/servlet/tags/form/OptionTagTests.java | 4 +- .../servlet/tags/form/OptionsTagTests.java | 2 +- .../tags/form/RadioButtonTagTests.java | 4 +- .../tags/form/RadioButtonsTagTests.java | 6 +- .../web/servlet/tags/form/SelectTagTests.java | 4 +- .../tags/form/TestBeanWithRealCountry.java | 2 +- .../servlet/tags/form/TextareaTagTests.java | 2 +- .../web/servlet/view/RedirectViewTests.java | 2 +- .../web/servlet/view/ViewResolverTests.java | 2 +- .../view/freemarker/FreeMarkerMacroTests.java | 2 +- .../ContextLoaderTests-acc-context.xml | 2 +- .../context/WEB-INF/applicationContext.xml | 10 +- .../web/context/WEB-INF/context-addition.xml | 20 +- .../web/context/WEB-INF/contextInclude.xml | 2 +- .../web/context/WEB-INF/sessionContext.xml | 4 +- .../web/context/WEB-INF/test-servlet.xml | 22 +- .../web/context/WEB-INF/testNamespace.xml | 4 +- 585 files changed, 2270 insertions(+), 1618 deletions(-) create mode 100644 spring-aspects/src/test/java/org/springframework/cache/aspectj/AbstractCacheAnnotationTests.java delete mode 100644 spring-aspects/src/test/java/org/springframework/cache/config/SomeKeyGenerator.java rename spring-beans/src/{test/java/org/springframework/tests/sample => testFixtures/java/org/springframework/beans/test/fixtures}/beans/AgeHolder.java (93%) rename spring-beans/src/{test/java/org/springframework/tests/sample => testFixtures/java/org/springframework/beans/test/fixtures}/beans/AnnotatedBean.java (92%) rename spring-beans/src/{test/java/org/springframework/tests/sample => testFixtures/java/org/springframework/beans/test/fixtures}/beans/BooleanTestBean.java (94%) rename spring-beans/src/{test/java/org/springframework/tests => testFixtures/java/org/springframework/beans/test/fixtures}/beans/CollectingReaderEventListener.java (98%) rename spring-beans/src/{test/java/org/springframework/tests/sample => testFixtures/java/org/springframework/beans/test/fixtures}/beans/Colour.java (95%) rename spring-beans/src/{test/java/org/springframework/tests/sample => testFixtures/java/org/springframework/beans/test/fixtures}/beans/CountingTestBean.java (93%) rename spring-beans/src/{test/java/org/springframework/tests/sample => testFixtures/java/org/springframework/beans/test/fixtures}/beans/CustomEnum.java (93%) rename spring-beans/src/{test/java/org/springframework/tests/sample => testFixtures/java/org/springframework/beans/test/fixtures}/beans/DependenciesBean.java (96%) rename spring-beans/src/{test/java/org/springframework/tests/sample => testFixtures/java/org/springframework/beans/test/fixtures}/beans/DerivedTestBean.java (97%) rename spring-beans/src/{test/java/org/springframework/tests/sample => testFixtures/java/org/springframework/beans/test/fixtures}/beans/DummyBean.java (96%) rename spring-beans/src/{test/java/org/springframework/tests/sample => testFixtures/java/org/springframework/beans/test/fixtures}/beans/DummyFactory.java (98%) rename {spring-context/src/test/java/org/springframework/tests/sample => spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures}/beans/Employee.java (88%) rename spring-beans/src/{test/java/org/springframework/tests/sample => testFixtures/java/org/springframework/beans/test/fixtures}/beans/GenericBean.java (99%) rename spring-beans/src/{test/java/org/springframework/tests/sample => testFixtures/java/org/springframework/beans/test/fixtures}/beans/GenericIntegerBean.java (92%) rename spring-beans/src/{test/java/org/springframework/tests/sample => testFixtures/java/org/springframework/beans/test/fixtures}/beans/GenericSetOfIntegerBean.java (93%) rename spring-beans/src/{test/java/org/springframework/tests/sample => testFixtures/java/org/springframework/beans/test/fixtures}/beans/HasMap.java (97%) rename spring-beans/src/{test/java/org/springframework/tests/sample => testFixtures/java/org/springframework/beans/test/fixtures}/beans/INestedTestBean.java (92%) rename spring-beans/src/{test/java/org/springframework/tests/sample => testFixtures/java/org/springframework/beans/test/fixtures}/beans/IOther.java (92%) rename spring-beans/src/{test/java/org/springframework/tests/sample => testFixtures/java/org/springframework/beans/test/fixtures}/beans/ITestBean.java (92%) rename spring-beans/src/{test/java/org/springframework/tests/sample => testFixtures/java/org/springframework/beans/test/fixtures}/beans/IndexedTestBean.java (98%) rename spring-beans/src/{test/java/org/springframework/tests/sample => testFixtures/java/org/springframework/beans/test/fixtures}/beans/LifecycleBean.java (98%) rename spring-beans/src/{test/java/org/springframework/tests/sample => testFixtures/java/org/springframework/beans/test/fixtures}/beans/MustBeInitialized.java (96%) rename spring-beans/src/{test/java/org/springframework/tests/sample => testFixtures/java/org/springframework/beans/test/fixtures}/beans/NestedTestBean.java (96%) rename spring-beans/src/{test/java/org/springframework/tests/sample => testFixtures/java/org/springframework/beans/test/fixtures}/beans/NumberTestBean.java (97%) rename spring-beans/src/{test/java/org/springframework/tests/sample => testFixtures/java/org/springframework/beans/test/fixtures}/beans/PackageLevelVisibleBean.java (93%) rename {spring-aop/src/test/java/org/springframework/tests/sample => spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures}/beans/Person.java (94%) rename spring-beans/src/{test/java/org/springframework/tests/sample => testFixtures/java/org/springframework/beans/test/fixtures}/beans/Pet.java (95%) rename {spring-aop/src/test/java/org/springframework/tests/sample => spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures}/beans/SerializablePerson.java (96%) rename spring-beans/src/{test/java/org/springframework/tests/sample => testFixtures/java/org/springframework/beans/test/fixtures}/beans/SideEffectBean.java (94%) rename spring-beans/src/{test/java/org/springframework/tests/sample => testFixtures/java/org/springframework/beans/test/fixtures}/beans/TestAnnotation.java (93%) rename spring-beans/src/{test/java/org/springframework/tests/sample => testFixtures/java/org/springframework/beans/test/fixtures}/beans/TestBean.java (96%) rename spring-beans/src/{test/java/org/springframework/tests/sample => testFixtures/java/org/springframework/beans/test/fixtures}/beans/factory/DummyFactory.java (97%) rename spring-beans/src/{test/java/org/springframework/tests/sample => testFixtures/java/org/springframework/beans/test/fixtures}/beans/package-info.java (55%) rename {spring-aop/src/test/java/org/springframework/tests/sample => spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures}/beans/subpkg/DeepBean.java (74%) rename spring-beans/src/{test/java/org/springframework/beans => testFixtures/java/org/springframework/beans/test/fixtures}/factory/xml/AbstractBeanFactoryTests.java (96%) rename spring-beans/src/{test/java/org/springframework/beans => testFixtures/java/org/springframework/beans/test/fixtures}/factory/xml/AbstractListableBeanFactoryTests.java (90%) delete mode 100644 spring-context/src/test/java/org/springframework/cache/config/SomeCustomKeyGenerator.java delete mode 100644 spring-context/src/test/java/org/springframework/context/ACATester.java delete mode 100644 spring-context/src/test/java/org/springframework/context/BeanThatBroadcasts.java delete mode 100644 spring-context/src/test/java/org/springframework/context/TestListener.java delete mode 100644 spring-context/src/test/java/org/springframework/tests/context/TestMethodInvokingTask.java delete mode 100644 spring-context/src/test/java/org/springframework/tests/mock/jndi/package-info.java rename spring-context/src/{test/java/org/springframework/context => testFixtures/java/org/springframework/context/test/fixtures}/AbstractApplicationContextTests.java (87%) rename spring-context/src/{test/java/org/springframework/tests/context => testFixtures/java/org/springframework/context/test/fixtures}/SimpleMapScope.java (97%) rename {spring-webmvc/src/test/java/org/springframework/context => spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/beans}/ACATester.java (75%) rename {spring-webmvc/src/test/java/org/springframework/context => spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/beans}/BeanThatBroadcasts.java (81%) rename spring-context/src/{test/java/org/springframework/context => testFixtures/java/org/springframework/context/test/fixtures/beans}/BeanThatListens.java (87%) rename spring-webmvc/src/test/java/org/springframework/context/TestListener.java => spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/beans/TestApplicationListener.java (78%) rename spring-context/src/{test/java/org/springframework/cache/config => testFixtures/java/org/springframework/context/test/fixtures/cache}/AbstractCacheAnnotationTests.java (97%) rename spring-context/src/{test/java/org/springframework => testFixtures/java/org/springframework/context/test/fixtures}/cache/AbstractCacheTests.java (98%) rename spring-context/src/{test/java/org/springframework => testFixtures/java/org/springframework/context/test/fixtures}/cache/AbstractValueAdaptingCacheTests.java (96%) rename spring-context/src/{test/java/org/springframework => testFixtures/java/org/springframework/context/test/fixtures}/cache/CacheTestUtils.java (93%) rename {spring-aspects/src/test/java/org/springframework/cache/config => spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/cache}/SomeCustomKeyGenerator.java (88%) rename spring-context/src/{test/java/org/springframework/cache/config => testFixtures/java/org/springframework/context/test/fixtures/cache}/SomeKeyGenerator.java (92%) rename spring-context/src/{test/java/org/springframework/cache/config => testFixtures/java/org/springframework/context/test/fixtures/cache/beans}/AnnotatedClassCacheableService.java (99%) rename spring-context/src/{test/java/org/springframework/cache/config => testFixtures/java/org/springframework/context/test/fixtures/cache/beans}/CacheableService.java (96%) rename spring-context/src/{test/java/org/springframework/cache/config => testFixtures/java/org/springframework/context/test/fixtures/cache/beans}/DefaultCacheableService.java (99%) rename spring-context/src/{test/java/org/springframework/cache/config => testFixtures/java/org/springframework/context/test/fixtures/cache/beans}/TestEntity.java (95%) rename spring-context/src/{test/java/org/springframework/context => testFixtures/java/org/springframework/context/test/fixtures}/index/CandidateComponentsTestClassLoader.java (91%) rename spring-context/src/{test/java/org/springframework/tests/mock => testFixtures/java/org/springframework/context/test/fixtures}/jndi/ExpectedLookupTemplate.java (87%) rename spring-context/src/{test/java/org/springframework/tests/mock => testFixtures/java/org/springframework/context/test/fixtures}/jndi/SimpleNamingContext.java (96%) rename spring-context/src/{test/java/org/springframework/tests/mock => testFixtures/java/org/springframework/context/test/fixtures}/jndi/SimpleNamingContextBuilder.java (96%) rename {spring-context/src/test/java/org/springframework => spring-test/src/test/java/org/springframework/mock}/jndi/SimpleNamingContextTests.java (96%) delete mode 100644 spring-webmvc/src/test/java/org/springframework/context/BeanThatListens.java diff --git a/buildSrc/src/main/java/org/springframework/build/testsources/TestSourcesPlugin.java b/buildSrc/src/main/java/org/springframework/build/testsources/TestSourcesPlugin.java index b93ca0f77df..db5a10a7683 100644 --- a/buildSrc/src/main/java/org/springframework/build/testsources/TestSourcesPlugin.java +++ b/buildSrc/src/main/java/org/springframework/build/testsources/TestSourcesPlugin.java @@ -59,7 +59,7 @@ public class TestSourcesPlugin implements Plugin { * Projects which will not be automatically added as a test dependency. *

This is used to assist with the migration to Gradle test fixtures. */ - private static final List excludedProjects = Arrays.asList("spring-core"); + private static final List excludedProjects = Arrays.asList("spring-beans", "spring-core", "spring-context"); @Override diff --git a/integration-tests/integration-tests.gradle b/integration-tests/integration-tests.gradle index afaa939a61b..539c743372d 100644 --- a/integration-tests/integration-tests.gradle +++ b/integration-tests/integration-tests.gradle @@ -7,6 +7,7 @@ dependencies { testCompile(project(":spring-beans")) testCompile(project(":spring-context")) testCompile(project(":spring-core")) + testCompile(testFixtures(project(":spring-beans"))) testCompile(testFixtures(project(":spring-core"))) testCompile(project(":spring-expression")) testCompile(project(":spring-jdbc")) diff --git a/integration-tests/src/test/java/org/springframework/aop/config/AopNamespaceHandlerScopeIntegrationTests.java b/integration-tests/src/test/java/org/springframework/aop/config/AopNamespaceHandlerScopeIntegrationTests.java index 173da6e54d7..c2a265443ab 100644 --- a/integration-tests/src/test/java/org/springframework/aop/config/AopNamespaceHandlerScopeIntegrationTests.java +++ b/integration-tests/src/test/java/org/springframework/aop/config/AopNamespaceHandlerScopeIntegrationTests.java @@ -21,12 +21,12 @@ import org.junit.jupiter.api.Test; import org.springframework.aop.framework.Advised; import org.springframework.aop.support.AopUtils; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.test.fixtures.beans.ITestBean; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.core.test.fixtures.io.SerializationTestUtils; import org.springframework.mock.web.MockHttpServletRequest; import org.springframework.mock.web.MockHttpSession; import org.springframework.test.context.junit.jupiter.web.SpringJUnitWebConfig; -import org.springframework.tests.sample.beans.ITestBean; -import org.springframework.tests.sample.beans.TestBean; import org.springframework.web.context.request.RequestContextHolder; import org.springframework.web.context.request.ServletRequestAttributes; diff --git a/integration-tests/src/test/java/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorIntegrationTests.java b/integration-tests/src/test/java/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorIntegrationTests.java index e8d30cd33b9..e7060f90983 100644 --- a/integration-tests/src/test/java/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorIntegrationTests.java +++ b/integration-tests/src/test/java/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorIntegrationTests.java @@ -28,12 +28,12 @@ import org.springframework.aop.support.AopUtils; import org.springframework.aop.support.StaticMethodMatcherPointcutAdvisor; import org.springframework.beans.factory.BeanFactory; import org.springframework.beans.factory.InitializingBean; +import org.springframework.beans.test.fixtures.beans.ITestBean; import org.springframework.context.support.ClassPathXmlApplicationContext; import org.springframework.lang.Nullable; import org.springframework.tests.aop.advice.CountingBeforeAdvice; import org.springframework.tests.aop.advice.MethodCounter; import org.springframework.tests.aop.interceptor.NopInterceptor; -import org.springframework.tests.sample.beans.ITestBean; import org.springframework.tests.transaction.CallCountingTransactionManager; import org.springframework.transaction.NoTransactionException; import org.springframework.transaction.interceptor.TransactionInterceptor; diff --git a/integration-tests/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerScopeIntegrationTests-context.xml b/integration-tests/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerScopeIntegrationTests-context.xml index 56d265dc06f..ccbe045e9a5 100644 --- a/integration-tests/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerScopeIntegrationTests-context.xml +++ b/integration-tests/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerScopeIntegrationTests-context.xml @@ -11,19 +11,19 @@ - + - + - + - + diff --git a/integration-tests/src/test/resources/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorIntegrationTests-context.xml b/integration-tests/src/test/resources/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorIntegrationTests-context.xml index 7c2adb9e012..4e7280580da 100644 --- a/integration-tests/src/test/resources/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorIntegrationTests-context.xml +++ b/integration-tests/src/test/resources/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorIntegrationTests-context.xml @@ -74,20 +74,20 @@ - + - + - org.springframework.tests.sample.beans.ITestBean.getName + org.springframework.beans.test.fixtures.beans.ITestBean.getName - + 4 @@ -97,7 +97,7 @@ - + diff --git a/spring-aop/spring-aop.gradle b/spring-aop/spring-aop.gradle index 3d000edc2d4..64c8fc6ef60 100644 --- a/spring-aop/spring-aop.gradle +++ b/spring-aop/spring-aop.gradle @@ -6,5 +6,6 @@ dependencies { optional("org.aspectj:aspectjweaver") optional("org.apache.commons:commons-pool2") optional("com.jamonapi:jamon") + testCompile(testFixtures(project(":spring-beans"))) testCompile(testFixtures(project(":spring-core"))) } diff --git a/spring-aop/src/test/java/org/springframework/aop/aspectj/AspectJExpressionPointcutTests.java b/spring-aop/src/test/java/org/springframework/aop/aspectj/AspectJExpressionPointcutTests.java index 2ba65e3502b..3e9603edc18 100644 --- a/spring-aop/src/test/java/org/springframework/aop/aspectj/AspectJExpressionPointcutTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/aspectj/AspectJExpressionPointcutTests.java @@ -31,10 +31,10 @@ import org.springframework.aop.MethodMatcher; import org.springframework.aop.Pointcut; import org.springframework.aop.framework.ProxyFactory; import org.springframework.aop.support.DefaultPointcutAdvisor; -import org.springframework.tests.sample.beans.IOther; -import org.springframework.tests.sample.beans.ITestBean; -import org.springframework.tests.sample.beans.TestBean; -import org.springframework.tests.sample.beans.subpkg.DeepBean; +import org.springframework.beans.test.fixtures.beans.IOther; +import org.springframework.beans.test.fixtures.beans.ITestBean; +import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.test.fixtures.beans.subpkg.DeepBean; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; @@ -67,7 +67,7 @@ public class AspectJExpressionPointcutTests { @Test public void testMatchExplicit() { - String expression = "execution(int org.springframework.tests.sample.beans.TestBean.getAge())"; + String expression = "execution(int org.springframework.beans.test.fixtures.beans.TestBean.getAge())"; Pointcut pointcut = getPointcut(expression); ClassFilter classFilter = pointcut.getClassFilter(); @@ -117,8 +117,8 @@ public class AspectJExpressionPointcutTests { * @param which this or target */ private void testThisOrTarget(String which) throws SecurityException, NoSuchMethodException { - String matchesTestBean = which + "(org.springframework.tests.sample.beans.TestBean)"; - String matchesIOther = which + "(org.springframework.tests.sample.beans.IOther)"; + String matchesTestBean = which + "(org.springframework.beans.test.fixtures.beans.TestBean)"; + String matchesIOther = which + "(org.springframework.beans.test.fixtures.beans.IOther)"; AspectJExpressionPointcut testBeanPc = new AspectJExpressionPointcut(); testBeanPc.setExpression(matchesTestBean); @@ -142,7 +142,7 @@ public class AspectJExpressionPointcutTests { } private void testWithinPackage(boolean matchSubpackages) throws SecurityException, NoSuchMethodException { - String withinBeansPackage = "within(org.springframework.tests.sample.beans."; + String withinBeansPackage = "within(org.springframework.beans.test.fixtures.beans."; // Subpackages are matched by ** if (matchSubpackages) { withinBeansPackage += "."; @@ -187,7 +187,7 @@ public class AspectJExpressionPointcutTests { @Test public void testMatchWithArgs() throws Exception { - String expression = "execution(void org.springframework.tests.sample.beans.TestBean.setSomeNumber(Number)) && args(Double)"; + String expression = "execution(void org.springframework.beans.test.fixtures.beans.TestBean.setSomeNumber(Number)) && args(Double)"; Pointcut pointcut = getPointcut(expression); ClassFilter classFilter = pointcut.getClassFilter(); @@ -206,7 +206,7 @@ public class AspectJExpressionPointcutTests { @Test public void testSimpleAdvice() { - String expression = "execution(int org.springframework.tests.sample.beans.TestBean.getAge())"; + String expression = "execution(int org.springframework.beans.test.fixtures.beans.TestBean.getAge())"; CallCountingInterceptor interceptor = new CallCountingInterceptor(); TestBean testBean = getAdvisedProxy(expression, interceptor); @@ -219,7 +219,7 @@ public class AspectJExpressionPointcutTests { @Test public void testDynamicMatchingProxy() { - String expression = "execution(void org.springframework.tests.sample.beans.TestBean.setSomeNumber(Number)) && args(Double)"; + String expression = "execution(void org.springframework.beans.test.fixtures.beans.TestBean.setSomeNumber(Number)) && args(Double)"; CallCountingInterceptor interceptor = new CallCountingInterceptor(); TestBean testBean = getAdvisedProxy(expression, interceptor); @@ -233,7 +233,7 @@ public class AspectJExpressionPointcutTests { @Test public void testInvalidExpression() { - String expression = "execution(void org.springframework.tests.sample.beans.TestBean.setSomeNumber(Number) && args(Double)"; + String expression = "execution(void org.springframework.beans.test.fixtures.beans.TestBean.setSomeNumber(Number) && args(Double)"; assertThatIllegalArgumentException().isThrownBy( getPointcut(expression)::getClassFilter); // call to getClassFilter forces resolution } @@ -264,7 +264,7 @@ public class AspectJExpressionPointcutTests { @Test public void testWithUnsupportedPointcutPrimitive() { - String expression = "call(int org.springframework.tests.sample.beans.TestBean.getAge())"; + String expression = "call(int org.springframework.beans.test.fixtures.beans.TestBean.getAge())"; assertThatExceptionOfType(UnsupportedPointcutPrimitiveException.class).isThrownBy(() -> getPointcut(expression).getClassFilter()) // call to getClassFilter forces resolution... .satisfies(ex -> assertThat(ex.getUnsupportedPrimitive()).isEqualTo(PointcutPrimitive.CALL)); diff --git a/spring-aop/src/test/java/org/springframework/aop/aspectj/BeanNamePointcutMatchingTests.java b/spring-aop/src/test/java/org/springframework/aop/aspectj/BeanNamePointcutMatchingTests.java index 37787c68646..f64fbdaf301 100644 --- a/spring-aop/src/test/java/org/springframework/aop/aspectj/BeanNamePointcutMatchingTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/aspectj/BeanNamePointcutMatchingTests.java @@ -18,7 +18,7 @@ package org.springframework.aop.aspectj; import org.junit.jupiter.api.Test; -import org.springframework.tests.sample.beans.TestBean; +import org.springframework.beans.test.fixtures.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-aop/src/test/java/org/springframework/aop/aspectj/MethodInvocationProceedingJoinPointTests.java b/spring-aop/src/test/java/org/springframework/aop/aspectj/MethodInvocationProceedingJoinPointTests.java index 13c911c3343..157c85f0e64 100644 --- a/spring-aop/src/test/java/org/springframework/aop/aspectj/MethodInvocationProceedingJoinPointTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/aspectj/MethodInvocationProceedingJoinPointTests.java @@ -33,8 +33,8 @@ import org.springframework.aop.framework.AopContext; import org.springframework.aop.framework.ProxyFactory; import org.springframework.aop.interceptor.ExposeInvocationInterceptor; import org.springframework.aop.support.AopUtils; -import org.springframework.tests.sample.beans.ITestBean; -import org.springframework.tests.sample.beans.TestBean; +import org.springframework.beans.test.fixtures.beans.ITestBean; +import org.springframework.beans.test.fixtures.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; diff --git a/spring-aop/src/test/java/org/springframework/aop/aspectj/TigerAspectJExpressionPointcutTests.java b/spring-aop/src/test/java/org/springframework/aop/aspectj/TigerAspectJExpressionPointcutTests.java index 5e9acc89d42..6a87160981f 100644 --- a/spring-aop/src/test/java/org/springframework/aop/aspectj/TigerAspectJExpressionPointcutTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/aspectj/TigerAspectJExpressionPointcutTests.java @@ -27,7 +27,7 @@ import test.annotation.EmptySpringAnnotation; import test.annotation.transaction.Tx; import org.springframework.aop.framework.ProxyFactory; -import org.springframework.tests.sample.beans.TestBean; +import org.springframework.beans.test.fixtures.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; @@ -56,7 +56,7 @@ public class TigerAspectJExpressionPointcutTests { @Test public void testMatchGenericArgument() { - String expression = "execution(* set*(java.util.List) )"; + String expression = "execution(* set*(java.util.List) )"; AspectJExpressionPointcut ajexp = new AspectJExpressionPointcut(); ajexp.setExpression(expression); diff --git a/spring-aop/src/test/java/org/springframework/aop/aspectj/TypePatternClassFilterTests.java b/spring-aop/src/test/java/org/springframework/aop/aspectj/TypePatternClassFilterTests.java index feaefe0e7f7..c9571051742 100644 --- a/spring-aop/src/test/java/org/springframework/aop/aspectj/TypePatternClassFilterTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/aspectj/TypePatternClassFilterTests.java @@ -20,11 +20,11 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.factory.BeanFactory; import org.springframework.beans.factory.support.DefaultListableBeanFactory; -import org.springframework.tests.sample.beans.CountingTestBean; -import org.springframework.tests.sample.beans.IOther; -import org.springframework.tests.sample.beans.ITestBean; -import org.springframework.tests.sample.beans.TestBean; -import org.springframework.tests.sample.beans.subpkg.DeepBean; +import org.springframework.beans.test.fixtures.beans.CountingTestBean; +import org.springframework.beans.test.fixtures.beans.IOther; +import org.springframework.beans.test.fixtures.beans.ITestBean; +import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.test.fixtures.beans.subpkg.DeepBean; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException; @@ -57,7 +57,7 @@ class TypePatternClassFilterTests { @Test void validPatternMatching() { - TypePatternClassFilter tpcf = new TypePatternClassFilter("org.springframework.tests.sample.beans.*"); + TypePatternClassFilter tpcf = new TypePatternClassFilter("org.springframework.beans.test.fixtures.beans.*"); assertThat(tpcf.matches(TestBean.class)).as("Must match: in package").isTrue(); assertThat(tpcf.matches(ITestBean.class)).as("Must match: in package").isTrue(); @@ -70,7 +70,7 @@ class TypePatternClassFilterTests { @Test void subclassMatching() { - TypePatternClassFilter tpcf = new TypePatternClassFilter("org.springframework.tests.sample.beans.ITestBean+"); + TypePatternClassFilter tpcf = new TypePatternClassFilter("org.springframework.beans.test.fixtures.beans.ITestBean+"); assertThat(tpcf.matches(TestBean.class)).as("Must match: in package").isTrue(); assertThat(tpcf.matches(ITestBean.class)).as("Must match: in package").isTrue(); @@ -98,8 +98,8 @@ class TypePatternClassFilterTests { @Test void testEquals() { - TypePatternClassFilter filter1 = new TypePatternClassFilter("org.springframework.tests.sample.beans.*"); - TypePatternClassFilter filter2 = new TypePatternClassFilter("org.springframework.tests.sample.beans.*"); + TypePatternClassFilter filter1 = new TypePatternClassFilter("org.springframework.beans.test.fixtures.beans.*"); + TypePatternClassFilter filter2 = new TypePatternClassFilter("org.springframework.beans.test.fixtures.beans.*"); TypePatternClassFilter filter3 = new TypePatternClassFilter("org.springframework.tests.*"); assertThat(filter1).isEqualTo(filter2); @@ -108,8 +108,8 @@ class TypePatternClassFilterTests { @Test void testHashCode() { - TypePatternClassFilter filter1 = new TypePatternClassFilter("org.springframework.tests.sample.beans.*"); - TypePatternClassFilter filter2 = new TypePatternClassFilter("org.springframework.tests.sample.beans.*"); + TypePatternClassFilter filter1 = new TypePatternClassFilter("org.springframework.beans.test.fixtures.beans.*"); + TypePatternClassFilter filter2 = new TypePatternClassFilter("org.springframework.beans.test.fixtures.beans.*"); TypePatternClassFilter filter3 = new TypePatternClassFilter("org.springframework.tests.*"); assertThat(filter1.hashCode()).isEqualTo(filter2.hashCode()); @@ -118,11 +118,11 @@ class TypePatternClassFilterTests { @Test void testToString() { - TypePatternClassFilter filter1 = new TypePatternClassFilter("org.springframework.tests.sample.beans.*"); - TypePatternClassFilter filter2 = new TypePatternClassFilter("org.springframework.tests.sample.beans.*"); + TypePatternClassFilter filter1 = new TypePatternClassFilter("org.springframework.beans.test.fixtures.beans.*"); + TypePatternClassFilter filter2 = new TypePatternClassFilter("org.springframework.beans.test.fixtures.beans.*"); assertThat(filter1.toString()) - .isEqualTo("org.springframework.aop.aspectj.TypePatternClassFilter: org.springframework.tests.sample.beans.*"); + .isEqualTo("org.springframework.aop.aspectj.TypePatternClassFilter: org.springframework.beans.test.fixtures.beans.*"); assertThat(filter1.toString()).isEqualTo(filter2.toString()); } diff --git a/spring-aop/src/test/java/org/springframework/aop/aspectj/annotation/AbstractAspectJAdvisorFactoryTests.java b/spring-aop/src/test/java/org/springframework/aop/aspectj/annotation/AbstractAspectJAdvisorFactoryTests.java index 0790a58f8ad..c71218f6384 100644 --- a/spring-aop/src/test/java/org/springframework/aop/aspectj/annotation/AbstractAspectJAdvisorFactoryTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/aspectj/annotation/AbstractAspectJAdvisorFactoryTests.java @@ -50,11 +50,11 @@ import org.springframework.aop.framework.AopConfigException; import org.springframework.aop.framework.ProxyFactory; import org.springframework.aop.interceptor.ExposeInvocationInterceptor; import org.springframework.aop.support.AopUtils; +import org.springframework.beans.test.fixtures.beans.ITestBean; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.core.OrderComparator; import org.springframework.core.Ordered; import org.springframework.core.annotation.Order; -import org.springframework.tests.sample.beans.ITestBean; -import org.springframework.tests.sample.beans.TestBean; import org.springframework.util.ObjectUtils; import static org.assertj.core.api.Assertions.assertThat; @@ -590,7 +590,7 @@ public abstract class AbstractAspectJAdvisorFactoryTests { } - @Aspect("pertypewithin(org.springframework.tests.sample.beans.IOther+)") + @Aspect("pertypewithin(org.springframework.beans.test.fixtures.beans.IOther+)") public static class PerTypeWithinAspect { public int count; @@ -931,7 +931,7 @@ abstract class AbstractMakeModifiable { @Aspect class MakeITestBeanModifiable extends AbstractMakeModifiable { - @DeclareParents(value = "org.springframework.tests.sample.beans.ITestBean+", + @DeclareParents(value = "org.springframework.beans.test.fixtures.beans.ITestBean+", defaultImpl=ModifiableImpl.class) public static MutableModifiable mixin; diff --git a/spring-aop/src/test/java/org/springframework/aop/aspectj/annotation/ArgumentBindingTests.java b/spring-aop/src/test/java/org/springframework/aop/aspectj/annotation/ArgumentBindingTests.java index e0806be6f06..432dfef3757 100644 --- a/spring-aop/src/test/java/org/springframework/aop/aspectj/annotation/ArgumentBindingTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/aspectj/annotation/ArgumentBindingTests.java @@ -27,8 +27,8 @@ import org.aspectj.lang.annotation.Pointcut; import org.junit.jupiter.api.Test; import org.springframework.aop.aspectj.AspectJAdviceParameterNameDiscoverer; -import org.springframework.tests.sample.beans.ITestBean; -import org.springframework.tests.sample.beans.TestBean; +import org.springframework.beans.test.fixtures.beans.ITestBean; +import org.springframework.beans.test.fixtures.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException; diff --git a/spring-aop/src/test/java/org/springframework/aop/aspectj/annotation/AspectJPointcutAdvisorTests.java b/spring-aop/src/test/java/org/springframework/aop/aspectj/annotation/AspectJPointcutAdvisorTests.java index bbc816b3289..02345f25229 100644 --- a/spring-aop/src/test/java/org/springframework/aop/aspectj/annotation/AspectJPointcutAdvisorTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/aspectj/annotation/AspectJPointcutAdvisorTests.java @@ -23,7 +23,7 @@ import org.springframework.aop.Pointcut; import org.springframework.aop.aspectj.AspectJExpressionPointcut; import org.springframework.aop.aspectj.AspectJExpressionPointcutTests; import org.springframework.aop.framework.AopConfigException; -import org.springframework.tests.sample.beans.TestBean; +import org.springframework.beans.test.fixtures.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; diff --git a/spring-aop/src/test/java/org/springframework/aop/aspectj/autoproxy/AspectJNamespaceHandlerTests.java b/spring-aop/src/test/java/org/springframework/aop/aspectj/autoproxy/AspectJNamespaceHandlerTests.java index b2b1323b4fd..c8188315f7e 100644 --- a/spring-aop/src/test/java/org/springframework/aop/aspectj/autoproxy/AspectJNamespaceHandlerTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/aspectj/autoproxy/AspectJNamespaceHandlerTests.java @@ -29,7 +29,7 @@ import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.xml.ParserContext; import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; import org.springframework.beans.factory.xml.XmlReaderContext; -import org.springframework.tests.beans.CollectingReaderEventListener; +import org.springframework.beans.test.fixtures.beans.CollectingReaderEventListener; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-aop/src/test/java/org/springframework/aop/config/AopNamespaceHandlerEventTests.java b/spring-aop/src/test/java/org/springframework/aop/config/AopNamespaceHandlerEventTests.java index d713be7450f..2896114e7bb 100644 --- a/spring-aop/src/test/java/org/springframework/aop/config/AopNamespaceHandlerEventTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/config/AopNamespaceHandlerEventTests.java @@ -29,8 +29,8 @@ import org.springframework.beans.factory.parsing.ComponentDefinition; import org.springframework.beans.factory.parsing.CompositeComponentDefinition; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; +import org.springframework.beans.test.fixtures.beans.CollectingReaderEventListener; import org.springframework.core.io.Resource; -import org.springframework.tests.beans.CollectingReaderEventListener; import static org.assertj.core.api.Assertions.assertThat; import static org.springframework.core.test.fixtures.io.ResourceTestUtils.qualifiedResource; diff --git a/spring-aop/src/test/java/org/springframework/aop/framework/AopProxyUtilsTests.java b/spring-aop/src/test/java/org/springframework/aop/framework/AopProxyUtilsTests.java index f2f9c624424..eaa9e7ff524 100644 --- a/spring-aop/src/test/java/org/springframework/aop/framework/AopProxyUtilsTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/framework/AopProxyUtilsTests.java @@ -23,8 +23,8 @@ import java.util.List; import org.junit.jupiter.api.Test; import org.springframework.aop.SpringProxy; -import org.springframework.tests.sample.beans.ITestBean; -import org.springframework.tests.sample.beans.TestBean; +import org.springframework.beans.test.fixtures.beans.ITestBean; +import org.springframework.beans.test.fixtures.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException; diff --git a/spring-aop/src/test/java/org/springframework/aop/framework/IntroductionBenchmarkTests.java b/spring-aop/src/test/java/org/springframework/aop/framework/IntroductionBenchmarkTests.java index 50092ca733b..98493976ca4 100644 --- a/spring-aop/src/test/java/org/springframework/aop/framework/IntroductionBenchmarkTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/framework/IntroductionBenchmarkTests.java @@ -19,8 +19,8 @@ package org.springframework.aop.framework; import org.junit.jupiter.api.Test; import org.springframework.aop.support.DelegatingIntroductionInterceptor; -import org.springframework.tests.sample.beans.ITestBean; -import org.springframework.tests.sample.beans.TestBean; +import org.springframework.beans.test.fixtures.beans.ITestBean; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.util.StopWatch; /** diff --git a/spring-aop/src/test/java/org/springframework/aop/framework/MethodInvocationTests.java b/spring-aop/src/test/java/org/springframework/aop/framework/MethodInvocationTests.java index 9de8bd658c1..dbbaaf60af9 100644 --- a/spring-aop/src/test/java/org/springframework/aop/framework/MethodInvocationTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/framework/MethodInvocationTests.java @@ -23,7 +23,7 @@ import java.util.List; import org.aopalliance.intercept.MethodInterceptor; import org.junit.jupiter.api.Test; -import org.springframework.tests.sample.beans.TestBean; +import org.springframework.beans.test.fixtures.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-aop/src/test/java/org/springframework/aop/framework/ProxyFactoryTests.java b/spring-aop/src/test/java/org/springframework/aop/framework/ProxyFactoryTests.java index 06545b23b00..9ba9c837dd5 100644 --- a/spring-aop/src/test/java/org/springframework/aop/framework/ProxyFactoryTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/framework/ProxyFactoryTests.java @@ -34,14 +34,14 @@ import org.springframework.aop.support.AopUtils; import org.springframework.aop.support.DefaultIntroductionAdvisor; import org.springframework.aop.support.DefaultPointcutAdvisor; import org.springframework.aop.support.DelegatingIntroductionInterceptor; +import org.springframework.beans.test.fixtures.beans.IOther; +import org.springframework.beans.test.fixtures.beans.ITestBean; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.core.annotation.AnnotationAwareOrderComparator; import org.springframework.core.annotation.Order; import org.springframework.core.test.fixtures.TimeStamped; import org.springframework.tests.aop.advice.CountingBeforeAdvice; import org.springframework.tests.aop.interceptor.NopInterceptor; -import org.springframework.tests.sample.beans.IOther; -import org.springframework.tests.sample.beans.ITestBean; -import org.springframework.tests.sample.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; diff --git a/spring-aop/src/test/java/org/springframework/aop/interceptor/ConcurrencyThrottleInterceptorTests.java b/spring-aop/src/test/java/org/springframework/aop/interceptor/ConcurrencyThrottleInterceptorTests.java index 316d212c12d..e50ebf8dc2e 100644 --- a/spring-aop/src/test/java/org/springframework/aop/interceptor/ConcurrencyThrottleInterceptorTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/interceptor/ConcurrencyThrottleInterceptorTests.java @@ -22,10 +22,10 @@ import org.junit.jupiter.api.Test; import org.springframework.aop.framework.Advised; import org.springframework.aop.framework.ProxyFactory; +import org.springframework.beans.test.fixtures.beans.DerivedTestBean; +import org.springframework.beans.test.fixtures.beans.ITestBean; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.core.test.fixtures.io.SerializationTestUtils; -import org.springframework.tests.sample.beans.DerivedTestBean; -import org.springframework.tests.sample.beans.ITestBean; -import org.springframework.tests.sample.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-aop/src/test/java/org/springframework/aop/interceptor/ExposeBeanNameAdvisorsTests.java b/spring-aop/src/test/java/org/springframework/aop/interceptor/ExposeBeanNameAdvisorsTests.java index ccb4d526313..2fb5200e4b4 100644 --- a/spring-aop/src/test/java/org/springframework/aop/interceptor/ExposeBeanNameAdvisorsTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/interceptor/ExposeBeanNameAdvisorsTests.java @@ -20,8 +20,8 @@ import org.junit.jupiter.api.Test; import org.springframework.aop.framework.ProxyFactory; import org.springframework.beans.factory.NamedBean; -import org.springframework.tests.sample.beans.ITestBean; -import org.springframework.tests.sample.beans.TestBean; +import org.springframework.beans.test.fixtures.beans.ITestBean; +import org.springframework.beans.test.fixtures.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-aop/src/test/java/org/springframework/aop/interceptor/ExposeInvocationInterceptorTests.java b/spring-aop/src/test/java/org/springframework/aop/interceptor/ExposeInvocationInterceptorTests.java index aaba0ed6231..2c0d1f1e379 100644 --- a/spring-aop/src/test/java/org/springframework/aop/interceptor/ExposeInvocationInterceptorTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/interceptor/ExposeInvocationInterceptorTests.java @@ -21,8 +21,8 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; -import org.springframework.tests.sample.beans.ITestBean; -import org.springframework.tests.sample.beans.TestBean; +import org.springframework.beans.test.fixtures.beans.ITestBean; +import org.springframework.beans.test.fixtures.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; import static org.springframework.core.test.fixtures.io.ResourceTestUtils.qualifiedResource; diff --git a/spring-aop/src/test/java/org/springframework/aop/support/AbstractRegexpMethodPointcutTests.java b/spring-aop/src/test/java/org/springframework/aop/support/AbstractRegexpMethodPointcutTests.java index 1b32923d4da..e4358b3883b 100644 --- a/spring-aop/src/test/java/org/springframework/aop/support/AbstractRegexpMethodPointcutTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/support/AbstractRegexpMethodPointcutTests.java @@ -21,8 +21,8 @@ import java.io.IOException; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.core.test.fixtures.io.SerializationTestUtils; -import org.springframework.tests.sample.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-aop/src/test/java/org/springframework/aop/support/AopUtilsTests.java b/spring-aop/src/test/java/org/springframework/aop/support/AopUtilsTests.java index 09d88705f80..bf98f8ac491 100644 --- a/spring-aop/src/test/java/org/springframework/aop/support/AopUtilsTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/support/AopUtilsTests.java @@ -25,10 +25,10 @@ import org.springframework.aop.MethodMatcher; import org.springframework.aop.Pointcut; import org.springframework.aop.interceptor.ExposeInvocationInterceptor; import org.springframework.aop.target.EmptyTargetSource; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.core.test.fixtures.io.SerializationTestUtils; import org.springframework.lang.Nullable; import org.springframework.tests.aop.interceptor.NopInterceptor; -import org.springframework.tests.sample.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-aop/src/test/java/org/springframework/aop/support/ClassFiltersTests.java b/spring-aop/src/test/java/org/springframework/aop/support/ClassFiltersTests.java index 00ea9213e53..de4fecfecc2 100644 --- a/spring-aop/src/test/java/org/springframework/aop/support/ClassFiltersTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/support/ClassFiltersTests.java @@ -19,9 +19,9 @@ package org.springframework.aop.support; import org.junit.jupiter.api.Test; import org.springframework.aop.ClassFilter; +import org.springframework.beans.test.fixtures.beans.ITestBean; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.core.NestedRuntimeException; -import org.springframework.tests.sample.beans.ITestBean; -import org.springframework.tests.sample.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-aop/src/test/java/org/springframework/aop/support/ClassUtilsTests.java b/spring-aop/src/test/java/org/springframework/aop/support/ClassUtilsTests.java index 39139bbbd02..5e07be7dd19 100644 --- a/spring-aop/src/test/java/org/springframework/aop/support/ClassUtilsTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/support/ClassUtilsTests.java @@ -18,7 +18,7 @@ package org.springframework.aop.support; import org.junit.jupiter.api.Test; import org.springframework.aop.framework.ProxyFactory; -import org.springframework.tests.sample.beans.TestBean; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.util.ClassUtils; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-aop/src/test/java/org/springframework/aop/support/ComposablePointcutTests.java b/spring-aop/src/test/java/org/springframework/aop/support/ComposablePointcutTests.java index c4400b3371b..769db77bf04 100644 --- a/spring-aop/src/test/java/org/springframework/aop/support/ComposablePointcutTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/support/ComposablePointcutTests.java @@ -23,9 +23,9 @@ import org.junit.jupiter.api.Test; import org.springframework.aop.ClassFilter; import org.springframework.aop.MethodMatcher; import org.springframework.aop.Pointcut; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.core.NestedRuntimeException; import org.springframework.lang.Nullable; -import org.springframework.tests.sample.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-aop/src/test/java/org/springframework/aop/support/ControlFlowPointcutTests.java b/spring-aop/src/test/java/org/springframework/aop/support/ControlFlowPointcutTests.java index 72623dbf655..956143c3a3e 100644 --- a/spring-aop/src/test/java/org/springframework/aop/support/ControlFlowPointcutTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/support/ControlFlowPointcutTests.java @@ -20,9 +20,9 @@ import org.junit.jupiter.api.Test; import org.springframework.aop.Pointcut; import org.springframework.aop.framework.ProxyFactory; +import org.springframework.beans.test.fixtures.beans.ITestBean; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.tests.aop.interceptor.NopInterceptor; -import org.springframework.tests.sample.beans.ITestBean; -import org.springframework.tests.sample.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-aop/src/test/java/org/springframework/aop/support/DelegatingIntroductionInterceptorTests.java b/spring-aop/src/test/java/org/springframework/aop/support/DelegatingIntroductionInterceptorTests.java index 55da6fee78b..21f0b04e05a 100644 --- a/spring-aop/src/test/java/org/springframework/aop/support/DelegatingIntroductionInterceptorTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/support/DelegatingIntroductionInterceptorTests.java @@ -24,15 +24,15 @@ import org.junit.jupiter.api.Test; import org.springframework.aop.IntroductionAdvisor; import org.springframework.aop.IntroductionInterceptor; import org.springframework.aop.framework.ProxyFactory; +import org.springframework.beans.test.fixtures.beans.INestedTestBean; +import org.springframework.beans.test.fixtures.beans.ITestBean; +import org.springframework.beans.test.fixtures.beans.NestedTestBean; +import org.springframework.beans.test.fixtures.beans.Person; +import org.springframework.beans.test.fixtures.beans.SerializablePerson; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.core.test.fixtures.TimeStamped; import org.springframework.core.test.fixtures.io.SerializationTestUtils; import org.springframework.tests.aop.interceptor.SerializableNopInterceptor; -import org.springframework.tests.sample.beans.INestedTestBean; -import org.springframework.tests.sample.beans.ITestBean; -import org.springframework.tests.sample.beans.NestedTestBean; -import org.springframework.tests.sample.beans.Person; -import org.springframework.tests.sample.beans.SerializablePerson; -import org.springframework.tests.sample.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException; diff --git a/spring-aop/src/test/java/org/springframework/aop/support/MethodMatchersTests.java b/spring-aop/src/test/java/org/springframework/aop/support/MethodMatchersTests.java index b69e8450b49..206a2e87118 100644 --- a/spring-aop/src/test/java/org/springframework/aop/support/MethodMatchersTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/support/MethodMatchersTests.java @@ -21,11 +21,11 @@ import java.lang.reflect.Method; import org.junit.jupiter.api.Test; import org.springframework.aop.MethodMatcher; +import org.springframework.beans.test.fixtures.beans.IOther; +import org.springframework.beans.test.fixtures.beans.ITestBean; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.core.test.fixtures.io.SerializationTestUtils; import org.springframework.lang.Nullable; -import org.springframework.tests.sample.beans.IOther; -import org.springframework.tests.sample.beans.ITestBean; -import org.springframework.tests.sample.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-aop/src/test/java/org/springframework/aop/support/NameMatchMethodPointcutTests.java b/spring-aop/src/test/java/org/springframework/aop/support/NameMatchMethodPointcutTests.java index 87241091caf..0e921e05862 100644 --- a/spring-aop/src/test/java/org/springframework/aop/support/NameMatchMethodPointcutTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/support/NameMatchMethodPointcutTests.java @@ -21,11 +21,11 @@ import org.junit.jupiter.api.Test; import org.springframework.aop.framework.Advised; import org.springframework.aop.framework.ProxyFactory; +import org.springframework.beans.test.fixtures.beans.Person; +import org.springframework.beans.test.fixtures.beans.SerializablePerson; import org.springframework.core.test.fixtures.io.SerializationTestUtils; import org.springframework.tests.aop.interceptor.NopInterceptor; import org.springframework.tests.aop.interceptor.SerializableNopInterceptor; -import org.springframework.tests.sample.beans.Person; -import org.springframework.tests.sample.beans.SerializablePerson; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-aop/src/test/java/org/springframework/aop/support/PointcutsTests.java b/spring-aop/src/test/java/org/springframework/aop/support/PointcutsTests.java index 599354821a0..0b913b97030 100644 --- a/spring-aop/src/test/java/org/springframework/aop/support/PointcutsTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/support/PointcutsTests.java @@ -22,8 +22,8 @@ import org.junit.jupiter.api.Test; import org.springframework.aop.ClassFilter; import org.springframework.aop.Pointcut; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.lang.Nullable; -import org.springframework.tests.sample.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-aop/src/test/java/org/springframework/aop/support/RegexpMethodPointcutAdvisorIntegrationTests.java b/spring-aop/src/test/java/org/springframework/aop/support/RegexpMethodPointcutAdvisorIntegrationTests.java index 34fd0e47775..62d1d1e5a87 100644 --- a/spring-aop/src/test/java/org/springframework/aop/support/RegexpMethodPointcutAdvisorIntegrationTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/support/RegexpMethodPointcutAdvisorIntegrationTests.java @@ -21,13 +21,13 @@ import org.junit.jupiter.api.Test; import org.springframework.aop.framework.Advised; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; +import org.springframework.beans.test.fixtures.beans.ITestBean; +import org.springframework.beans.test.fixtures.beans.Person; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.core.io.Resource; import org.springframework.core.test.fixtures.io.SerializationTestUtils; import org.springframework.tests.aop.interceptor.NopInterceptor; import org.springframework.tests.aop.interceptor.SerializableNopInterceptor; -import org.springframework.tests.sample.beans.ITestBean; -import org.springframework.tests.sample.beans.Person; -import org.springframework.tests.sample.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; import static org.springframework.core.test.fixtures.io.ResourceTestUtils.qualifiedResource; diff --git a/spring-aop/src/test/java/org/springframework/aop/support/RootClassFilterTests.java b/spring-aop/src/test/java/org/springframework/aop/support/RootClassFilterTests.java index 0c132f327e3..184858d27f0 100644 --- a/spring-aop/src/test/java/org/springframework/aop/support/RootClassFilterTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/support/RootClassFilterTests.java @@ -19,7 +19,7 @@ package org.springframework.aop.support; import org.junit.jupiter.api.Test; import org.springframework.aop.ClassFilter; -import org.springframework.tests.sample.beans.ITestBean; +import org.springframework.beans.test.fixtures.beans.ITestBean; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-aop/src/test/java/org/springframework/aop/target/CommonsPool2TargetSourceProxyTests.java b/spring-aop/src/test/java/org/springframework/aop/target/CommonsPool2TargetSourceProxyTests.java index 5536a17c8f0..9ddd2a53e07 100644 --- a/spring-aop/src/test/java/org/springframework/aop/target/CommonsPool2TargetSourceProxyTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/target/CommonsPool2TargetSourceProxyTests.java @@ -21,8 +21,8 @@ import org.junit.jupiter.api.Test; import org.springframework.aop.support.AopUtils; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; +import org.springframework.beans.test.fixtures.beans.ITestBean; import org.springframework.core.io.Resource; -import org.springframework.tests.sample.beans.ITestBean; import static org.assertj.core.api.Assertions.assertThat; import static org.springframework.core.test.fixtures.io.ResourceTestUtils.qualifiedResource; diff --git a/spring-aop/src/test/java/org/springframework/aop/target/HotSwappableTargetSourceTests.java b/spring-aop/src/test/java/org/springframework/aop/target/HotSwappableTargetSourceTests.java index a5298674de7..85396507092 100644 --- a/spring-aop/src/test/java/org/springframework/aop/target/HotSwappableTargetSourceTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/target/HotSwappableTargetSourceTests.java @@ -25,11 +25,11 @@ import org.springframework.aop.framework.ProxyFactory; import org.springframework.aop.support.DefaultPointcutAdvisor; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; +import org.springframework.beans.test.fixtures.beans.Person; +import org.springframework.beans.test.fixtures.beans.SerializablePerson; +import org.springframework.beans.test.fixtures.beans.SideEffectBean; import org.springframework.core.test.fixtures.io.SerializationTestUtils; import org.springframework.tests.aop.interceptor.SerializableNopInterceptor; -import org.springframework.tests.sample.beans.Person; -import org.springframework.tests.sample.beans.SerializablePerson; -import org.springframework.tests.sample.beans.SideEffectBean; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException; diff --git a/spring-aop/src/test/java/org/springframework/aop/target/LazyInitTargetSourceTests.java b/spring-aop/src/test/java/org/springframework/aop/target/LazyInitTargetSourceTests.java index 54ea0552c76..8f1ffc90be8 100644 --- a/spring-aop/src/test/java/org/springframework/aop/target/LazyInitTargetSourceTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/target/LazyInitTargetSourceTests.java @@ -22,8 +22,8 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; +import org.springframework.beans.test.fixtures.beans.ITestBean; import org.springframework.core.io.Resource; -import org.springframework.tests.sample.beans.ITestBean; import static org.assertj.core.api.Assertions.assertThat; import static org.springframework.core.test.fixtures.io.ResourceTestUtils.qualifiedResource; diff --git a/spring-aop/src/test/java/org/springframework/aop/target/PrototypeBasedTargetSourceTests.java b/spring-aop/src/test/java/org/springframework/aop/target/PrototypeBasedTargetSourceTests.java index a4006bd888e..c1eaa77ea39 100644 --- a/spring-aop/src/test/java/org/springframework/aop/target/PrototypeBasedTargetSourceTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/target/PrototypeBasedTargetSourceTests.java @@ -23,9 +23,9 @@ import org.springframework.beans.MutablePropertyValues; import org.springframework.beans.factory.config.BeanDefinition; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.support.RootBeanDefinition; +import org.springframework.beans.test.fixtures.beans.SerializablePerson; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.core.test.fixtures.io.SerializationTestUtils; -import org.springframework.tests.sample.beans.SerializablePerson; -import org.springframework.tests.sample.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-aop/src/test/java/org/springframework/aop/target/PrototypeTargetSourceTests.java b/spring-aop/src/test/java/org/springframework/aop/target/PrototypeTargetSourceTests.java index 37bf57a2741..04a3c695f6e 100644 --- a/spring-aop/src/test/java/org/springframework/aop/target/PrototypeTargetSourceTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/target/PrototypeTargetSourceTests.java @@ -21,7 +21,7 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; -import org.springframework.tests.sample.beans.SideEffectBean; +import org.springframework.beans.test.fixtures.beans.SideEffectBean; import static org.assertj.core.api.Assertions.assertThat; import static org.springframework.core.test.fixtures.io.ResourceTestUtils.qualifiedResource; diff --git a/spring-aop/src/test/java/org/springframework/aop/target/ThreadLocalTargetSourceTests.java b/spring-aop/src/test/java/org/springframework/aop/target/ThreadLocalTargetSourceTests.java index 1ff3816db8b..4170e6402f3 100644 --- a/spring-aop/src/test/java/org/springframework/aop/target/ThreadLocalTargetSourceTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/target/ThreadLocalTargetSourceTests.java @@ -21,8 +21,8 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; -import org.springframework.tests.sample.beans.ITestBean; -import org.springframework.tests.sample.beans.SideEffectBean; +import org.springframework.beans.test.fixtures.beans.ITestBean; +import org.springframework.beans.test.fixtures.beans.SideEffectBean; import static org.assertj.core.api.Assertions.assertThat; import static org.springframework.core.test.fixtures.io.ResourceTestUtils.qualifiedResource; diff --git a/spring-aop/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerEventTests-context.xml b/spring-aop/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerEventTests-context.xml index 48da214eb4d..745dbc3e40f 100644 --- a/spring-aop/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerEventTests-context.xml +++ b/spring-aop/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerEventTests-context.xml @@ -20,7 +20,7 @@ - + diff --git a/spring-aop/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerPointcutErrorTests-pointcutDuplication.xml b/spring-aop/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerPointcutErrorTests-pointcutDuplication.xml index 1162d714f32..59bd49621c6 100644 --- a/spring-aop/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerPointcutErrorTests-pointcutDuplication.xml +++ b/spring-aop/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerPointcutErrorTests-pointcutDuplication.xml @@ -14,7 +14,7 @@ - + diff --git a/spring-aop/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerPointcutErrorTests-pointcutMissing.xml b/spring-aop/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerPointcutErrorTests-pointcutMissing.xml index b47670e08d3..955540049e9 100644 --- a/spring-aop/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerPointcutErrorTests-pointcutMissing.xml +++ b/spring-aop/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerPointcutErrorTests-pointcutMissing.xml @@ -14,7 +14,7 @@ - + diff --git a/spring-aop/src/test/resources/org/springframework/aop/support/RegexpMethodPointcutAdvisorIntegrationTests-context.xml b/spring-aop/src/test/resources/org/springframework/aop/support/RegexpMethodPointcutAdvisorIntegrationTests-context.xml index e67171818b5..7ce48dc01ed 100644 --- a/spring-aop/src/test/resources/org/springframework/aop/support/RegexpMethodPointcutAdvisorIntegrationTests-context.xml +++ b/spring-aop/src/test/resources/org/springframework/aop/support/RegexpMethodPointcutAdvisorIntegrationTests-context.xml @@ -4,7 +4,7 @@ - + custom 666 @@ -21,15 +21,15 @@ - org.springframework.tests.sample.beans.ITestBean + org.springframework.beans.test.fixtures.beans.ITestBean settersAdvisor - org.springframework.tests.sample.beans.Person + org.springframework.beans.test.fixtures.beans.Person - + serializableSettersAdvised @@ -48,7 +48,7 @@ - org.springframework.tests.sample.beans.ITestBean + org.springframework.beans.test.fixtures.beans.ITestBean true diff --git a/spring-aop/src/test/resources/org/springframework/aop/target/CommonsPool2TargetSourceProxyTests-context.xml b/spring-aop/src/test/resources/org/springframework/aop/target/CommonsPool2TargetSourceProxyTests-context.xml index c3c614d4a63..a18634ee9ff 100644 --- a/spring-aop/src/test/resources/org/springframework/aop/target/CommonsPool2TargetSourceProxyTests-context.xml +++ b/spring-aop/src/test/resources/org/springframework/aop/target/CommonsPool2TargetSourceProxyTests-context.xml @@ -3,7 +3,7 @@ - + diff --git a/spring-aop/src/test/resources/org/springframework/aop/target/HotSwappableTargetSourceTests-context.xml b/spring-aop/src/test/resources/org/springframework/aop/target/HotSwappableTargetSourceTests-context.xml index dcc43922efd..a5d28ca2f8d 100644 --- a/spring-aop/src/test/resources/org/springframework/aop/target/HotSwappableTargetSourceTests-context.xml +++ b/spring-aop/src/test/resources/org/springframework/aop/target/HotSwappableTargetSourceTests-context.xml @@ -4,11 +4,11 @@ - + 10 - + 20 diff --git a/spring-aop/src/test/resources/org/springframework/aop/target/LazyInitTargetSourceTests-customTarget.xml b/spring-aop/src/test/resources/org/springframework/aop/target/LazyInitTargetSourceTests-customTarget.xml index cec1c980ba5..d48cdb08175 100644 --- a/spring-aop/src/test/resources/org/springframework/aop/target/LazyInitTargetSourceTests-customTarget.xml +++ b/spring-aop/src/test/resources/org/springframework/aop/target/LazyInitTargetSourceTests-customTarget.xml @@ -3,7 +3,7 @@ - + 10 diff --git a/spring-aop/src/test/resources/org/springframework/aop/target/LazyInitTargetSourceTests-singleton.xml b/spring-aop/src/test/resources/org/springframework/aop/target/LazyInitTargetSourceTests-singleton.xml index 1e5c69f5499..7f29fec4f78 100644 --- a/spring-aop/src/test/resources/org/springframework/aop/target/LazyInitTargetSourceTests-singleton.xml +++ b/spring-aop/src/test/resources/org/springframework/aop/target/LazyInitTargetSourceTests-singleton.xml @@ -3,7 +3,7 @@ - + 10 diff --git a/spring-aop/src/test/resources/org/springframework/aop/target/PrototypeTargetSourceTests-context.xml b/spring-aop/src/test/resources/org/springframework/aop/target/PrototypeTargetSourceTests-context.xml index 4ee787b20fb..6b2801a1e9e 100644 --- a/spring-aop/src/test/resources/org/springframework/aop/target/PrototypeTargetSourceTests-context.xml +++ b/spring-aop/src/test/resources/org/springframework/aop/target/PrototypeTargetSourceTests-context.xml @@ -4,11 +4,11 @@ - + 10 - + 10 diff --git a/spring-aop/src/test/resources/org/springframework/aop/target/ThreadLocalTargetSourceTests-context.xml b/spring-aop/src/test/resources/org/springframework/aop/target/ThreadLocalTargetSourceTests-context.xml index 6400db2f215..5d71019c5fc 100644 --- a/spring-aop/src/test/resources/org/springframework/aop/target/ThreadLocalTargetSourceTests-context.xml +++ b/spring-aop/src/test/resources/org/springframework/aop/target/ThreadLocalTargetSourceTests-context.xml @@ -3,7 +3,7 @@ - + 10 @@ -34,12 +34,12 @@ - + Rod - + Kerry diff --git a/spring-aspects/spring-aspects.gradle b/spring-aspects/spring-aspects.gradle index fbb21964377..202014e728c 100644 --- a/spring-aspects/spring-aspects.gradle +++ b/spring-aspects/spring-aspects.gradle @@ -24,6 +24,7 @@ dependencies { optional("javax.transaction:javax.transaction-api") // for @javax.transaction.Transactional support testCompile(project(":spring-core")) // for CodeStyleAspect testCompile(project(":spring-test")) + testCompile(testFixtures(project(":spring-context"))) testCompile(testFixtures(project(":spring-core"))) testCompile("javax.mail:javax.mail-api") testCompileOnly("org.aspectj:aspectjrt") diff --git a/spring-aspects/src/test/java/org/springframework/cache/aspectj/AbstractCacheAnnotationTests.java b/spring-aspects/src/test/java/org/springframework/cache/aspectj/AbstractCacheAnnotationTests.java new file mode 100644 index 00000000000..24fd8a30b9a --- /dev/null +++ b/spring-aspects/src/test/java/org/springframework/cache/aspectj/AbstractCacheAnnotationTests.java @@ -0,0 +1,882 @@ +/* + * Copyright 2002-2019 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. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.springframework.cache.aspectj; + +import java.util.Collection; +import java.util.UUID; + +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; + +import org.springframework.aop.framework.AopProxyUtils; +import org.springframework.beans.factory.NoSuchBeanDefinitionException; +import org.springframework.cache.Cache; +import org.springframework.cache.CacheManager; +import org.springframework.cache.config.AnnotatedClassCacheableService; +import org.springframework.cache.config.CacheableService; +import org.springframework.cache.config.TestEntity; +import org.springframework.context.ConfigurableApplicationContext; +import org.springframework.context.test.fixtures.cache.SomeCustomKeyGenerator; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThatExceptionOfType; +import static org.assertj.core.api.Assertions.assertThatIOException; + +/** + * Copy of the shared {@code AbstractCacheAnnotationTests}: necessary + * due to issues with Gradle test fixtures and AspectJ configuration + * in the Gradle build. + * + *

Abstract cache annotation tests (containing several reusable methods). + * + * @author Costin Leau + * @author Chris Beams + * @author Phillip Webb + * @author Stephane Nicoll + */ +public abstract class AbstractCacheAnnotationTests { + + protected ConfigurableApplicationContext ctx; + + protected CacheableService cs; + + protected CacheableService ccs; + + protected CacheManager cm; + + + /** + * @return a refreshed application context + */ + protected abstract ConfigurableApplicationContext getApplicationContext(); + + + @BeforeEach + public void setup() { + this.ctx = getApplicationContext(); + this.cs = ctx.getBean("service", CacheableService.class); + this.ccs = ctx.getBean("classService", CacheableService.class); + this.cm = ctx.getBean("cacheManager", CacheManager.class); + + Collection cn = this.cm.getCacheNames(); + assertThat(cn).containsOnly("testCache", "secondary", "primary"); + } + + @AfterEach + public void close() { + if (this.ctx != null) { + this.ctx.close(); + } + } + + + protected void testCacheable(CacheableService service) { + Object o1 = new Object(); + + Object r1 = service.cache(o1); + Object r2 = service.cache(o1); + Object r3 = service.cache(o1); + + assertThat(r2).isSameAs(r1); + assertThat(r3).isSameAs(r1); + } + + protected void testCacheableNull(CacheableService service) { + Object o1 = new Object(); + assertThat(this.cm.getCache("testCache").get(o1)).isNull(); + + Object r1 = service.cacheNull(o1); + Object r2 = service.cacheNull(o1); + Object r3 = service.cacheNull(o1); + + assertThat(r2).isSameAs(r1); + assertThat(r3).isSameAs(r1); + + assertThat(this.cm.getCache("testCache")).as("testCache").isNotNull(); + assertThat(this.cm.getCache("testCache").get(o1)).as("cached object").isNotNull(); + assertThat(this.cm.getCache("testCache").get(o1).get()).isEqualTo(r3); + assertThat(r3).as("Cached value should be null").isNull(); + } + + protected void testCacheableSync(CacheableService service) { + Object o1 = new Object(); + + Object r1 = service.cacheSync(o1); + Object r2 = service.cacheSync(o1); + Object r3 = service.cacheSync(o1); + + assertThat(r2).isSameAs(r1); + assertThat(r3).isSameAs(r1); + } + + protected void testCacheableSyncNull(CacheableService service) { + Object o1 = new Object(); + assertThat(this.cm.getCache("testCache").get(o1)).isNull(); + + Object r1 = service.cacheSyncNull(o1); + Object r2 = service.cacheSyncNull(o1); + Object r3 = service.cacheSyncNull(o1); + + assertThat(r2).isSameAs(r1); + assertThat(r3).isSameAs(r1); + + assertThat(this.cm.getCache("testCache").get(o1).get()).isEqualTo(r3); + assertThat(r3).as("Cached value should be null").isNull(); + } + + protected void testEvict(CacheableService service, boolean successExpected) { + Cache cache = this.cm.getCache("testCache"); + + Object o1 = new Object(); + cache.putIfAbsent(o1, -1L); + Object r1 = service.cache(o1); + + service.evict(o1, null); + if (successExpected) { + assertThat(cache.get(o1)).isNull(); + } + else { + assertThat(cache.get(o1)).isNotNull(); + } + + Object r2 = service.cache(o1); + if (successExpected) { + assertThat(r2).isNotSameAs(r1); + } + else { + assertThat(r2).isSameAs(r1); + } + } + + protected void testEvictEarly(CacheableService service) { + Cache cache = this.cm.getCache("testCache"); + + Object o1 = new Object(); + cache.putIfAbsent(o1, -1L); + Object r1 = service.cache(o1); + + try { + service.evictEarly(o1); + } + catch (RuntimeException ex) { + // expected + } + assertThat(cache.get(o1)).isNull(); + + Object r2 = service.cache(o1); + assertThat(r2).isNotSameAs(r1); + } + + protected void testEvictException(CacheableService service) { + Object o1 = new Object(); + Object r1 = service.cache(o1); + + try { + service.evictWithException(o1); + } + catch (RuntimeException ex) { + // expected + } + // exception occurred, eviction skipped, data should still be in the cache + Object r2 = service.cache(o1); + assertThat(r2).isSameAs(r1); + } + + protected void testEvictWithKey(CacheableService service) { + Object o1 = new Object(); + Object r1 = service.cache(o1); + + service.evict(o1, null); + Object r2 = service.cache(o1); + assertThat(r2).isNotSameAs(r1); + } + + protected void testEvictWithKeyEarly(CacheableService service) { + Object o1 = new Object(); + Object r1 = service.cache(o1); + + try { + service.evictEarly(o1); + } + catch (Exception ex) { + // expected + } + Object r2 = service.cache(o1); + assertThat(r2).isNotSameAs(r1); + } + + protected void testEvictAll(CacheableService service, boolean successExpected) { + Cache cache = this.cm.getCache("testCache"); + + Object o1 = new Object(); + Object o2 = new Object(); + cache.putIfAbsent(o1, -1L); + cache.putIfAbsent(o2, -2L); + + Object r1 = service.cache(o1); + Object r2 = service.cache(o2); + assertThat(r2).isNotSameAs(r1); + + service.evictAll(new Object()); + if (successExpected) { + assertThat(cache.get(o1)).isNull(); + assertThat(cache.get(o2)).isNull(); + } + else { + assertThat(cache.get(o1)).isNotNull(); + assertThat(cache.get(o2)).isNotNull(); + } + + Object r3 = service.cache(o1); + Object r4 = service.cache(o2); + if (successExpected) { + assertThat(r3).isNotSameAs(r1); + assertThat(r4).isNotSameAs(r2); + } + else { + assertThat(r3).isSameAs(r1); + assertThat(r4).isSameAs(r2); + } + } + + protected void testEvictAllEarly(CacheableService service) { + Cache cache = this.cm.getCache("testCache"); + + Object o1 = new Object(); + Object o2 = new Object(); + cache.putIfAbsent(o1, -1L); + cache.putIfAbsent(o2, -2L); + + Object r1 = service.cache(o1); + Object r2 = service.cache(o2); + assertThat(r2).isNotSameAs(r1); + + try { + service.evictAllEarly(new Object()); + } + catch (Exception ex) { + // expected + } + assertThat(cache.get(o1)).isNull(); + assertThat(cache.get(o2)).isNull(); + + Object r3 = service.cache(o1); + Object r4 = service.cache(o2); + assertThat(r3).isNotSameAs(r1); + assertThat(r4).isNotSameAs(r2); + } + + protected void testConditionalExpression(CacheableService service) { + Object r1 = service.conditional(4); + Object r2 = service.conditional(4); + + assertThat(r2).isNotSameAs(r1); + + Object r3 = service.conditional(3); + Object r4 = service.conditional(3); + + assertThat(r4).isSameAs(r3); + } + + protected void testConditionalExpressionSync(CacheableService service) { + Object r1 = service.conditionalSync(4); + Object r2 = service.conditionalSync(4); + + assertThat(r2).isNotSameAs(r1); + + Object r3 = service.conditionalSync(3); + Object r4 = service.conditionalSync(3); + + assertThat(r4).isSameAs(r3); + } + + protected void testUnlessExpression(CacheableService service) { + Cache cache = this.cm.getCache("testCache"); + cache.clear(); + service.unless(10); + service.unless(11); + assertThat(cache.get(10).get()).isEqualTo(10L); + assertThat(cache.get(11)).isNull(); + } + + protected void testKeyExpression(CacheableService service) { + Object r1 = service.key(5, 1); + Object r2 = service.key(5, 2); + + assertThat(r2).isSameAs(r1); + + Object r3 = service.key(1, 5); + Object r4 = service.key(2, 5); + + assertThat(r4).isNotSameAs(r3); + } + + protected void testVarArgsKey(CacheableService service) { + Object r1 = service.varArgsKey(1, 2, 3); + Object r2 = service.varArgsKey(1, 2, 3); + + assertThat(r2).isSameAs(r1); + + Object r3 = service.varArgsKey(1, 2, 3); + Object r4 = service.varArgsKey(1, 2); + + assertThat(r4).isNotSameAs(r3); + } + + protected void testNullValue(CacheableService service) { + Object key = new Object(); + assertThat(service.nullValue(key)).isNull(); + int nr = service.nullInvocations().intValue(); + assertThat(service.nullValue(key)).isNull(); + assertThat(service.nullInvocations().intValue()).isEqualTo(nr); + assertThat(service.nullValue(new Object())).isNull(); + assertThat(service.nullInvocations().intValue()).isEqualTo(nr + 1); + } + + protected void testMethodName(CacheableService service, String keyName) { + Object key = new Object(); + Object r1 = service.name(key); + assertThat(service.name(key)).isSameAs(r1); + Cache cache = this.cm.getCache("testCache"); + // assert the method name is used + assertThat(cache.get(keyName)).isNotNull(); + } + + protected void testRootVars(CacheableService service) { + Object key = new Object(); + Object r1 = service.rootVars(key); + assertThat(service.rootVars(key)).isSameAs(r1); + Cache cache = this.cm.getCache("testCache"); + // assert the method name is used + String expectedKey = "rootVarsrootVars" + AopProxyUtils.ultimateTargetClass(service) + service; + assertThat(cache.get(expectedKey)).isNotNull(); + } + + protected void testCheckedThrowable(CacheableService service) { + String arg = UUID.randomUUID().toString(); + assertThatIOException().isThrownBy(() -> + service.throwChecked(arg)) + .withMessage(arg); + } + + protected void testUncheckedThrowable(CacheableService service) { + assertThatExceptionOfType(UnsupportedOperationException.class).isThrownBy(() -> + service.throwUnchecked(1L)) + .withMessage("1"); + } + + protected void testCheckedThrowableSync(CacheableService service) { + String arg = UUID.randomUUID().toString(); + assertThatIOException().isThrownBy(() -> + service.throwCheckedSync(arg)) + .withMessage(arg); + } + + protected void testUncheckedThrowableSync(CacheableService service) { + assertThatExceptionOfType(UnsupportedOperationException.class).isThrownBy(() -> + service.throwUncheckedSync(1L)) + .withMessage("1"); + } + + protected void testNullArg(CacheableService service) { + Object r1 = service.cache(null); + assertThat(service.cache(null)).isSameAs(r1); + } + + protected void testCacheUpdate(CacheableService service) { + Object o = new Object(); + Cache cache = this.cm.getCache("testCache"); + assertThat(cache.get(o)).isNull(); + Object r1 = service.update(o); + assertThat(cache.get(o).get()).isSameAs(r1); + + o = new Object(); + assertThat(cache.get(o)).isNull(); + Object r2 = service.update(o); + assertThat(cache.get(o).get()).isSameAs(r2); + } + + protected void testConditionalCacheUpdate(CacheableService service) { + Integer one = 1; + Integer three = 3; + + Cache cache = this.cm.getCache("testCache"); + assertThat((int) Integer.valueOf(service.conditionalUpdate(one).toString())).isEqualTo((int) one); + assertThat(cache.get(one)).isNull(); + + assertThat((int) Integer.valueOf(service.conditionalUpdate(three).toString())).isEqualTo((int) three); + assertThat((int) Integer.valueOf(cache.get(three).get().toString())).isEqualTo((int) three); + } + + protected void testMultiCache(CacheableService service) { + Object o1 = new Object(); + Object o2 = new Object(); + + Cache primary = this.cm.getCache("primary"); + Cache secondary = this.cm.getCache("secondary"); + + assertThat(primary.get(o1)).isNull(); + assertThat(secondary.get(o1)).isNull(); + Object r1 = service.multiCache(o1); + assertThat(primary.get(o1).get()).isSameAs(r1); + assertThat(secondary.get(o1).get()).isSameAs(r1); + + Object r2 = service.multiCache(o1); + Object r3 = service.multiCache(o1); + + assertThat(r2).isSameAs(r1); + assertThat(r3).isSameAs(r1); + + assertThat(primary.get(o2)).isNull(); + assertThat(secondary.get(o2)).isNull(); + Object r4 = service.multiCache(o2); + assertThat(primary.get(o2).get()).isSameAs(r4); + assertThat(secondary.get(o2).get()).isSameAs(r4); + } + + protected void testMultiEvict(CacheableService service) { + Object o1 = new Object(); + Object o2 = o1.toString() + "A"; + + + Object r1 = service.multiCache(o1); + Object r2 = service.multiCache(o1); + + Cache primary = this.cm.getCache("primary"); + Cache secondary = this.cm.getCache("secondary"); + + primary.put(o2, o2); + assertThat(r2).isSameAs(r1); + assertThat(primary.get(o1).get()).isSameAs(r1); + assertThat(secondary.get(o1).get()).isSameAs(r1); + + service.multiEvict(o1); + assertThat(primary.get(o1)).isNull(); + assertThat(secondary.get(o1)).isNull(); + assertThat(primary.get(o2)).isNull(); + + Object r3 = service.multiCache(o1); + Object r4 = service.multiCache(o1); + assertThat(r3).isNotSameAs(r1); + assertThat(r4).isSameAs(r3); + + assertThat(primary.get(o1).get()).isSameAs(r3); + assertThat(secondary.get(o1).get()).isSameAs(r4); + } + + protected void testMultiPut(CacheableService service) { + Object o = 1; + + Cache primary = this.cm.getCache("primary"); + Cache secondary = this.cm.getCache("secondary"); + + assertThat(primary.get(o)).isNull(); + assertThat(secondary.get(o)).isNull(); + Object r1 = service.multiUpdate(o); + assertThat(primary.get(o).get()).isSameAs(r1); + assertThat(secondary.get(o).get()).isSameAs(r1); + + o = 2; + assertThat(primary.get(o)).isNull(); + assertThat(secondary.get(o)).isNull(); + Object r2 = service.multiUpdate(o); + assertThat(primary.get(o).get()).isSameAs(r2); + assertThat(secondary.get(o).get()).isSameAs(r2); + } + + protected void testPutRefersToResult(CacheableService service) { + Long id = Long.MIN_VALUE; + TestEntity entity = new TestEntity(); + Cache primary = this.cm.getCache("primary"); + assertThat(primary.get(id)).isNull(); + assertThat(entity.getId()).isNull(); + service.putRefersToResult(entity); + assertThat(primary.get(id).get()).isSameAs(entity); + } + + protected void testMultiCacheAndEvict(CacheableService service) { + String methodName = "multiCacheAndEvict"; + + Cache primary = this.cm.getCache("primary"); + Cache secondary = this.cm.getCache("secondary"); + Object key = 1; + + secondary.put(key, key); + + assertThat(secondary.get(methodName)).isNull(); + assertThat(secondary.get(key).get()).isSameAs(key); + + Object r1 = service.multiCacheAndEvict(key); + assertThat(service.multiCacheAndEvict(key)).isSameAs(r1); + + // assert the method name is used + assertThat(primary.get(methodName).get()).isSameAs(r1); + assertThat(secondary.get(methodName)).isNull(); + assertThat(secondary.get(key)).isNull(); + } + + protected void testMultiConditionalCacheAndEvict(CacheableService service) { + Cache primary = this.cm.getCache("primary"); + Cache secondary = this.cm.getCache("secondary"); + Object key = 1; + + secondary.put(key, key); + + assertThat(primary.get(key)).isNull(); + assertThat(secondary.get(key).get()).isSameAs(key); + + Object r1 = service.multiConditionalCacheAndEvict(key); + Object r3 = service.multiConditionalCacheAndEvict(key); + + assertThat(!r1.equals(r3)).isTrue(); + assertThat(primary.get(key)).isNull(); + + Object key2 = 3; + Object r2 = service.multiConditionalCacheAndEvict(key2); + assertThat(service.multiConditionalCacheAndEvict(key2)).isSameAs(r2); + + // assert the method name is used + assertThat(primary.get(key2).get()).isSameAs(r2); + assertThat(secondary.get(key2)).isNull(); + } + + @Test + public void testCacheable() { + testCacheable(this.cs); + } + + @Test + public void testCacheableNull() { + testCacheableNull(this.cs); + } + + @Test + public void testCacheableSync() { + testCacheableSync(this.cs); + } + + @Test + public void testCacheableSyncNull() { + testCacheableSyncNull(this.cs); + } + + @Test + public void testEvict() { + testEvict(this.cs, true); + } + + @Test + public void testEvictEarly() { + testEvictEarly(this.cs); + } + + @Test + public void testEvictWithException() { + testEvictException(this.cs); + } + + @Test + public void testEvictAll() { + testEvictAll(this.cs, true); + } + + @Test + public void testEvictAllEarly() { + testEvictAllEarly(this.cs); + } + + @Test + public void testEvictWithKey() { + testEvictWithKey(this.cs); + } + + @Test + public void testEvictWithKeyEarly() { + testEvictWithKeyEarly(this.cs); + } + + @Test + public void testConditionalExpression() { + testConditionalExpression(this.cs); + } + + @Test + public void testConditionalExpressionSync() { + testConditionalExpressionSync(this.cs); + } + + @Test + public void testUnlessExpression() { + testUnlessExpression(this.cs); + } + + @Test + public void testClassCacheUnlessExpression() { + testUnlessExpression(this.cs); + } + + @Test + public void testKeyExpression() { + testKeyExpression(this.cs); + } + + @Test + public void testVarArgsKey() { + testVarArgsKey(this.cs); + } + + @Test + public void testClassCacheCacheable() { + testCacheable(this.ccs); + } + + @Test + public void testClassCacheEvict() { + testEvict(this.ccs, true); + } + + @Test + public void testClassEvictEarly() { + testEvictEarly(this.ccs); + } + + @Test + public void testClassEvictAll() { + testEvictAll(this.ccs, true); + } + + @Test + public void testClassEvictWithException() { + testEvictException(this.ccs); + } + + @Test + public void testClassCacheEvictWithWKey() { + testEvictWithKey(this.ccs); + } + + @Test + public void testClassEvictWithKeyEarly() { + testEvictWithKeyEarly(this.ccs); + } + + @Test + public void testNullValue() { + testNullValue(this.cs); + } + + @Test + public void testClassNullValue() { + Object key = new Object(); + assertThat(this.ccs.nullValue(key)).isNull(); + int nr = this.ccs.nullInvocations().intValue(); + assertThat(this.ccs.nullValue(key)).isNull(); + assertThat(this.ccs.nullInvocations().intValue()).isEqualTo(nr); + assertThat(this.ccs.nullValue(new Object())).isNull(); + // the check method is also cached + assertThat(this.ccs.nullInvocations().intValue()).isEqualTo(nr); + assertThat(AnnotatedClassCacheableService.nullInvocations.intValue()).isEqualTo(nr + 1); + } + + @Test + public void testMethodName() { + testMethodName(this.cs, "name"); + } + + @Test + public void testClassMethodName() { + testMethodName(this.ccs, "nametestCache"); + } + + @Test + public void testRootVars() { + testRootVars(this.cs); + } + + @Test + public void testClassRootVars() { + testRootVars(this.ccs); + } + + @Test + public void testCustomKeyGenerator() { + Object param = new Object(); + Object r1 = this.cs.customKeyGenerator(param); + assertThat(this.cs.customKeyGenerator(param)).isSameAs(r1); + Cache cache = this.cm.getCache("testCache"); + // Checks that the custom keyGenerator was used + Object expectedKey = SomeCustomKeyGenerator.generateKey("customKeyGenerator", param); + assertThat(cache.get(expectedKey)).isNotNull(); + } + + @Test + public void testUnknownCustomKeyGenerator() { + Object param = new Object(); + assertThatExceptionOfType(NoSuchBeanDefinitionException.class).isThrownBy(() -> + this.cs.unknownCustomKeyGenerator(param)); + } + + @Test + public void testCustomCacheManager() { + CacheManager customCm = this.ctx.getBean("customCacheManager", CacheManager.class); + Object key = new Object(); + Object r1 = this.cs.customCacheManager(key); + assertThat(this.cs.customCacheManager(key)).isSameAs(r1); + + Cache cache = customCm.getCache("testCache"); + assertThat(cache.get(key)).isNotNull(); + } + + @Test + public void testUnknownCustomCacheManager() { + Object param = new Object(); + assertThatExceptionOfType(NoSuchBeanDefinitionException.class).isThrownBy(() -> + this.cs.unknownCustomCacheManager(param)); + } + + @Test + public void testNullArg() { + testNullArg(this.cs); + } + + @Test + public void testClassNullArg() { + testNullArg(this.ccs); + } + + @Test + public void testCheckedException() { + testCheckedThrowable(this.cs); + } + + @Test + public void testClassCheckedException() { + testCheckedThrowable(this.ccs); + } + + @Test + public void testCheckedExceptionSync() { + testCheckedThrowableSync(this.cs); + } + + @Test + public void testClassCheckedExceptionSync() { + testCheckedThrowableSync(this.ccs); + } + + @Test + public void testUncheckedException() { + testUncheckedThrowable(this.cs); + } + + @Test + public void testClassUncheckedException() { + testUncheckedThrowable(this.ccs); + } + + @Test + public void testUncheckedExceptionSync() { + testUncheckedThrowableSync(this.cs); + } + + @Test + public void testClassUncheckedExceptionSync() { + testUncheckedThrowableSync(this.ccs); + } + + @Test + public void testUpdate() { + testCacheUpdate(this.cs); + } + + @Test + public void testClassUpdate() { + testCacheUpdate(this.ccs); + } + + @Test + public void testConditionalUpdate() { + testConditionalCacheUpdate(this.cs); + } + + @Test + public void testClassConditionalUpdate() { + testConditionalCacheUpdate(this.ccs); + } + + @Test + public void testMultiCache() { + testMultiCache(this.cs); + } + + @Test + public void testClassMultiCache() { + testMultiCache(this.ccs); + } + + @Test + public void testMultiEvict() { + testMultiEvict(this.cs); + } + + @Test + public void testClassMultiEvict() { + testMultiEvict(this.ccs); + } + + @Test + public void testMultiPut() { + testMultiPut(this.cs); + } + + @Test + public void testClassMultiPut() { + testMultiPut(this.ccs); + } + + @Test + public void testPutRefersToResult() { + testPutRefersToResult(this.cs); + } + + @Test + public void testClassPutRefersToResult() { + testPutRefersToResult(this.ccs); + } + + @Test + public void testMultiCacheAndEvict() { + testMultiCacheAndEvict(this.cs); + } + + @Test + public void testClassMultiCacheAndEvict() { + testMultiCacheAndEvict(this.ccs); + } + + @Test + public void testMultiConditionalCacheAndEvict() { + testMultiConditionalCacheAndEvict(this.cs); + } + + @Test + public void testClassMultiConditionalCacheAndEvict() { + testMultiConditionalCacheAndEvict(this.ccs); + } + +} diff --git a/spring-aspects/src/test/java/org/springframework/cache/aspectj/AspectJCacheAnnotationTests.java b/spring-aspects/src/test/java/org/springframework/cache/aspectj/AspectJCacheAnnotationTests.java index e952eacd3b0..4601c0ea814 100644 --- a/spring-aspects/src/test/java/org/springframework/cache/aspectj/AspectJCacheAnnotationTests.java +++ b/spring-aspects/src/test/java/org/springframework/cache/aspectj/AspectJCacheAnnotationTests.java @@ -19,7 +19,6 @@ package org.springframework.cache.aspectj; import org.junit.jupiter.api.Test; import org.springframework.cache.Cache; -import org.springframework.cache.config.AbstractCacheAnnotationTests; import org.springframework.cache.config.CacheableService; import org.springframework.context.ConfigurableApplicationContext; import org.springframework.context.support.GenericXmlApplicationContext; diff --git a/spring-aspects/src/test/java/org/springframework/cache/aspectj/AspectJEnableCachingIsolatedTests.java b/spring-aspects/src/test/java/org/springframework/cache/aspectj/AspectJEnableCachingIsolatedTests.java index 57b9b90f559..686acc54851 100644 --- a/spring-aspects/src/test/java/org/springframework/cache/aspectj/AspectJEnableCachingIsolatedTests.java +++ b/spring-aspects/src/test/java/org/springframework/cache/aspectj/AspectJEnableCachingIsolatedTests.java @@ -22,14 +22,8 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.factory.BeanCreationException; import org.springframework.cache.CacheManager; -import org.springframework.cache.CacheTestUtils; import org.springframework.cache.annotation.CachingConfigurerSupport; import org.springframework.cache.annotation.EnableCaching; -import org.springframework.cache.config.AnnotatedClassCacheableService; -import org.springframework.cache.config.CacheableService; -import org.springframework.cache.config.DefaultCacheableService; -import org.springframework.cache.config.SomeCustomKeyGenerator; -import org.springframework.cache.config.SomeKeyGenerator; import org.springframework.cache.interceptor.CacheErrorHandler; import org.springframework.cache.interceptor.CacheResolver; import org.springframework.cache.interceptor.KeyGenerator; @@ -42,6 +36,12 @@ import org.springframework.context.annotation.AdviceMode; import org.springframework.context.annotation.AnnotationConfigApplicationContext; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; +import org.springframework.context.test.fixtures.cache.CacheTestUtils; +import org.springframework.context.test.fixtures.cache.SomeCustomKeyGenerator; +import org.springframework.context.test.fixtures.cache.SomeKeyGenerator; +import org.springframework.context.test.fixtures.cache.beans.AnnotatedClassCacheableService; +import org.springframework.context.test.fixtures.cache.beans.CacheableService; +import org.springframework.context.test.fixtures.cache.beans.DefaultCacheableService; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-aspects/src/test/java/org/springframework/cache/aspectj/AspectJEnableCachingTests.java b/spring-aspects/src/test/java/org/springframework/cache/aspectj/AspectJEnableCachingTests.java index 7857394de16..8fc14ff0452 100644 --- a/spring-aspects/src/test/java/org/springframework/cache/aspectj/AspectJEnableCachingTests.java +++ b/spring-aspects/src/test/java/org/springframework/cache/aspectj/AspectJEnableCachingTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2016 the original author or authors. + * Copyright 2002-2019 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. @@ -17,15 +17,11 @@ package org.springframework.cache.aspectj; import org.springframework.cache.CacheManager; -import org.springframework.cache.CacheTestUtils; import org.springframework.cache.annotation.CachingConfigurerSupport; import org.springframework.cache.annotation.EnableCaching; -import org.springframework.cache.config.AbstractCacheAnnotationTests; import org.springframework.cache.config.AnnotatedClassCacheableService; import org.springframework.cache.config.CacheableService; import org.springframework.cache.config.DefaultCacheableService; -import org.springframework.cache.config.SomeCustomKeyGenerator; -import org.springframework.cache.config.SomeKeyGenerator; import org.springframework.cache.interceptor.CacheErrorHandler; import org.springframework.cache.interceptor.KeyGenerator; import org.springframework.cache.interceptor.SimpleCacheErrorHandler; @@ -34,6 +30,9 @@ import org.springframework.context.annotation.AdviceMode; import org.springframework.context.annotation.AnnotationConfigApplicationContext; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; +import org.springframework.context.test.fixtures.cache.CacheTestUtils; +import org.springframework.context.test.fixtures.cache.SomeCustomKeyGenerator; +import org.springframework.context.test.fixtures.cache.SomeKeyGenerator; /** * @author Stephane Nicoll diff --git a/spring-aspects/src/test/java/org/springframework/cache/config/AnnotatedClassCacheableService.java b/spring-aspects/src/test/java/org/springframework/cache/config/AnnotatedClassCacheableService.java index 5872dffc780..fa494c92128 100644 --- a/spring-aspects/src/test/java/org/springframework/cache/config/AnnotatedClassCacheableService.java +++ b/spring-aspects/src/test/java/org/springframework/cache/config/AnnotatedClassCacheableService.java @@ -25,6 +25,10 @@ import org.springframework.cache.annotation.Cacheable; import org.springframework.cache.annotation.Caching; /** + * Copy of the shared {@code AbstractCacheAnnotationTests}: necessary + * due to issues with Gradle test fixtures and AspectJ configuration + * in the Gradle build. + * * @author Costin Leau * @author Phillip Webb * @author Stephane Nicoll diff --git a/spring-aspects/src/test/java/org/springframework/cache/config/CacheableService.java b/spring-aspects/src/test/java/org/springframework/cache/config/CacheableService.java index e5ab4a5f94c..3ec6212bac6 100644 --- a/spring-aspects/src/test/java/org/springframework/cache/config/CacheableService.java +++ b/spring-aspects/src/test/java/org/springframework/cache/config/CacheableService.java @@ -17,7 +17,11 @@ package org.springframework.cache.config; /** - * Basic service interface for caching tests. + * Copy of the shared {@code CacheableService}: necessary + * due to issues with Gradle test fixtures and AspectJ configuration + * in the Gradle build. + * + *

Basic service interface for caching tests. * * @author Costin Leau * @author Phillip Webb diff --git a/spring-aspects/src/test/java/org/springframework/cache/config/DefaultCacheableService.java b/spring-aspects/src/test/java/org/springframework/cache/config/DefaultCacheableService.java index 7df2bb4ea27..47a3a83a34a 100644 --- a/spring-aspects/src/test/java/org/springframework/cache/config/DefaultCacheableService.java +++ b/spring-aspects/src/test/java/org/springframework/cache/config/DefaultCacheableService.java @@ -25,7 +25,11 @@ import org.springframework.cache.annotation.Cacheable; import org.springframework.cache.annotation.Caching; /** - * Simple cacheable service. + * Copy of the shared {@code DefaultCacheableService}: necessary + * due to issues with Gradle test fixtures and AspectJ configuration + * in the Gradle build. + * + *

Simple cacheable service. * * @author Costin Leau * @author Phillip Webb diff --git a/spring-aspects/src/test/java/org/springframework/cache/config/SomeKeyGenerator.java b/spring-aspects/src/test/java/org/springframework/cache/config/SomeKeyGenerator.java deleted file mode 100644 index 11e757b062f..00000000000 --- a/spring-aspects/src/test/java/org/springframework/cache/config/SomeKeyGenerator.java +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright 2002-2016 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. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.cache.config; - -import org.springframework.cache.interceptor.SimpleKeyGenerator; - -public class SomeKeyGenerator extends SimpleKeyGenerator { -} diff --git a/spring-aspects/src/test/java/org/springframework/cache/config/TestEntity.java b/spring-aspects/src/test/java/org/springframework/cache/config/TestEntity.java index 087019a3764..b308741ee14 100644 --- a/spring-aspects/src/test/java/org/springframework/cache/config/TestEntity.java +++ b/spring-aspects/src/test/java/org/springframework/cache/config/TestEntity.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2013 the original author or authors. + * Copyright 2002-2019 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. @@ -19,7 +19,11 @@ package org.springframework.cache.config; import org.springframework.util.ObjectUtils; /** - * Simple test entity for use with caching tests. + * Copy of the shared {@code TestEntity}: necessary + * due to issues with Gradle test fixtures and AspectJ configuration + * in the Gradle build. + * + *

Simple test entity for use with caching tests. * * @author Michael Plod */ @@ -53,5 +57,4 @@ public class TestEntity { } return false; } - } diff --git a/spring-aspects/src/test/resources/org/springframework/cache/config/annotation-cache-aspectj.xml b/spring-aspects/src/test/resources/org/springframework/cache/config/annotation-cache-aspectj.xml index 1ff47150738..f9df2c29bf7 100644 --- a/spring-aspects/src/test/resources/org/springframework/cache/config/annotation-cache-aspectj.xml +++ b/spring-aspects/src/test/resources/org/springframework/cache/config/annotation-cache-aspectj.xml @@ -22,7 +22,7 @@ - + @@ -40,7 +40,7 @@ - + diff --git a/spring-beans/spring-beans.gradle b/spring-beans/spring-beans.gradle index 9ab23dedff8..0e967081150 100644 --- a/spring-beans/spring-beans.gradle +++ b/spring-beans/spring-beans.gradle @@ -12,6 +12,8 @@ dependencies { optional("org.jetbrains.kotlin:kotlin-stdlib") testCompile(testFixtures(project(":spring-core"))) testCompile("javax.annotation:javax.annotation-api") + testFixturesApi("org.junit.jupiter:junit-jupiter-api") + testFixturesImplementation("org.assertj:assertj-core") } // This module does joint compilation for Java and Groovy code with the compileGroovy task. diff --git a/spring-beans/src/test/java/org/springframework/beans/AbstractPropertyAccessorTests.java b/spring-beans/src/test/java/org/springframework/beans/AbstractPropertyAccessorTests.java index 723ee31c238..156df6d2802 100644 --- a/spring-beans/src/test/java/org/springframework/beans/AbstractPropertyAccessorTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/AbstractPropertyAccessorTests.java @@ -43,6 +43,11 @@ import org.springframework.beans.propertyeditors.CustomNumberEditor; import org.springframework.beans.propertyeditors.StringArrayPropertyEditor; import org.springframework.beans.propertyeditors.StringTrimmerEditor; import org.springframework.beans.support.DerivedFromProtectedBaseBean; +import org.springframework.beans.test.fixtures.beans.BooleanTestBean; +import org.springframework.beans.test.fixtures.beans.ITestBean; +import org.springframework.beans.test.fixtures.beans.IndexedTestBean; +import org.springframework.beans.test.fixtures.beans.NumberTestBean; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.core.convert.ConversionFailedException; import org.springframework.core.convert.TypeDescriptor; import org.springframework.core.convert.support.DefaultConversionService; @@ -50,11 +55,6 @@ import org.springframework.core.convert.support.GenericConversionService; import org.springframework.core.test.fixtures.Assume; import org.springframework.core.test.fixtures.EnabledForTestGroups; import org.springframework.lang.Nullable; -import org.springframework.tests.sample.beans.BooleanTestBean; -import org.springframework.tests.sample.beans.ITestBean; -import org.springframework.tests.sample.beans.IndexedTestBean; -import org.springframework.tests.sample.beans.NumberTestBean; -import org.springframework.tests.sample.beans.TestBean; import org.springframework.util.StopWatch; import org.springframework.util.StringUtils; diff --git a/spring-beans/src/test/java/org/springframework/beans/BeanUtilsTests.java b/spring-beans/src/test/java/org/springframework/beans/BeanUtilsTests.java index 544d06750a9..948d1913f9b 100644 --- a/spring-beans/src/test/java/org/springframework/beans/BeanUtilsTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/BeanUtilsTests.java @@ -34,12 +34,12 @@ import org.junit.jupiter.params.provider.ValueSource; import org.springframework.beans.factory.BeanFactory; import org.springframework.beans.propertyeditors.CustomDateEditor; +import org.springframework.beans.test.fixtures.beans.DerivedTestBean; +import org.springframework.beans.test.fixtures.beans.ITestBean; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.core.io.Resource; import org.springframework.core.io.ResourceEditor; import org.springframework.lang.Nullable; -import org.springframework.tests.sample.beans.DerivedTestBean; -import org.springframework.tests.sample.beans.ITestBean; -import org.springframework.tests.sample.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; diff --git a/spring-beans/src/test/java/org/springframework/beans/BeanWrapperEnumTests.java b/spring-beans/src/test/java/org/springframework/beans/BeanWrapperEnumTests.java index 5327e70a3a4..492cb10d494 100644 --- a/spring-beans/src/test/java/org/springframework/beans/BeanWrapperEnumTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/BeanWrapperEnumTests.java @@ -21,9 +21,9 @@ import java.util.Map; import org.junit.jupiter.api.Test; +import org.springframework.beans.test.fixtures.beans.CustomEnum; +import org.springframework.beans.test.fixtures.beans.GenericBean; import org.springframework.core.convert.support.DefaultConversionService; -import org.springframework.tests.sample.beans.CustomEnum; -import org.springframework.tests.sample.beans.GenericBean; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-beans/src/test/java/org/springframework/beans/BeanWrapperGenericsTests.java b/spring-beans/src/test/java/org/springframework/beans/BeanWrapperGenericsTests.java index 9205b2c5f99..9e6f50e2cfd 100644 --- a/spring-beans/src/test/java/org/springframework/beans/BeanWrapperGenericsTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/BeanWrapperGenericsTests.java @@ -33,11 +33,11 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.propertyeditors.CustomNumberEditor; import org.springframework.beans.propertyeditors.StringTrimmerEditor; +import org.springframework.beans.test.fixtures.beans.GenericBean; +import org.springframework.beans.test.fixtures.beans.GenericIntegerBean; +import org.springframework.beans.test.fixtures.beans.GenericSetOfIntegerBean; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.core.io.UrlResource; -import org.springframework.tests.sample.beans.GenericBean; -import org.springframework.tests.sample.beans.GenericIntegerBean; -import org.springframework.tests.sample.beans.GenericSetOfIntegerBean; -import org.springframework.tests.sample.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; diff --git a/spring-beans/src/test/java/org/springframework/beans/BeanWrapperTests.java b/spring-beans/src/test/java/org/springframework/beans/BeanWrapperTests.java index a46b1957d99..f9661e84492 100644 --- a/spring-beans/src/test/java/org/springframework/beans/BeanWrapperTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/BeanWrapperTests.java @@ -22,7 +22,7 @@ import java.util.Optional; import org.junit.jupiter.api.Test; -import org.springframework.tests.sample.beans.TestBean; +import org.springframework.beans.test.fixtures.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; diff --git a/spring-beans/src/test/java/org/springframework/beans/CachedIntrospectionResultsTests.java b/spring-beans/src/test/java/org/springframework/beans/CachedIntrospectionResultsTests.java index 4c867e3b69e..78f2fdf5a73 100644 --- a/spring-beans/src/test/java/org/springframework/beans/CachedIntrospectionResultsTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/CachedIntrospectionResultsTests.java @@ -22,8 +22,8 @@ import java.util.ArrayList; import org.junit.jupiter.api.Test; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.core.OverridingClassLoader; -import org.springframework.tests.sample.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; @@ -42,7 +42,7 @@ public class CachedIntrospectionResultsTests { assertThat(CachedIntrospectionResults.strongClassCache.containsKey(TestBean.class)).isTrue(); ClassLoader child = new OverridingClassLoader(getClass().getClassLoader()); - Class tbClass = child.loadClass("org.springframework.tests.sample.beans.TestBean"); + Class tbClass = child.loadClass("org.springframework.beans.test.fixtures.beans.TestBean"); assertThat(CachedIntrospectionResults.strongClassCache.containsKey(tbClass)).isFalse(); CachedIntrospectionResults.acceptClassLoader(child); bw = new BeanWrapperImpl(tbClass); diff --git a/spring-beans/src/test/java/org/springframework/beans/DirectFieldAccessorTests.java b/spring-beans/src/test/java/org/springframework/beans/DirectFieldAccessorTests.java index de10f1a982b..9f7ff9dda23 100644 --- a/spring-beans/src/test/java/org/springframework/beans/DirectFieldAccessorTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/DirectFieldAccessorTests.java @@ -18,7 +18,7 @@ package org.springframework.beans; import org.junit.jupiter.api.Test; -import org.springframework.tests.sample.beans.TestBean; +import org.springframework.beans.test.fixtures.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-beans/src/test/java/org/springframework/beans/ExtendedBeanInfoTests.java b/spring-beans/src/test/java/org/springframework/beans/ExtendedBeanInfoTests.java index 640b1b920fb..732e61131a5 100644 --- a/spring-beans/src/test/java/org/springframework/beans/ExtendedBeanInfoTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/ExtendedBeanInfoTests.java @@ -25,7 +25,7 @@ import java.math.BigDecimal; import org.junit.jupiter.api.Test; -import org.springframework.tests.sample.beans.TestBean; +import org.springframework.beans.test.fixtures.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/BeanFactoryUtilsTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/BeanFactoryUtilsTests.java index 4f7a9659bc0..2fc77072a28 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/BeanFactoryUtilsTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/BeanFactoryUtilsTests.java @@ -26,14 +26,14 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.support.StaticListableBeanFactory; import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; +import org.springframework.beans.test.fixtures.beans.AnnotatedBean; +import org.springframework.beans.test.fixtures.beans.ITestBean; +import org.springframework.beans.test.fixtures.beans.IndexedTestBean; +import org.springframework.beans.test.fixtures.beans.TestAnnotation; +import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.test.fixtures.beans.factory.DummyFactory; import org.springframework.cglib.proxy.NoOp; import org.springframework.core.io.Resource; -import org.springframework.tests.sample.beans.AnnotatedBean; -import org.springframework.tests.sample.beans.ITestBean; -import org.springframework.tests.sample.beans.IndexedTestBean; -import org.springframework.tests.sample.beans.TestAnnotation; -import org.springframework.tests.sample.beans.TestBean; -import org.springframework.tests.sample.beans.factory.DummyFactory; import org.springframework.util.ObjectUtils; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/DefaultListableBeanFactoryTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/DefaultListableBeanFactoryTests.java index 20fde13c848..6d50c6e1df6 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/DefaultListableBeanFactoryTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/DefaultListableBeanFactoryTests.java @@ -78,6 +78,14 @@ import org.springframework.beans.factory.support.PropertiesBeanDefinitionReader; import org.springframework.beans.factory.support.RootBeanDefinition; import org.springframework.beans.factory.xml.ConstructorDependenciesBean; import org.springframework.beans.propertyeditors.CustomNumberEditor; +import org.springframework.beans.test.fixtures.beans.DependenciesBean; +import org.springframework.beans.test.fixtures.beans.DerivedTestBean; +import org.springframework.beans.test.fixtures.beans.ITestBean; +import org.springframework.beans.test.fixtures.beans.LifecycleBean; +import org.springframework.beans.test.fixtures.beans.NestedTestBean; +import org.springframework.beans.test.fixtures.beans.SideEffectBean; +import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.test.fixtures.beans.factory.DummyFactory; import org.springframework.core.MethodParameter; import org.springframework.core.ResolvableType; import org.springframework.core.annotation.AnnotationAwareOrderComparator; @@ -91,14 +99,6 @@ import org.springframework.core.test.fixtures.EnabledForTestGroups; import org.springframework.core.test.fixtures.TestGroup; import org.springframework.core.test.fixtures.io.SerializationTestUtils; import org.springframework.lang.Nullable; -import org.springframework.tests.sample.beans.DependenciesBean; -import org.springframework.tests.sample.beans.DerivedTestBean; -import org.springframework.tests.sample.beans.ITestBean; -import org.springframework.tests.sample.beans.LifecycleBean; -import org.springframework.tests.sample.beans.NestedTestBean; -import org.springframework.tests.sample.beans.SideEffectBean; -import org.springframework.tests.sample.beans.TestBean; -import org.springframework.tests.sample.beans.factory.DummyFactory; import org.springframework.util.StopWatch; import org.springframework.util.StringValueResolver; diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/annotation/AutowiredAnnotationBeanPostProcessorTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/annotation/AutowiredAnnotationBeanPostProcessorTests.java index 2a552309f63..e7e79b6b3e5 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/annotation/AutowiredAnnotationBeanPostProcessorTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/annotation/AutowiredAnnotationBeanPostProcessorTests.java @@ -64,15 +64,15 @@ import org.springframework.beans.factory.support.AutowireCandidateQualifier; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.support.GenericBeanDefinition; import org.springframework.beans.factory.support.RootBeanDefinition; +import org.springframework.beans.test.fixtures.beans.ITestBean; +import org.springframework.beans.test.fixtures.beans.IndexedTestBean; +import org.springframework.beans.test.fixtures.beans.NestedTestBean; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.core.Ordered; import org.springframework.core.ResolvableType; import org.springframework.core.annotation.AnnotationAwareOrderComparator; import org.springframework.core.annotation.Order; import org.springframework.core.test.fixtures.io.SerializationTestUtils; -import org.springframework.tests.sample.beans.ITestBean; -import org.springframework.tests.sample.beans.IndexedTestBean; -import org.springframework.tests.sample.beans.NestedTestBean; -import org.springframework.tests.sample.beans.TestBean; import org.springframework.util.ReflectionUtils; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/annotation/InjectAnnotationBeanPostProcessorTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/annotation/InjectAnnotationBeanPostProcessorTests.java index 2a39ac4fbaf..d6cd527c74e 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/annotation/InjectAnnotationBeanPostProcessorTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/annotation/InjectAnnotationBeanPostProcessorTests.java @@ -40,11 +40,11 @@ import org.springframework.beans.factory.support.AutowireCandidateQualifier; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.support.GenericBeanDefinition; import org.springframework.beans.factory.support.RootBeanDefinition; +import org.springframework.beans.test.fixtures.beans.ITestBean; +import org.springframework.beans.test.fixtures.beans.IndexedTestBean; +import org.springframework.beans.test.fixtures.beans.NestedTestBean; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.core.test.fixtures.io.SerializationTestUtils; -import org.springframework.tests.sample.beans.ITestBean; -import org.springframework.tests.sample.beans.IndexedTestBean; -import org.springframework.tests.sample.beans.NestedTestBean; -import org.springframework.tests.sample.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/annotation/LookupAnnotationTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/annotation/LookupAnnotationTests.java index a2bf1a16262..d610040ed68 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/annotation/LookupAnnotationTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/annotation/LookupAnnotationTests.java @@ -22,7 +22,7 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.factory.config.BeanDefinition; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.support.RootBeanDefinition; -import org.springframework.tests.sample.beans.TestBean; +import org.springframework.beans.test.fixtures.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/config/CustomEditorConfigurerTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/config/CustomEditorConfigurerTests.java index 921e76100c5..3fa7f2b4e9a 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/config/CustomEditorConfigurerTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/config/CustomEditorConfigurerTests.java @@ -33,7 +33,7 @@ import org.springframework.beans.PropertyEditorRegistry; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.support.RootBeanDefinition; import org.springframework.beans.propertyeditors.CustomDateEditor; -import org.springframework.tests.sample.beans.TestBean; +import org.springframework.beans.test.fixtures.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/config/FieldRetrievingFactoryBeanTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/config/FieldRetrievingFactoryBeanTests.java index 770a6bddd0b..e9241a8353b 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/config/FieldRetrievingFactoryBeanTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/config/FieldRetrievingFactoryBeanTests.java @@ -22,7 +22,7 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; -import org.springframework.tests.sample.beans.TestBean; +import org.springframework.beans.test.fixtures.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; import static org.springframework.core.test.fixtures.io.ResourceTestUtils.qualifiedResource; @@ -115,7 +115,7 @@ public class FieldRetrievingFactoryBeanTests { @Test public void testWithConstantOnClassWithPackageLevelVisibility() throws Exception { FieldRetrievingFactoryBean fr = new FieldRetrievingFactoryBean(); - fr.setBeanName("org.springframework.tests.sample.beans.PackageLevelVisibleBean.CONSTANT"); + fr.setBeanName("org.springframework.beans.test.fixtures.beans.PackageLevelVisibleBean.CONSTANT"); fr.afterPropertiesSet(); assertThat(fr.getObject()).isEqualTo("Wuby"); } diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/config/PropertyPathFactoryBeanTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/config/PropertyPathFactoryBeanTests.java index c9ba85ae21b..1dc74c7115a 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/config/PropertyPathFactoryBeanTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/config/PropertyPathFactoryBeanTests.java @@ -20,9 +20,9 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; +import org.springframework.beans.test.fixtures.beans.ITestBean; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.core.io.Resource; -import org.springframework.tests.sample.beans.ITestBean; -import org.springframework.tests.sample.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; import static org.springframework.core.test.fixtures.io.ResourceTestUtils.qualifiedResource; diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/config/PropertyPlaceholderConfigurerTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/config/PropertyPlaceholderConfigurerTests.java index ac0643b3f28..b3efca4647f 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/config/PropertyPlaceholderConfigurerTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/config/PropertyPlaceholderConfigurerTests.java @@ -24,9 +24,9 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.factory.support.AbstractBeanDefinition; import org.springframework.beans.factory.support.DefaultListableBeanFactory; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.Resource; -import org.springframework.tests.sample.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; import static org.springframework.beans.factory.support.BeanDefinitionBuilder.genericBeanDefinition; diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/config/PropertyResourceConfigurerTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/config/PropertyResourceConfigurerTests.java index cf8cf8ac18a..f48ec3470c2 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/config/PropertyResourceConfigurerTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/config/PropertyResourceConfigurerTests.java @@ -39,9 +39,9 @@ import org.springframework.beans.factory.support.ManagedList; 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.test.fixtures.beans.IndexedTestBean; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.core.io.Resource; -import org.springframework.tests.sample.beans.IndexedTestBean; -import org.springframework.tests.sample.beans.TestBean; import org.springframework.util.StringUtils; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/config/SimpleScopeTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/config/SimpleScopeTests.java index 5844bb08069..6bfc37ad922 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/config/SimpleScopeTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/config/SimpleScopeTests.java @@ -25,7 +25,7 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.factory.ObjectFactory; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; -import org.springframework.tests.sample.beans.TestBean; +import org.springframework.beans.test.fixtures.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; import static org.springframework.core.test.fixtures.io.ResourceTestUtils.qualifiedResource; diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/parsing/CustomProblemReporterTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/parsing/CustomProblemReporterTests.java index c8287913ef8..40b07c0b628 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/parsing/CustomProblemReporterTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/parsing/CustomProblemReporterTests.java @@ -24,7 +24,7 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; -import org.springframework.tests.sample.beans.TestBean; +import org.springframework.beans.test.fixtures.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; import static org.springframework.core.test.fixtures.io.ResourceTestUtils.qualifiedResource; diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/support/BeanDefinitionBuilderTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/support/BeanDefinitionBuilderTests.java index 6d416cdcf79..de163b96e34 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/support/BeanDefinitionBuilderTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/support/BeanDefinitionBuilderTests.java @@ -21,7 +21,7 @@ import java.util.Arrays; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.config.BeanDefinition; -import org.springframework.tests.sample.beans.TestBean; +import org.springframework.beans.test.fixtures.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/support/BeanDefinitionTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/support/BeanDefinitionTests.java index a7af6e8f292..e5fe0a0e868 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/support/BeanDefinitionTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/support/BeanDefinitionTests.java @@ -19,7 +19,7 @@ package org.springframework.beans.factory.support; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.config.BeanDefinitionHolder; -import org.springframework.tests.sample.beans.TestBean; +import org.springframework.beans.test.fixtures.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/support/BeanFactoryGenericsTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/support/BeanFactoryGenericsTests.java index e89a49b4b3b..311b8708890 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/support/BeanFactoryGenericsTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/support/BeanFactoryGenericsTests.java @@ -43,6 +43,10 @@ import org.springframework.beans.factory.ObjectProvider; import org.springframework.beans.factory.config.TypedStringValue; import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; import org.springframework.beans.propertyeditors.CustomNumberEditor; +import org.springframework.beans.test.fixtures.beans.GenericBean; +import org.springframework.beans.test.fixtures.beans.GenericIntegerBean; +import org.springframework.beans.test.fixtures.beans.GenericSetOfIntegerBean; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.core.OverridingClassLoader; import org.springframework.core.ResolvableType; import org.springframework.core.annotation.AnnotationAwareOrderComparator; @@ -50,10 +54,6 @@ import org.springframework.core.annotation.Order; import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.UrlResource; import org.springframework.core.test.fixtures.EnabledForTestGroups; -import org.springframework.tests.sample.beans.GenericBean; -import org.springframework.tests.sample.beans.GenericIntegerBean; -import org.springframework.tests.sample.beans.GenericSetOfIntegerBean; -import org.springframework.tests.sample.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/support/DefaultSingletonBeanRegistryTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/support/DefaultSingletonBeanRegistryTests.java index 303bc31ec4a..a325c67a35e 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/support/DefaultSingletonBeanRegistryTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/support/DefaultSingletonBeanRegistryTests.java @@ -20,8 +20,8 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.BeansException; import org.springframework.beans.factory.ObjectFactory; -import org.springframework.tests.sample.beans.DerivedTestBean; -import org.springframework.tests.sample.beans.TestBean; +import org.springframework.beans.test.fixtures.beans.DerivedTestBean; +import org.springframework.beans.test.fixtures.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/support/DefinitionMetadataEqualsHashCodeTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/support/DefinitionMetadataEqualsHashCodeTests.java index ca09f9ee846..866556a180c 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/support/DefinitionMetadataEqualsHashCodeTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/support/DefinitionMetadataEqualsHashCodeTests.java @@ -20,7 +20,7 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.factory.config.BeanDefinition; import org.springframework.beans.factory.config.RuntimeBeanReference; -import org.springframework.tests.sample.beans.TestBean; +import org.springframework.beans.test.fixtures.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/support/LookupMethodTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/support/LookupMethodTests.java index a12a21772b7..e6781ed74d4 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/support/LookupMethodTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/support/LookupMethodTests.java @@ -20,8 +20,8 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.core.io.ClassPathResource; -import org.springframework.tests.sample.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/support/PropertiesBeanDefinitionReaderTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/support/PropertiesBeanDefinitionReaderTests.java index dd811aa4123..7efdfe4c001 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/support/PropertiesBeanDefinitionReaderTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/support/PropertiesBeanDefinitionReaderTests.java @@ -18,8 +18,8 @@ package org.springframework.beans.factory.support; import org.junit.jupiter.api.Test; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.core.io.ClassPathResource; -import org.springframework.tests.sample.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/wiring/BeanConfigurerSupportTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/wiring/BeanConfigurerSupportTests.java index 8c5cb1e8b5c..05fa60b0b4c 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/wiring/BeanConfigurerSupportTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/wiring/BeanConfigurerSupportTests.java @@ -21,7 +21,7 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.factory.BeanFactory; import org.springframework.beans.factory.support.BeanDefinitionBuilder; import org.springframework.beans.factory.support.DefaultListableBeanFactory; -import org.springframework.tests.sample.beans.TestBean; +import org.springframework.beans.test.fixtures.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException; diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/xml/AutowireWithExclusionTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/xml/AutowireWithExclusionTests.java index 2ed794e5747..f7c2542aecc 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/xml/AutowireWithExclusionTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/xml/AutowireWithExclusionTests.java @@ -22,8 +22,8 @@ import org.springframework.beans.factory.config.PropertiesFactoryBean; import org.springframework.beans.factory.config.RuntimeBeanReference; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.support.RootBeanDefinition; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.core.io.ClassPathResource; -import org.springframework.tests.sample.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/xml/CollectionMergingTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/xml/CollectionMergingTests.java index 720bf605f38..bc119e2b183 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/xml/CollectionMergingTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/xml/CollectionMergingTests.java @@ -27,8 +27,8 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.factory.support.BeanDefinitionReader; import org.springframework.beans.factory.support.DefaultListableBeanFactory; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.core.io.ClassPathResource; -import org.springframework.tests.sample.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/xml/CollectionsWithDefaultTypesTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/xml/CollectionsWithDefaultTypesTests.java index 1cdd84ba9fa..e0ceb48a1ed 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/xml/CollectionsWithDefaultTypesTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/xml/CollectionsWithDefaultTypesTests.java @@ -22,8 +22,8 @@ import java.util.Map; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.support.DefaultListableBeanFactory; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.core.io.ClassPathResource; -import org.springframework.tests.sample.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/xml/ConstructorDependenciesBean.java b/spring-beans/src/test/java/org/springframework/beans/factory/xml/ConstructorDependenciesBean.java index f4ca864f830..df644ab49cc 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/xml/ConstructorDependenciesBean.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/xml/ConstructorDependenciesBean.java @@ -18,8 +18,8 @@ package org.springframework.beans.factory.xml; import java.io.Serializable; -import org.springframework.tests.sample.beans.IndexedTestBean; -import org.springframework.tests.sample.beans.TestBean; +import org.springframework.beans.test.fixtures.beans.IndexedTestBean; +import org.springframework.beans.test.fixtures.beans.TestBean; /** * Simple bean used to check constructor dependency checking. diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/xml/CountingFactory.java b/spring-beans/src/test/java/org/springframework/beans/factory/xml/CountingFactory.java index 3a992e3334b..2d2720ff1e3 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/xml/CountingFactory.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/xml/CountingFactory.java @@ -17,7 +17,7 @@ package org.springframework.beans.factory.xml; import org.springframework.beans.factory.FactoryBean; -import org.springframework.tests.sample.beans.TestBean; +import org.springframework.beans.test.fixtures.beans.TestBean; /** * @author Juergen Hoeller diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/xml/DummyReferencer.java b/spring-beans/src/test/java/org/springframework/beans/factory/xml/DummyReferencer.java index 352e0895804..2c1a8b99b5b 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/xml/DummyReferencer.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/xml/DummyReferencer.java @@ -17,8 +17,8 @@ package org.springframework.beans.factory.xml; -import org.springframework.tests.sample.beans.TestBean; -import org.springframework.tests.sample.beans.factory.DummyFactory; +import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.test.fixtures.beans.factory.DummyFactory; /** * @author Juergen Hoeller diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/xml/DuplicateBeanIdTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/xml/DuplicateBeanIdTests.java index 983292c56aa..8f9a7154146 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/xml/DuplicateBeanIdTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/xml/DuplicateBeanIdTests.java @@ -19,8 +19,8 @@ package org.springframework.beans.factory.xml; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.support.DefaultListableBeanFactory; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.core.io.ClassPathResource; -import org.springframework.tests.sample.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/xml/EventPublicationTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/xml/EventPublicationTests.java index 7fef2df708e..0d872c14fa2 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/xml/EventPublicationTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/xml/EventPublicationTests.java @@ -30,8 +30,8 @@ import org.springframework.beans.factory.parsing.ComponentDefinition; import org.springframework.beans.factory.parsing.ImportDefinition; import org.springframework.beans.factory.parsing.PassThroughSourceExtractor; import org.springframework.beans.factory.support.DefaultListableBeanFactory; +import org.springframework.beans.test.fixtures.beans.CollectingReaderEventListener; import org.springframework.core.io.ClassPathResource; -import org.springframework.tests.beans.CollectingReaderEventListener; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/xml/FactoryMethodTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/xml/FactoryMethodTests.java index 3985567eb54..f6ac02ae32a 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/xml/FactoryMethodTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/xml/FactoryMethodTests.java @@ -25,8 +25,8 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.factory.BeanCreationException; import org.springframework.beans.factory.support.DefaultListableBeanFactory; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.core.io.ClassPathResource; -import org.springframework.tests.sample.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/xml/FactoryMethods.java b/spring-beans/src/test/java/org/springframework/beans/factory/xml/FactoryMethods.java index 49fb74a1dd4..80b7747d969 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/xml/FactoryMethods.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/xml/FactoryMethods.java @@ -19,7 +19,7 @@ package org.springframework.beans.factory.xml; import java.util.Collections; import java.util.List; -import org.springframework.tests.sample.beans.TestBean; +import org.springframework.beans.test.fixtures.beans.TestBean; /** * Test class for Spring's ability to create objects using static diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/xml/InstanceFactory.java b/spring-beans/src/test/java/org/springframework/beans/factory/xml/InstanceFactory.java index 8cf0fa91099..e5b1d4d24f3 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/xml/InstanceFactory.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/xml/InstanceFactory.java @@ -16,7 +16,7 @@ package org.springframework.beans.factory.xml; -import org.springframework.tests.sample.beans.TestBean; +import org.springframework.beans.test.fixtures.beans.TestBean; /** * Test class for Spring's ability to create objects using diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/xml/NestedBeansElementAttributeRecursionTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/xml/NestedBeansElementAttributeRecursionTests.java index 6934e5166bc..a5bc425d767 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/xml/NestedBeansElementAttributeRecursionTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/xml/NestedBeansElementAttributeRecursionTests.java @@ -20,8 +20,8 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.factory.config.BeanDefinition; import org.springframework.beans.factory.support.DefaultListableBeanFactory; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.core.io.ClassPathResource; -import org.springframework.tests.sample.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/xml/SchemaValidationTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/xml/SchemaValidationTests.java index 1d51dc3f0bb..c1fa690bf5a 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/xml/SchemaValidationTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/xml/SchemaValidationTests.java @@ -21,8 +21,8 @@ import org.xml.sax.SAXParseException; import org.springframework.beans.BeansException; import org.springframework.beans.factory.support.DefaultListableBeanFactory; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.core.io.ClassPathResource; -import org.springframework.tests.sample.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/xml/SimpleConstructorNamespaceHandlerTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/xml/SimpleConstructorNamespaceHandlerTests.java index 0d4921e4138..b6eef0422c7 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/xml/SimpleConstructorNamespaceHandlerTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/xml/SimpleConstructorNamespaceHandlerTests.java @@ -20,9 +20,9 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.factory.BeanDefinitionStoreException; import org.springframework.beans.factory.support.DefaultListableBeanFactory; +import org.springframework.beans.test.fixtures.beans.DummyBean; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.core.io.ClassPathResource; -import org.springframework.tests.sample.beans.DummyBean; -import org.springframework.tests.sample.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/xml/SimplePropertyNamespaceHandlerTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/xml/SimplePropertyNamespaceHandlerTests.java index b8f943fccd2..054e51e95fc 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/xml/SimplePropertyNamespaceHandlerTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/xml/SimplePropertyNamespaceHandlerTests.java @@ -20,9 +20,9 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.factory.BeanDefinitionStoreException; import org.springframework.beans.factory.support.DefaultListableBeanFactory; +import org.springframework.beans.test.fixtures.beans.ITestBean; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.core.io.ClassPathResource; -import org.springframework.tests.sample.beans.ITestBean; -import org.springframework.tests.sample.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/xml/TestBeanCreator.java b/spring-beans/src/test/java/org/springframework/beans/factory/xml/TestBeanCreator.java index adee655ad49..cf6eb8aa42c 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/xml/TestBeanCreator.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/xml/TestBeanCreator.java @@ -16,7 +16,7 @@ package org.springframework.beans.factory.xml; -import org.springframework.tests.sample.beans.TestBean; +import org.springframework.beans.test.fixtures.beans.TestBean; /** * Test class for Spring's ability to create diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/xml/UtilNamespaceHandlerTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/xml/UtilNamespaceHandlerTests.java index be6be77551c..2e0bb5bb33c 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/xml/UtilNamespaceHandlerTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/xml/UtilNamespaceHandlerTests.java @@ -32,10 +32,10 @@ import org.springframework.beans.factory.config.PropertiesFactoryBean; import org.springframework.beans.factory.parsing.ComponentDefinition; import org.springframework.beans.factory.support.AbstractBeanDefinition; import org.springframework.beans.factory.support.DefaultListableBeanFactory; +import org.springframework.beans.test.fixtures.beans.CollectingReaderEventListener; +import org.springframework.beans.test.fixtures.beans.CustomEnum; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.core.io.ClassPathResource; -import org.springframework.tests.beans.CollectingReaderEventListener; -import org.springframework.tests.sample.beans.CustomEnum; -import org.springframework.tests.sample.beans.TestBean; import org.springframework.util.LinkedCaseInsensitiveMap; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/xml/XmlBeanCollectionTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/xml/XmlBeanCollectionTests.java index 17eadf0c61d..51200a52e47 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/xml/XmlBeanCollectionTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/xml/XmlBeanCollectionTests.java @@ -38,9 +38,9 @@ import org.springframework.beans.factory.config.ListFactoryBean; import org.springframework.beans.factory.config.MapFactoryBean; import org.springframework.beans.factory.config.SetFactoryBean; import org.springframework.beans.factory.support.DefaultListableBeanFactory; +import org.springframework.beans.test.fixtures.beans.HasMap; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.core.io.ClassPathResource; -import org.springframework.tests.sample.beans.HasMap; -import org.springframework.tests.sample.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/xml/XmlBeanDefinitionReaderTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/xml/XmlBeanDefinitionReaderTests.java index 9b460c6601a..34474e075da 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/xml/XmlBeanDefinitionReaderTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/xml/XmlBeanDefinitionReaderTests.java @@ -25,10 +25,10 @@ import org.springframework.beans.factory.BeanDefinitionStoreException; import org.springframework.beans.factory.support.BeanDefinitionRegistry; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.support.SimpleBeanDefinitionRegistry; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.InputStreamResource; import org.springframework.core.io.Resource; -import org.springframework.tests.sample.beans.TestBean; import org.springframework.util.ObjectUtils; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/xml/XmlListableBeanFactoryTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/xml/XmlListableBeanFactoryTests.java index d0b83d98155..e3f69d70bfd 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/xml/XmlListableBeanFactoryTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/xml/XmlListableBeanFactoryTests.java @@ -30,11 +30,12 @@ import org.springframework.beans.factory.BeanFactory; import org.springframework.beans.factory.config.BeanPostProcessor; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.support.RootBeanDefinition; +import org.springframework.beans.test.fixtures.beans.ITestBean; +import org.springframework.beans.test.fixtures.beans.LifecycleBean; +import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.test.fixtures.beans.factory.DummyFactory; +import org.springframework.beans.test.fixtures.factory.xml.AbstractListableBeanFactoryTests; import org.springframework.core.io.ClassPathResource; -import org.springframework.tests.sample.beans.ITestBean; -import org.springframework.tests.sample.beans.LifecycleBean; -import org.springframework.tests.sample.beans.TestBean; -import org.springframework.tests.sample.beans.factory.DummyFactory; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-beans/src/test/java/org/springframework/beans/propertyeditors/CustomEditorTests.java b/spring-beans/src/test/java/org/springframework/beans/propertyeditors/CustomEditorTests.java index 85bf11b9d61..eb3c0b6d7f1 100644 --- a/spring-beans/src/test/java/org/springframework/beans/propertyeditors/CustomEditorTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/propertyeditors/CustomEditorTests.java @@ -43,11 +43,11 @@ import org.springframework.beans.BeanWrapperImpl; import org.springframework.beans.BeansException; import org.springframework.beans.MutablePropertyValues; import org.springframework.beans.PropertyValue; -import org.springframework.tests.sample.beans.BooleanTestBean; -import org.springframework.tests.sample.beans.ITestBean; -import org.springframework.tests.sample.beans.IndexedTestBean; -import org.springframework.tests.sample.beans.NumberTestBean; -import org.springframework.tests.sample.beans.TestBean; +import org.springframework.beans.test.fixtures.beans.BooleanTestBean; +import org.springframework.beans.test.fixtures.beans.ITestBean; +import org.springframework.beans.test.fixtures.beans.IndexedTestBean; +import org.springframework.beans.test.fixtures.beans.NumberTestBean; +import org.springframework.beans.test.fixtures.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; @@ -593,9 +593,9 @@ public class CustomEditorTests { @Test public void testClassEditorWithArray() { PropertyEditor classEditor = new ClassEditor(); - classEditor.setAsText("org.springframework.tests.sample.beans.TestBean[]"); + classEditor.setAsText("org.springframework.beans.test.fixtures.beans.TestBean[]"); assertThat(classEditor.getValue()).isEqualTo(TestBean[].class); - assertThat(classEditor.getAsText()).isEqualTo("org.springframework.tests.sample.beans.TestBean[]"); + assertThat(classEditor.getAsText()).isEqualTo("org.springframework.beans.test.fixtures.beans.TestBean[]"); } /* diff --git a/spring-beans/src/test/java/org/springframework/beans/support/PagedListHolderTests.java b/spring-beans/src/test/java/org/springframework/beans/support/PagedListHolderTests.java index 74a8769d704..e244830c1c5 100644 --- a/spring-beans/src/test/java/org/springframework/beans/support/PagedListHolderTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/support/PagedListHolderTests.java @@ -21,7 +21,7 @@ import java.util.List; import org.junit.jupiter.api.Test; -import org.springframework.tests.sample.beans.TestBean; +import org.springframework.beans.test.fixtures.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-beans/src/test/kotlin/org/springframework/beans/factory/annotation/KotlinAutowiredTests.kt b/spring-beans/src/test/kotlin/org/springframework/beans/factory/annotation/KotlinAutowiredTests.kt index a254900fa36..81c910b2b15 100644 --- a/spring-beans/src/test/kotlin/org/springframework/beans/factory/annotation/KotlinAutowiredTests.kt +++ b/spring-beans/src/test/kotlin/org/springframework/beans/factory/annotation/KotlinAutowiredTests.kt @@ -22,8 +22,8 @@ import org.junit.jupiter.api.Test import org.springframework.beans.factory.BeanCreationException import org.springframework.beans.factory.support.DefaultListableBeanFactory import org.springframework.beans.factory.support.RootBeanDefinition -import org.springframework.tests.sample.beans.Colour -import org.springframework.tests.sample.beans.TestBean +import org.springframework.beans.test.fixtures.beans.Colour +import org.springframework.beans.test.fixtures.beans.TestBean /** * Tests for Kotlin support with [Autowired]. diff --git a/spring-beans/src/test/resources/org/springframework/beans/factory/BeanFactoryUtilsTests-leaf.xml b/spring-beans/src/test/resources/org/springframework/beans/factory/BeanFactoryUtilsTests-leaf.xml index e9abc664d66..08e3ff9ab39 100644 --- a/spring-beans/src/test/resources/org/springframework/beans/factory/BeanFactoryUtilsTests-leaf.xml +++ b/spring-beans/src/test/resources/org/springframework/beans/factory/BeanFactoryUtilsTests-leaf.xml @@ -3,7 +3,7 @@ - + custom 25 diff --git a/spring-beans/src/test/resources/org/springframework/beans/factory/BeanFactoryUtilsTests-middle.xml b/spring-beans/src/test/resources/org/springframework/beans/factory/BeanFactoryUtilsTests-middle.xml index 4807313fed6..29fdf9a8725 100644 --- a/spring-beans/src/test/resources/org/springframework/beans/factory/BeanFactoryUtilsTests-middle.xml +++ b/spring-beans/src/test/resources/org/springframework/beans/factory/BeanFactoryUtilsTests-middle.xml @@ -4,7 +4,7 @@ - + custom 666 @@ -13,7 +13,7 @@ Check that invoker is automatically added to wrap target. Non pointcut bean name should be wrapped in invoker. --> - + diff --git a/spring-beans/src/test/resources/org/springframework/beans/factory/BeanFactoryUtilsTests-root.xml b/spring-beans/src/test/resources/org/springframework/beans/factory/BeanFactoryUtilsTests-root.xml index 26560b27fb4..75ee49e0ee7 100644 --- a/spring-beans/src/test/resources/org/springframework/beans/factory/BeanFactoryUtilsTests-root.xml +++ b/spring-beans/src/test/resources/org/springframework/beans/factory/BeanFactoryUtilsTests-root.xml @@ -6,21 +6,21 @@ - + - + - + - + custom 25 - + - + false diff --git a/spring-beans/src/test/resources/org/springframework/beans/factory/config/FieldRetrievingFactoryBeanTests-context.xml b/spring-beans/src/test/resources/org/springframework/beans/factory/config/FieldRetrievingFactoryBeanTests-context.xml index c14569c7fa5..7cb6892b03d 100644 --- a/spring-beans/src/test/resources/org/springframework/beans/factory/config/FieldRetrievingFactoryBeanTests-context.xml +++ b/spring-beans/src/test/resources/org/springframework/beans/factory/config/FieldRetrievingFactoryBeanTests-context.xml @@ -3,7 +3,7 @@ - + diff --git a/spring-beans/src/test/resources/org/springframework/beans/factory/config/PropertyPathFactoryBeanTests-context.xml b/spring-beans/src/test/resources/org/springframework/beans/factory/config/PropertyPathFactoryBeanTests-context.xml index dbcea8f953b..9b1e2953138 100644 --- a/spring-beans/src/test/resources/org/springframework/beans/factory/config/PropertyPathFactoryBeanTests-context.xml +++ b/spring-beans/src/test/resources/org/springframework/beans/factory/config/PropertyPathFactoryBeanTests-context.xml @@ -3,19 +3,19 @@ - + 10 - + 11 - + 98 - + 99 @@ -23,7 +23,7 @@ - + 12 @@ -46,10 +46,10 @@ tb spouse - org.springframework.tests.sample.beans.TestBean + org.springframework.beans.test.fixtures.beans.TestBean - + @@ -59,11 +59,11 @@ - + - + diff --git a/spring-beans/src/test/resources/org/springframework/beans/factory/config/SimpleScopeTests-context.xml b/spring-beans/src/test/resources/org/springframework/beans/factory/config/SimpleScopeTests-context.xml index 5a180e70138..22cfc5d272b 100644 --- a/spring-beans/src/test/resources/org/springframework/beans/factory/config/SimpleScopeTests-context.xml +++ b/spring-beans/src/test/resources/org/springframework/beans/factory/config/SimpleScopeTests-context.xml @@ -3,6 +3,6 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans-2.0.xsd"> - + diff --git a/spring-beans/src/test/resources/org/springframework/beans/factory/parsing/CustomProblemReporterTests-context.xml b/spring-beans/src/test/resources/org/springframework/beans/factory/parsing/CustomProblemReporterTests-context.xml index 12b09682043..b1c5df805a9 100644 --- a/spring-beans/src/test/resources/org/springframework/beans/factory/parsing/CustomProblemReporterTests-context.xml +++ b/spring-beans/src/test/resources/org/springframework/beans/factory/parsing/CustomProblemReporterTests-context.xml @@ -6,7 +6,7 @@ - + @@ -14,9 +14,9 @@ - + - + @@ -26,5 +26,6 @@ - + + \ No newline at end of file diff --git a/spring-beans/src/test/resources/org/springframework/beans/factory/support/genericBeanTests.xml b/spring-beans/src/test/resources/org/springframework/beans/factory/support/genericBeanTests.xml index c8a0ab7549d..37f949c079b 100644 --- a/spring-beans/src/test/resources/org/springframework/beans/factory/support/genericBeanTests.xml +++ b/spring-beans/src/test/resources/org/springframework/beans/factory/support/genericBeanTests.xml @@ -3,7 +3,7 @@ - + @@ -43,7 +43,7 @@ autowire="constructor"> - + @@ -53,7 +53,7 @@ - + diff --git a/spring-beans/src/test/resources/org/springframework/beans/factory/support/lookupMethodTests.xml b/spring-beans/src/test/resources/org/springframework/beans/factory/support/lookupMethodTests.xml index 1334415c746..2fb5d2204f5 100644 --- a/spring-beans/src/test/resources/org/springframework/beans/factory/support/lookupMethodTests.xml +++ b/spring-beans/src/test/resources/org/springframework/beans/factory/support/lookupMethodTests.xml @@ -13,9 +13,9 @@ - + - + diff --git a/spring-beans/src/test/resources/org/springframework/beans/factory/support/multiConstructorArgs.properties b/spring-beans/src/test/resources/org/springframework/beans/factory/support/multiConstructorArgs.properties index 8d5f74fc31a..529c97ce9e1 100644 --- a/spring-beans/src/test/resources/org/springframework/beans/factory/support/multiConstructorArgs.properties +++ b/spring-beans/src/test/resources/org/springframework/beans/factory/support/multiConstructorArgs.properties @@ -1,3 +1,3 @@ -testBean.(class)=org.springframework.tests.sample.beans.TestBean +testBean.(class)=org.springframework.beans.test.fixtures.beans.TestBean testBean.$0=Rob Harrop testBean.$1=23 diff --git a/spring-beans/src/test/resources/org/springframework/beans/factory/support/refConstructorArg.properties b/spring-beans/src/test/resources/org/springframework/beans/factory/support/refConstructorArg.properties index 4d3723c7de8..ff4aff4552e 100644 --- a/spring-beans/src/test/resources/org/springframework/beans/factory/support/refConstructorArg.properties +++ b/spring-beans/src/test/resources/org/springframework/beans/factory/support/refConstructorArg.properties @@ -1,5 +1,5 @@ -sally.(class)=org.springframework.tests.sample.beans.TestBean +sally.(class)=org.springframework.beans.test.fixtures.beans.TestBean sally.name=Sally -rob.(class)=org.springframework.tests.sample.beans.TestBean +rob.(class)=org.springframework.beans.test.fixtures.beans.TestBean rob.$0(ref)=sally diff --git a/spring-beans/src/test/resources/org/springframework/beans/factory/support/simpleConstructorArg.properties b/spring-beans/src/test/resources/org/springframework/beans/factory/support/simpleConstructorArg.properties index d0f1eea3266..8d4246bba2b 100644 --- a/spring-beans/src/test/resources/org/springframework/beans/factory/support/simpleConstructorArg.properties +++ b/spring-beans/src/test/resources/org/springframework/beans/factory/support/simpleConstructorArg.properties @@ -1,2 +1,2 @@ -testBean.(class)=org.springframework.tests.sample.beans.TestBean +testBean.(class)=org.springframework.beans.test.fixtures.beans.TestBean testBean.$0=Rob Harrop diff --git a/spring-beans/src/test/resources/org/springframework/beans/factory/xml/DuplicateBeanIdTests-multiLevel-context.xml b/spring-beans/src/test/resources/org/springframework/beans/factory/xml/DuplicateBeanIdTests-multiLevel-context.xml index f5f975bf7b5..ee803599bb6 100644 --- a/spring-beans/src/test/resources/org/springframework/beans/factory/xml/DuplicateBeanIdTests-multiLevel-context.xml +++ b/spring-beans/src/test/resources/org/springframework/beans/factory/xml/DuplicateBeanIdTests-multiLevel-context.xml @@ -4,12 +4,12 @@ xsi:schemaLocation="http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans-3.1.xsd"> - + - + diff --git a/spring-beans/src/test/resources/org/springframework/beans/factory/xml/DuplicateBeanIdTests-sameLevel-context.xml b/spring-beans/src/test/resources/org/springframework/beans/factory/xml/DuplicateBeanIdTests-sameLevel-context.xml index 7bd11a98717..58e3415afc8 100644 --- a/spring-beans/src/test/resources/org/springframework/beans/factory/xml/DuplicateBeanIdTests-sameLevel-context.xml +++ b/spring-beans/src/test/resources/org/springframework/beans/factory/xml/DuplicateBeanIdTests-sameLevel-context.xml @@ -4,12 +4,12 @@ xsi:schemaLocation="http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans-3.1.xsd"> - + - + diff --git a/spring-beans/src/test/resources/org/springframework/beans/factory/xml/NestedBeansElementAttributeRecursionTests-merge-context.xml b/spring-beans/src/test/resources/org/springframework/beans/factory/xml/NestedBeansElementAttributeRecursionTests-merge-context.xml index 55a5cf04e7f..10015b0fc0d 100644 --- a/spring-beans/src/test/resources/org/springframework/beans/factory/xml/NestedBeansElementAttributeRecursionTests-merge-context.xml +++ b/spring-beans/src/test/resources/org/springframework/beans/factory/xml/NestedBeansElementAttributeRecursionTests-merge-context.xml @@ -5,7 +5,7 @@ https://www.springframework.org/schema/beans/spring-beans-3.1.xsd" default-merge="false"> - + alpha diff --git a/spring-beans/src/test/resources/org/springframework/beans/factory/xml/autowire-constructor-with-exclusion.xml b/spring-beans/src/test/resources/org/springframework/beans/factory/xml/autowire-constructor-with-exclusion.xml index 0b67be5d874..8f5f1b01b1e 100644 --- a/spring-beans/src/test/resources/org/springframework/beans/factory/xml/autowire-constructor-with-exclusion.xml +++ b/spring-beans/src/test/resources/org/springframework/beans/factory/xml/autowire-constructor-with-exclusion.xml @@ -3,9 +3,9 @@ - + - + diff --git a/spring-beans/src/test/resources/org/springframework/beans/factory/xml/autowire-with-exclusion.xml b/spring-beans/src/test/resources/org/springframework/beans/factory/xml/autowire-with-exclusion.xml index 37a98d0ce81..26651d8bbbe 100644 --- a/spring-beans/src/test/resources/org/springframework/beans/factory/xml/autowire-with-exclusion.xml +++ b/spring-beans/src/test/resources/org/springframework/beans/factory/xml/autowire-with-exclusion.xml @@ -3,9 +3,9 @@ - + - + diff --git a/spring-beans/src/test/resources/org/springframework/beans/factory/xml/autowire-with-inclusion.xml b/spring-beans/src/test/resources/org/springframework/beans/factory/xml/autowire-with-inclusion.xml index b47d4231ce0..0b9bb1ceb03 100644 --- a/spring-beans/src/test/resources/org/springframework/beans/factory/xml/autowire-with-inclusion.xml +++ b/spring-beans/src/test/resources/org/springframework/beans/factory/xml/autowire-with-inclusion.xml @@ -4,9 +4,9 @@ xsi:schemaLocation="http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans-2.5.xsd" default-autowire-candidates=""> - + - + diff --git a/spring-beans/src/test/resources/org/springframework/beans/factory/xml/autowire-with-selective-inclusion.xml b/spring-beans/src/test/resources/org/springframework/beans/factory/xml/autowire-with-selective-inclusion.xml index 5df4f9c21dc..d23d1888d21 100644 --- a/spring-beans/src/test/resources/org/springframework/beans/factory/xml/autowire-with-selective-inclusion.xml +++ b/spring-beans/src/test/resources/org/springframework/beans/factory/xml/autowire-with-selective-inclusion.xml @@ -4,9 +4,9 @@ xsi:schemaLocation="http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans-2.5.xsd" default-autowire-candidates="props*,*ly"> - + - + diff --git a/spring-beans/src/test/resources/org/springframework/beans/factory/xml/beanEvents.xml b/spring-beans/src/test/resources/org/springframework/beans/factory/xml/beanEvents.xml index 9b019ee2ff2..7a5640559d3 100644 --- a/spring-beans/src/test/resources/org/springframework/beans/factory/xml/beanEvents.xml +++ b/spring-beans/src/test/resources/org/springframework/beans/factory/xml/beanEvents.xml @@ -10,22 +10,22 @@ - + - + - + - + diff --git a/spring-beans/src/test/resources/org/springframework/beans/factory/xml/collectionMerging.xml b/spring-beans/src/test/resources/org/springframework/beans/factory/xml/collectionMerging.xml index b3a6142b54f..9243ec32bc4 100644 --- a/spring-beans/src/test/resources/org/springframework/beans/factory/xml/collectionMerging.xml +++ b/spring-beans/src/test/resources/org/springframework/beans/factory/xml/collectionMerging.xml @@ -3,7 +3,7 @@ - + Rob Harrop @@ -23,12 +23,12 @@ - + - + Rob Harrop @@ -47,14 +47,14 @@ - + - + @@ -76,7 +76,7 @@ - + @@ -84,7 +84,7 @@ - + Sall @@ -103,7 +103,7 @@ - + Rob Harrop @@ -123,12 +123,12 @@ - + - + Rob Harrop @@ -147,14 +147,14 @@ - + - + @@ -176,7 +176,7 @@ - + @@ -184,7 +184,7 @@ - + Sall diff --git a/spring-beans/src/test/resources/org/springframework/beans/factory/xml/collections.xml b/spring-beans/src/test/resources/org/springframework/beans/factory/xml/collections.xml index 0f2fff8c9b9..d245ac3afc3 100644 --- a/spring-beans/src/test/resources/org/springframework/beans/factory/xml/collections.xml +++ b/spring-beans/src/test/resources/org/springframework/beans/factory/xml/collections.xml @@ -3,7 +3,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans-3.2.xsd"> - + Jenny 30 @@ -12,7 +12,7 @@ - + Simple bean, without any collections. @@ -23,7 +23,7 @@ 27 - + Rod 32 @@ -35,7 +35,7 @@ - + Jenny 30 @@ -43,13 +43,13 @@ - + David 27 - + Rod 32 @@ -63,7 +63,7 @@ - + loner 26 @@ -101,26 +101,26 @@ - + verbose - + - + - + - + @@ -130,7 +130,7 @@ - + @@ -157,7 +157,7 @@ - + @@ -176,7 +176,7 @@ - + @@ -185,7 +185,7 @@ - + @@ -217,14 +217,14 @@ - + - + bar @@ -234,7 +234,7 @@ - + bar @@ -244,7 +244,7 @@ - + @@ -253,7 +253,7 @@ - + @@ -261,7 +261,7 @@ - + bar @@ -270,7 +270,7 @@ - + @@ -279,7 +279,7 @@ - + one @@ -288,7 +288,7 @@ - + 0 @@ -298,11 +298,11 @@ - + - + diff --git a/spring-beans/src/test/resources/org/springframework/beans/factory/xml/collectionsWithDefaultTypes.xml b/spring-beans/src/test/resources/org/springframework/beans/factory/xml/collectionsWithDefaultTypes.xml index 92d5d3db1db..e68a24410a7 100644 --- a/spring-beans/src/test/resources/org/springframework/beans/factory/xml/collectionsWithDefaultTypes.xml +++ b/spring-beans/src/test/resources/org/springframework/beans/factory/xml/collectionsWithDefaultTypes.xml @@ -3,7 +3,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans-3.0.xsd"> - + 1 @@ -28,7 +28,7 @@ - + diff --git a/spring-beans/src/test/resources/org/springframework/beans/factory/xml/factory-methods.xml b/spring-beans/src/test/resources/org/springframework/beans/factory/xml/factory-methods.xml index 86d94732956..d9ba0aaeba6 100644 --- a/spring-beans/src/test/resources/org/springframework/beans/factory/xml/factory-methods.xml +++ b/spring-beans/src/test/resources/org/springframework/beans/factory/xml/factory-methods.xml @@ -107,7 +107,7 @@ - + Juergen @@ -130,7 +130,7 @@ - + diff --git a/spring-beans/src/test/resources/org/springframework/beans/factory/xml/schemaValidated.xml b/spring-beans/src/test/resources/org/springframework/beans/factory/xml/schemaValidated.xml index 5f22ea3cef4..5fc58aa6093 100644 --- a/spring-beans/src/test/resources/org/springframework/beans/factory/xml/schemaValidated.xml +++ b/spring-beans/src/test/resources/org/springframework/beans/factory/xml/schemaValidated.xml @@ -3,16 +3,16 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans-2.0.xsd"> - + - + - + - - + + diff --git a/spring-beans/src/test/resources/org/springframework/beans/factory/xml/simpleConstructorNamespaceHandlerTests.xml b/spring-beans/src/test/resources/org/springframework/beans/factory/xml/simpleConstructorNamespaceHandlerTests.xml index 0c6b70e59ac..eab699ae5f6 100644 --- a/spring-beans/src/test/resources/org/springframework/beans/factory/xml/simpleConstructorNamespaceHandlerTests.xml +++ b/spring-beans/src/test/resources/org/springframework/beans/factory/xml/simpleConstructorNamespaceHandlerTests.xml @@ -5,43 +5,43 @@ xsi:schemaLocation="http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd"> - + - + - + - + - + - + - + \ No newline at end of file diff --git a/spring-beans/src/test/resources/org/springframework/beans/factory/xml/simpleConstructorNamespaceHandlerTestsWithErrors.xml b/spring-beans/src/test/resources/org/springframework/beans/factory/xml/simpleConstructorNamespaceHandlerTestsWithErrors.xml index 932492e9d14..037baf8b093 100644 --- a/spring-beans/src/test/resources/org/springframework/beans/factory/xml/simpleConstructorNamespaceHandlerTestsWithErrors.xml +++ b/spring-beans/src/test/resources/org/springframework/beans/factory/xml/simpleConstructorNamespaceHandlerTestsWithErrors.xml @@ -3,7 +3,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd"> - + diff --git a/spring-beans/src/test/resources/org/springframework/beans/factory/xml/simplePropertyNamespaceHandlerTests.xml b/spring-beans/src/test/resources/org/springframework/beans/factory/xml/simplePropertyNamespaceHandlerTests.xml index 7b62d39e279..82954f02b3a 100644 --- a/spring-beans/src/test/resources/org/springframework/beans/factory/xml/simplePropertyNamespaceHandlerTests.xml +++ b/spring-beans/src/test/resources/org/springframework/beans/factory/xml/simplePropertyNamespaceHandlerTests.xml @@ -4,20 +4,20 @@ xmlns:p="http://www.springframework.org/schema/p" xsi:schemaLocation="http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd"> - + - + - + - + - + diff --git a/spring-beans/src/test/resources/org/springframework/beans/factory/xml/simplePropertyNamespaceHandlerTestsWithErrors.xml b/spring-beans/src/test/resources/org/springframework/beans/factory/xml/simplePropertyNamespaceHandlerTestsWithErrors.xml index c0335508acc..a761f9e86a8 100644 --- a/spring-beans/src/test/resources/org/springframework/beans/factory/xml/simplePropertyNamespaceHandlerTestsWithErrors.xml +++ b/spring-beans/src/test/resources/org/springframework/beans/factory/xml/simplePropertyNamespaceHandlerTestsWithErrors.xml @@ -4,10 +4,10 @@ xmlns:p="http://www.springframework.org/schema/p" xsi:schemaLocation="http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd"> - + - + diff --git a/spring-beans/src/test/resources/org/springframework/beans/factory/xml/test.xml b/spring-beans/src/test/resources/org/springframework/beans/factory/xml/test.xml index 3a0b944bef3..d1bf8660539 100644 --- a/spring-beans/src/test/resources/org/springframework/beans/factory/xml/test.xml +++ b/spring-beans/src/test/resources/org/springframework/beans/factory/xml/test.xml @@ -3,7 +3,7 @@ - + I have no properties and I'm happy without them. @@ -12,7 +12,7 @@ - + aliased @@ -20,17 +20,17 @@ - + aliased - + aliased - + @@ -40,7 +40,7 @@ - + Rod 31 @@ -52,29 +52,29 @@ - + Kerry 34 - + Kathy 28 - + typeMismatch 34x - + - true @@ -85,10 +85,10 @@ - + - + false @@ -113,14 +113,14 @@ - + listenerVeto 66 - + - + this is a ]]> diff --git a/spring-beans/src/test/resources/org/springframework/beans/factory/xml/testUtilNamespace.xml b/spring-beans/src/test/resources/org/springframework/beans/factory/xml/testUtilNamespace.xml index b2bad9b4c51..47bce335d18 100644 --- a/spring-beans/src/test/resources/org/springframework/beans/factory/xml/testUtilNamespace.xml +++ b/spring-beans/src/test/resources/org/springframework/beans/factory/xml/testUtilNamespace.xml @@ -17,7 +17,7 @@ name "/> - + @@ -26,13 +26,13 @@ - + - + @@ -50,7 +50,7 @@ + key-type="java.lang.String" value-type="org.springframework.beans.test.fixtures.beans.TestBean"> @@ -72,7 +72,7 @@ Rob Harrop - + foo @@ -94,13 +94,13 @@ - + - + @@ -116,13 +116,13 @@ min - + - + @@ -152,7 +152,7 @@ - + diff --git a/spring-beans/src/test/resources/org/springframework/beans/factory/xml/validateWithDtd.xml b/spring-beans/src/test/resources/org/springframework/beans/factory/xml/validateWithDtd.xml index a872ae9d23d..f58440bfa42 100644 --- a/spring-beans/src/test/resources/org/springframework/beans/factory/xml/validateWithDtd.xml +++ b/spring-beans/src/test/resources/org/springframework/beans/factory/xml/validateWithDtd.xml @@ -9,5 +9,5 @@ This is a top level block comment - + \ No newline at end of file diff --git a/spring-beans/src/test/resources/org/springframework/beans/factory/xml/validateWithXsd.xml b/spring-beans/src/test/resources/org/springframework/beans/factory/xml/validateWithXsd.xml index c7e8abe5a55..61598070814 100644 --- a/spring-beans/src/test/resources/org/springframework/beans/factory/xml/validateWithXsd.xml +++ b/spring-beans/src/test/resources/org/springframework/beans/factory/xml/validateWithXsd.xml @@ -7,5 +7,5 @@ This is a top level block comment the parser now --> - + \ No newline at end of file diff --git a/spring-beans/src/test/resources/org/springframework/beans/factory/xml/withMeta.xml b/spring-beans/src/test/resources/org/springframework/beans/factory/xml/withMeta.xml index 5126d253957..4148dffe92a 100644 --- a/spring-beans/src/test/resources/org/springframework/beans/factory/xml/withMeta.xml +++ b/spring-beans/src/test/resources/org/springframework/beans/factory/xml/withMeta.xml @@ -4,15 +4,15 @@ xmlns:spring="http://www.springframework.org/schema/beans" xsi:schemaLocation="http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans-2.5.xsd"> - + - + - + diff --git a/spring-beans/src/test/java/org/springframework/tests/sample/beans/AgeHolder.java b/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/AgeHolder.java similarity index 93% rename from spring-beans/src/test/java/org/springframework/tests/sample/beans/AgeHolder.java rename to spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/AgeHolder.java index adced8acea9..e48d4ff7250 100644 --- a/spring-beans/src/test/java/org/springframework/tests/sample/beans/AgeHolder.java +++ b/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/AgeHolder.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.tests.sample.beans; +package org.springframework.beans.test.fixtures.beans; public interface AgeHolder { diff --git a/spring-beans/src/test/java/org/springframework/tests/sample/beans/AnnotatedBean.java b/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/AnnotatedBean.java similarity index 92% rename from spring-beans/src/test/java/org/springframework/tests/sample/beans/AnnotatedBean.java rename to spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/AnnotatedBean.java index 6b4e063563b..9a071690a35 100644 --- a/spring-beans/src/test/java/org/springframework/tests/sample/beans/AnnotatedBean.java +++ b/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/AnnotatedBean.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.tests.sample.beans; +package org.springframework.beans.test.fixtures.beans; /** * @author Stephane Nicoll diff --git a/spring-beans/src/test/java/org/springframework/tests/sample/beans/BooleanTestBean.java b/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/BooleanTestBean.java similarity index 94% rename from spring-beans/src/test/java/org/springframework/tests/sample/beans/BooleanTestBean.java rename to spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/BooleanTestBean.java index bf6105ca55f..52375b01138 100644 --- a/spring-beans/src/test/java/org/springframework/tests/sample/beans/BooleanTestBean.java +++ b/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/BooleanTestBean.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.tests.sample.beans; +package org.springframework.beans.test.fixtures.beans; /** * @author Juergen Hoeller diff --git a/spring-beans/src/test/java/org/springframework/tests/beans/CollectingReaderEventListener.java b/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/CollectingReaderEventListener.java similarity index 98% rename from spring-beans/src/test/java/org/springframework/tests/beans/CollectingReaderEventListener.java rename to spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/CollectingReaderEventListener.java index c46e59c3665..2145e26679f 100644 --- a/spring-beans/src/test/java/org/springframework/tests/beans/CollectingReaderEventListener.java +++ b/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/CollectingReaderEventListener.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.tests.beans; +package org.springframework.beans.test.fixtures.beans; import java.util.ArrayList; import java.util.Collection; diff --git a/spring-beans/src/test/java/org/springframework/tests/sample/beans/Colour.java b/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/Colour.java similarity index 95% rename from spring-beans/src/test/java/org/springframework/tests/sample/beans/Colour.java rename to spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/Colour.java index a1910a9dfa4..011dbf0edb3 100644 --- a/spring-beans/src/test/java/org/springframework/tests/sample/beans/Colour.java +++ b/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/Colour.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.tests.sample.beans; +package org.springframework.beans.test.fixtures.beans; /** * @author Rob Harrop diff --git a/spring-beans/src/test/java/org/springframework/tests/sample/beans/CountingTestBean.java b/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/CountingTestBean.java similarity index 93% rename from spring-beans/src/test/java/org/springframework/tests/sample/beans/CountingTestBean.java rename to spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/CountingTestBean.java index 74faeba68b8..892f71d5305 100644 --- a/spring-beans/src/test/java/org/springframework/tests/sample/beans/CountingTestBean.java +++ b/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/CountingTestBean.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.tests.sample.beans; +package org.springframework.beans.test.fixtures.beans; /** diff --git a/spring-beans/src/test/java/org/springframework/tests/sample/beans/CustomEnum.java b/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/CustomEnum.java similarity index 93% rename from spring-beans/src/test/java/org/springframework/tests/sample/beans/CustomEnum.java rename to spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/CustomEnum.java index dec612088da..5bb56eaf26f 100644 --- a/spring-beans/src/test/java/org/springframework/tests/sample/beans/CustomEnum.java +++ b/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/CustomEnum.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.tests.sample.beans; +package org.springframework.beans.test.fixtures.beans; /** * @author Juergen Hoeller diff --git a/spring-beans/src/test/java/org/springframework/tests/sample/beans/DependenciesBean.java b/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/DependenciesBean.java similarity index 96% rename from spring-beans/src/test/java/org/springframework/tests/sample/beans/DependenciesBean.java rename to spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/DependenciesBean.java index 4f0e958c7f7..cb81eb3b169 100644 --- a/spring-beans/src/test/java/org/springframework/tests/sample/beans/DependenciesBean.java +++ b/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/DependenciesBean.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.tests.sample.beans; +package org.springframework.beans.test.fixtures.beans; import org.springframework.beans.factory.BeanFactory; import org.springframework.beans.factory.BeanFactoryAware; diff --git a/spring-beans/src/test/java/org/springframework/tests/sample/beans/DerivedTestBean.java b/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/DerivedTestBean.java similarity index 97% rename from spring-beans/src/test/java/org/springframework/tests/sample/beans/DerivedTestBean.java rename to spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/DerivedTestBean.java index 92c62dd5da8..6851deb9973 100644 --- a/spring-beans/src/test/java/org/springframework/tests/sample/beans/DerivedTestBean.java +++ b/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/DerivedTestBean.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.tests.sample.beans; +package org.springframework.beans.test.fixtures.beans; import java.io.Serializable; diff --git a/spring-beans/src/test/java/org/springframework/tests/sample/beans/DummyBean.java b/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/DummyBean.java similarity index 96% rename from spring-beans/src/test/java/org/springframework/tests/sample/beans/DummyBean.java rename to spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/DummyBean.java index cae1b399330..caa0a461b5b 100644 --- a/spring-beans/src/test/java/org/springframework/tests/sample/beans/DummyBean.java +++ b/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/DummyBean.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.springframework.tests.sample.beans; +package org.springframework.beans.test.fixtures.beans; /** * @author Costin Leau diff --git a/spring-beans/src/test/java/org/springframework/tests/sample/beans/DummyFactory.java b/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/DummyFactory.java similarity index 98% rename from spring-beans/src/test/java/org/springframework/tests/sample/beans/DummyFactory.java rename to spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/DummyFactory.java index 3939fc9372d..623884a8acc 100644 --- a/spring-beans/src/test/java/org/springframework/tests/sample/beans/DummyFactory.java +++ b/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/DummyFactory.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.tests.sample.beans; +package org.springframework.beans.test.fixtures.beans; import org.springframework.beans.BeansException; import org.springframework.beans.factory.BeanFactory; diff --git a/spring-context/src/test/java/org/springframework/tests/sample/beans/Employee.java b/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/Employee.java similarity index 88% rename from spring-context/src/test/java/org/springframework/tests/sample/beans/Employee.java rename to spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/Employee.java index 86c3eedb19d..eaf350ed1e3 100644 --- a/spring-context/src/test/java/org/springframework/tests/sample/beans/Employee.java +++ b/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/Employee.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2016 the original author or authors. + * Copyright 2002-2019 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. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.tests.sample.beans; +package org.springframework.beans.test.fixtures.beans; public class Employee extends TestBean { diff --git a/spring-beans/src/test/java/org/springframework/tests/sample/beans/GenericBean.java b/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/GenericBean.java similarity index 99% rename from spring-beans/src/test/java/org/springframework/tests/sample/beans/GenericBean.java rename to spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/GenericBean.java index 26b536b7866..6946e890f8f 100644 --- a/spring-beans/src/test/java/org/springframework/tests/sample/beans/GenericBean.java +++ b/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/GenericBean.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.tests.sample.beans; +package org.springframework.beans.test.fixtures.beans; import java.util.ArrayList; import java.util.Collection; diff --git a/spring-beans/src/test/java/org/springframework/tests/sample/beans/GenericIntegerBean.java b/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/GenericIntegerBean.java similarity index 92% rename from spring-beans/src/test/java/org/springframework/tests/sample/beans/GenericIntegerBean.java rename to spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/GenericIntegerBean.java index 398ca1e06cd..375d57fac97 100644 --- a/spring-beans/src/test/java/org/springframework/tests/sample/beans/GenericIntegerBean.java +++ b/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/GenericIntegerBean.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.tests.sample.beans; +package org.springframework.beans.test.fixtures.beans; /** diff --git a/spring-beans/src/test/java/org/springframework/tests/sample/beans/GenericSetOfIntegerBean.java b/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/GenericSetOfIntegerBean.java similarity index 93% rename from spring-beans/src/test/java/org/springframework/tests/sample/beans/GenericSetOfIntegerBean.java rename to spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/GenericSetOfIntegerBean.java index cbd0a043a6b..d39f9078b79 100644 --- a/spring-beans/src/test/java/org/springframework/tests/sample/beans/GenericSetOfIntegerBean.java +++ b/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/GenericSetOfIntegerBean.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.tests.sample.beans; +package org.springframework.beans.test.fixtures.beans; import java.util.Set; diff --git a/spring-beans/src/test/java/org/springframework/tests/sample/beans/HasMap.java b/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/HasMap.java similarity index 97% rename from spring-beans/src/test/java/org/springframework/tests/sample/beans/HasMap.java rename to spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/HasMap.java index 29359e4c558..02cf25b1ca8 100644 --- a/spring-beans/src/test/java/org/springframework/tests/sample/beans/HasMap.java +++ b/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/HasMap.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.tests.sample.beans; +package org.springframework.beans.test.fixtures.beans; import java.util.IdentityHashMap; import java.util.List; diff --git a/spring-beans/src/test/java/org/springframework/tests/sample/beans/INestedTestBean.java b/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/INestedTestBean.java similarity index 92% rename from spring-beans/src/test/java/org/springframework/tests/sample/beans/INestedTestBean.java rename to spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/INestedTestBean.java index adf4f46168f..ab83dd23224 100644 --- a/spring-beans/src/test/java/org/springframework/tests/sample/beans/INestedTestBean.java +++ b/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/INestedTestBean.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.tests.sample.beans; +package org.springframework.beans.test.fixtures.beans; public interface INestedTestBean { diff --git a/spring-beans/src/test/java/org/springframework/tests/sample/beans/IOther.java b/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/IOther.java similarity index 92% rename from spring-beans/src/test/java/org/springframework/tests/sample/beans/IOther.java rename to spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/IOther.java index f674ff7bb71..36d287fc9aa 100644 --- a/spring-beans/src/test/java/org/springframework/tests/sample/beans/IOther.java +++ b/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/IOther.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.tests.sample.beans; +package org.springframework.beans.test.fixtures.beans; public interface IOther { diff --git a/spring-beans/src/test/java/org/springframework/tests/sample/beans/ITestBean.java b/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/ITestBean.java similarity index 92% rename from spring-beans/src/test/java/org/springframework/tests/sample/beans/ITestBean.java rename to spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/ITestBean.java index 1fe055dac0b..9572e1265e0 100644 --- a/spring-beans/src/test/java/org/springframework/tests/sample/beans/ITestBean.java +++ b/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/ITestBean.java @@ -14,12 +14,12 @@ * limitations under the License. */ -package org.springframework.tests.sample.beans; +package org.springframework.beans.test.fixtures.beans; import java.io.IOException; /** - * Interface used for {@link org.springframework.tests.sample.beans.TestBean}. + * Interface used for {@link org.springframework.beans.test.fixtures.beans.TestBean}. * *

Two methods are the same as on Person, but if this * extends person it breaks quite a few tests.. diff --git a/spring-beans/src/test/java/org/springframework/tests/sample/beans/IndexedTestBean.java b/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/IndexedTestBean.java similarity index 98% rename from spring-beans/src/test/java/org/springframework/tests/sample/beans/IndexedTestBean.java rename to spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/IndexedTestBean.java index 2c8f85189fc..92de9d36780 100644 --- a/spring-beans/src/test/java/org/springframework/tests/sample/beans/IndexedTestBean.java +++ b/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/IndexedTestBean.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.tests.sample.beans; +package org.springframework.beans.test.fixtures.beans; import java.util.ArrayList; import java.util.Collection; diff --git a/spring-beans/src/test/java/org/springframework/tests/sample/beans/LifecycleBean.java b/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/LifecycleBean.java similarity index 98% rename from spring-beans/src/test/java/org/springframework/tests/sample/beans/LifecycleBean.java rename to spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/LifecycleBean.java index 67712dd7607..3a070b01e52 100644 --- a/spring-beans/src/test/java/org/springframework/tests/sample/beans/LifecycleBean.java +++ b/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/LifecycleBean.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.tests.sample.beans; +package org.springframework.beans.test.fixtures.beans; import org.springframework.beans.BeansException; import org.springframework.beans.factory.BeanFactory; diff --git a/spring-beans/src/test/java/org/springframework/tests/sample/beans/MustBeInitialized.java b/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/MustBeInitialized.java similarity index 96% rename from spring-beans/src/test/java/org/springframework/tests/sample/beans/MustBeInitialized.java rename to spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/MustBeInitialized.java index 2dde17d219f..39309643620 100644 --- a/spring-beans/src/test/java/org/springframework/tests/sample/beans/MustBeInitialized.java +++ b/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/MustBeInitialized.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.tests.sample.beans; +package org.springframework.beans.test.fixtures.beans; import org.springframework.beans.factory.InitializingBean; diff --git a/spring-beans/src/test/java/org/springframework/tests/sample/beans/NestedTestBean.java b/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/NestedTestBean.java similarity index 96% rename from spring-beans/src/test/java/org/springframework/tests/sample/beans/NestedTestBean.java rename to spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/NestedTestBean.java index 46e6a9110f6..179fa2a561d 100644 --- a/spring-beans/src/test/java/org/springframework/tests/sample/beans/NestedTestBean.java +++ b/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/NestedTestBean.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.tests.sample.beans; +package org.springframework.beans.test.fixtures.beans; /** * Simple nested test bean used for testing bean factories, AOP framework etc. diff --git a/spring-beans/src/test/java/org/springframework/tests/sample/beans/NumberTestBean.java b/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/NumberTestBean.java similarity index 97% rename from spring-beans/src/test/java/org/springframework/tests/sample/beans/NumberTestBean.java rename to spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/NumberTestBean.java index 08b1649d42a..e8874a2f92e 100644 --- a/spring-beans/src/test/java/org/springframework/tests/sample/beans/NumberTestBean.java +++ b/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/NumberTestBean.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.tests.sample.beans; +package org.springframework.beans.test.fixtures.beans; import java.math.BigDecimal; import java.math.BigInteger; diff --git a/spring-beans/src/test/java/org/springframework/tests/sample/beans/PackageLevelVisibleBean.java b/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/PackageLevelVisibleBean.java similarity index 93% rename from spring-beans/src/test/java/org/springframework/tests/sample/beans/PackageLevelVisibleBean.java rename to spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/PackageLevelVisibleBean.java index 1f446321132..1a7300325d8 100644 --- a/spring-beans/src/test/java/org/springframework/tests/sample/beans/PackageLevelVisibleBean.java +++ b/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/PackageLevelVisibleBean.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.tests.sample.beans; +package org.springframework.beans.test.fixtures.beans; /** * @see org.springframework.beans.factory.config.FieldRetrievingFactoryBeanTests diff --git a/spring-aop/src/test/java/org/springframework/tests/sample/beans/Person.java b/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/Person.java similarity index 94% rename from spring-aop/src/test/java/org/springframework/tests/sample/beans/Person.java rename to spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/Person.java index 1e9acb09646..37f5a55a9cb 100644 --- a/spring-aop/src/test/java/org/springframework/tests/sample/beans/Person.java +++ b/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/Person.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.tests.sample.beans; +package org.springframework.beans.test.fixtures.beans; /** * diff --git a/spring-beans/src/test/java/org/springframework/tests/sample/beans/Pet.java b/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/Pet.java similarity index 95% rename from spring-beans/src/test/java/org/springframework/tests/sample/beans/Pet.java rename to spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/Pet.java index 5e9040db0c0..44073a367c7 100644 --- a/spring-beans/src/test/java/org/springframework/tests/sample/beans/Pet.java +++ b/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/Pet.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.tests.sample.beans; +package org.springframework.beans.test.fixtures.beans; /** * @author Rob Harrop diff --git a/spring-aop/src/test/java/org/springframework/tests/sample/beans/SerializablePerson.java b/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/SerializablePerson.java similarity index 96% rename from spring-aop/src/test/java/org/springframework/tests/sample/beans/SerializablePerson.java rename to spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/SerializablePerson.java index 0496d09a968..e9d9398deff 100644 --- a/spring-aop/src/test/java/org/springframework/tests/sample/beans/SerializablePerson.java +++ b/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/SerializablePerson.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.tests.sample.beans; +package org.springframework.beans.test.fixtures.beans; import java.io.Serializable; diff --git a/spring-beans/src/test/java/org/springframework/tests/sample/beans/SideEffectBean.java b/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/SideEffectBean.java similarity index 94% rename from spring-beans/src/test/java/org/springframework/tests/sample/beans/SideEffectBean.java rename to spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/SideEffectBean.java index ac09e8d7642..cc1333610ed 100644 --- a/spring-beans/src/test/java/org/springframework/tests/sample/beans/SideEffectBean.java +++ b/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/SideEffectBean.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.tests.sample.beans; +package org.springframework.beans.test.fixtures.beans; /** * Bean that changes state on a business invocation, so that diff --git a/spring-beans/src/test/java/org/springframework/tests/sample/beans/TestAnnotation.java b/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/TestAnnotation.java similarity index 93% rename from spring-beans/src/test/java/org/springframework/tests/sample/beans/TestAnnotation.java rename to spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/TestAnnotation.java index ed1b8d52897..83090e6bb83 100644 --- a/spring-beans/src/test/java/org/springframework/tests/sample/beans/TestAnnotation.java +++ b/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/TestAnnotation.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.tests.sample.beans; +package org.springframework.beans.test.fixtures.beans; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; diff --git a/spring-beans/src/test/java/org/springframework/tests/sample/beans/TestBean.java b/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/TestBean.java similarity index 96% rename from spring-beans/src/test/java/org/springframework/tests/sample/beans/TestBean.java rename to spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/TestBean.java index 1e83a21a13c..9cd31e42f00 100644 --- a/spring-beans/src/test/java/org/springframework/tests/sample/beans/TestBean.java +++ b/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/TestBean.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.tests.sample.beans; +package org.springframework.beans.test.fixtures.beans; import java.io.IOException; import java.util.ArrayList; @@ -421,7 +421,7 @@ public class TestBean implements BeanNameAware, BeanFactoryAware, ITestBean, IOt /** - * @see org.springframework.tests.sample.beans.ITestBean#exceptional(Throwable) + * @see org.springframework.beans.test.fixtures.beans.ITestBean#exceptional(Throwable) */ @Override public void exceptional(Throwable t) throws Throwable { @@ -435,7 +435,7 @@ public class TestBean implements BeanNameAware, BeanFactoryAware, ITestBean, IOt throw new IOException(); } /** - * @see org.springframework.tests.sample.beans.ITestBean#returnsThis() + * @see org.springframework.beans.test.fixtures.beans.ITestBean#returnsThis() */ @Override public Object returnsThis() { @@ -443,7 +443,7 @@ public class TestBean implements BeanNameAware, BeanFactoryAware, ITestBean, IOt } /** - * @see org.springframework.tests.sample.beans.IOther#absquatulate() + * @see org.springframework.beans.test.fixtures.beans.IOther#absquatulate() */ @Override public void absquatulate() { diff --git a/spring-beans/src/test/java/org/springframework/tests/sample/beans/factory/DummyFactory.java b/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/factory/DummyFactory.java similarity index 97% rename from spring-beans/src/test/java/org/springframework/tests/sample/beans/factory/DummyFactory.java rename to spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/factory/DummyFactory.java index e707f05853d..ea27e526d17 100644 --- a/spring-beans/src/test/java/org/springframework/tests/sample/beans/factory/DummyFactory.java +++ b/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/factory/DummyFactory.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.tests.sample.beans.factory; +package org.springframework.beans.test.fixtures.beans.factory; import org.springframework.beans.BeansException; import org.springframework.beans.factory.BeanFactory; @@ -24,7 +24,7 @@ import org.springframework.beans.factory.DisposableBean; import org.springframework.beans.factory.FactoryBean; import org.springframework.beans.factory.InitializingBean; import org.springframework.beans.factory.config.AutowireCapableBeanFactory; -import org.springframework.tests.sample.beans.TestBean; +import org.springframework.beans.test.fixtures.beans.TestBean; /** * Simple factory to allow testing of FactoryBean support in AbstractBeanFactory. diff --git a/spring-beans/src/test/java/org/springframework/tests/sample/beans/package-info.java b/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/package-info.java similarity index 55% rename from spring-beans/src/test/java/org/springframework/tests/sample/beans/package-info.java rename to spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/package-info.java index 575bd1933f9..010c228ef82 100644 --- a/spring-beans/src/test/java/org/springframework/tests/sample/beans/package-info.java +++ b/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/package-info.java @@ -1,4 +1,4 @@ /** * General purpose sample beans that can be used with tests. */ -package org.springframework.tests.sample.beans; +package org.springframework.beans.test.fixtures.beans; diff --git a/spring-aop/src/test/java/org/springframework/tests/sample/beans/subpkg/DeepBean.java b/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/subpkg/DeepBean.java similarity index 74% rename from spring-aop/src/test/java/org/springframework/tests/sample/beans/subpkg/DeepBean.java rename to spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/subpkg/DeepBean.java index 41dd7e33b9c..fb5950c205c 100644 --- a/spring-aop/src/test/java/org/springframework/tests/sample/beans/subpkg/DeepBean.java +++ b/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/subpkg/DeepBean.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2012 the original author or authors. + * Copyright 2002-2019 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. @@ -14,14 +14,12 @@ * limitations under the License. */ -package org.springframework.tests.sample.beans.subpkg; - -import org.springframework.aop.aspectj.AspectJExpressionPointcutTests; +package org.springframework.beans.test.fixtures.beans.subpkg; /** * Used for testing pointcut matching. * - * @see AspectJExpressionPointcutTests#testWithinRootAndSubpackages() + * @see org.springframework.aop.aspectj.AspectJExpressionPointcutTests#testWithinRootAndSubpackages() * * @author Chris Beams */ diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/xml/AbstractBeanFactoryTests.java b/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/factory/xml/AbstractBeanFactoryTests.java similarity index 96% rename from spring-beans/src/test/java/org/springframework/beans/factory/xml/AbstractBeanFactoryTests.java rename to spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/factory/xml/AbstractBeanFactoryTests.java index 31c1984c35c..5695b05d4aa 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/xml/AbstractBeanFactoryTests.java +++ b/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/factory/xml/AbstractBeanFactoryTests.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.beans.factory.xml; +package org.springframework.beans.test.fixtures.factory.xml; import java.beans.PropertyEditorSupport; import java.util.StringTokenizer; @@ -29,10 +29,10 @@ import org.springframework.beans.factory.BeanIsNotAFactoryException; import org.springframework.beans.factory.BeanNotOfRequiredTypeException; import org.springframework.beans.factory.NoSuchBeanDefinitionException; import org.springframework.beans.factory.config.ConfigurableBeanFactory; -import org.springframework.tests.sample.beans.LifecycleBean; -import org.springframework.tests.sample.beans.MustBeInitialized; -import org.springframework.tests.sample.beans.TestBean; -import org.springframework.tests.sample.beans.factory.DummyFactory; +import org.springframework.beans.test.fixtures.beans.LifecycleBean; +import org.springframework.beans.test.fixtures.beans.MustBeInitialized; +import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.test.fixtures.beans.factory.DummyFactory; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/xml/AbstractListableBeanFactoryTests.java b/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/factory/xml/AbstractListableBeanFactoryTests.java similarity index 90% rename from spring-beans/src/test/java/org/springframework/beans/factory/xml/AbstractListableBeanFactoryTests.java rename to spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/factory/xml/AbstractListableBeanFactoryTests.java index dbae0ebed70..2d319fe47f1 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/xml/AbstractListableBeanFactoryTests.java +++ b/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/factory/xml/AbstractListableBeanFactoryTests.java @@ -14,14 +14,14 @@ * limitations under the License. */ -package org.springframework.beans.factory.xml; +package org.springframework.beans.test.fixtures.factory.xml; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.BeanFactory; import org.springframework.beans.factory.FactoryBean; import org.springframework.beans.factory.ListableBeanFactory; -import org.springframework.tests.sample.beans.TestBean; +import org.springframework.beans.test.fixtures.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; @@ -55,13 +55,13 @@ public abstract class AbstractListableBeanFactoryTests extends AbstractBeanFacto protected void assertTestBeanCount(int count) { String[] defNames = getListableBeanFactory().getBeanNamesForType(TestBean.class, true, false); - assertThat(defNames.length == count).as("We should have " + count + " beans for class org.springframework.tests.sample.beans.TestBean, not " + + assertThat(defNames.length == count).as("We should have " + count + " beans for class org.springframework.beans.test.fixtures.beans.TestBean, not " + defNames.length).isTrue(); int countIncludingFactoryBeans = count + 2; String[] names = getListableBeanFactory().getBeanNamesForType(TestBean.class, true, true); assertThat(names.length == countIncludingFactoryBeans).as("We should have " + countIncludingFactoryBeans + - " beans for class org.springframework.tests.sample.beans.TestBean, not " + names.length).isTrue(); + " beans for class org.springframework.beans.test.fixtures.beans.TestBean, not " + names.length).isTrue(); } @Test diff --git a/spring-context-support/spring-context-support.gradle b/spring-context-support/spring-context-support.gradle index f2fb5feedeb..be8fb24dfeb 100644 --- a/spring-context-support/spring-context-support.gradle +++ b/spring-context-support/spring-context-support.gradle @@ -15,6 +15,8 @@ dependencies { optional("org.codehaus.fabric3.api:commonj") optional("org.freemarker:freemarker") testCompile(project(":spring-context")) + testCompile(testFixtures(project(":spring-beans"))) + testCompile(testFixtures(project(":spring-context"))) testCompile(testFixtures(project(":spring-core"))) testCompile("org.hsqldb:hsqldb") testCompile("org.hibernate:hibernate-validator") diff --git a/spring-context-support/src/test/java/org/springframework/cache/caffeine/CaffeineCacheTests.java b/spring-context-support/src/test/java/org/springframework/cache/caffeine/CaffeineCacheTests.java index eae5f14bb44..07af88796fb 100644 --- a/spring-context-support/src/test/java/org/springframework/cache/caffeine/CaffeineCacheTests.java +++ b/spring-context-support/src/test/java/org/springframework/cache/caffeine/CaffeineCacheTests.java @@ -20,8 +20,8 @@ import com.github.benmanes.caffeine.cache.Caffeine; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; -import org.springframework.cache.AbstractValueAdaptingCacheTests; import org.springframework.cache.Cache; +import org.springframework.context.test.fixtures.cache.AbstractValueAdaptingCacheTests; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-context-support/src/test/java/org/springframework/cache/ehcache/EhCacheCacheTests.java b/spring-context-support/src/test/java/org/springframework/cache/ehcache/EhCacheCacheTests.java index b35768a7bf9..e5a548cacd2 100644 --- a/spring-context-support/src/test/java/org/springframework/cache/ehcache/EhCacheCacheTests.java +++ b/spring-context-support/src/test/java/org/springframework/cache/ehcache/EhCacheCacheTests.java @@ -25,7 +25,7 @@ import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; -import org.springframework.cache.AbstractCacheTests; +import org.springframework.context.test.fixtures.cache.AbstractCacheTests; import org.springframework.core.test.fixtures.EnabledForTestGroups; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-context-support/src/test/java/org/springframework/cache/jcache/JCacheEhCacheAnnotationTests.java b/spring-context-support/src/test/java/org/springframework/cache/jcache/JCacheEhCacheAnnotationTests.java index 1c003185417..bb7741478f1 100644 --- a/spring-context-support/src/test/java/org/springframework/cache/jcache/JCacheEhCacheAnnotationTests.java +++ b/spring-context-support/src/test/java/org/springframework/cache/jcache/JCacheEhCacheAnnotationTests.java @@ -28,17 +28,17 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.cache.annotation.CachingConfigurerSupport; import org.springframework.cache.annotation.EnableCaching; -import org.springframework.cache.config.AbstractCacheAnnotationTests; -import org.springframework.cache.config.AnnotatedClassCacheableService; -import org.springframework.cache.config.CacheableService; -import org.springframework.cache.config.DefaultCacheableService; -import org.springframework.cache.config.SomeCustomKeyGenerator; import org.springframework.cache.interceptor.KeyGenerator; import org.springframework.cache.interceptor.SimpleKeyGenerator; import org.springframework.context.ConfigurableApplicationContext; import org.springframework.context.annotation.AnnotationConfigApplicationContext; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; +import org.springframework.context.test.fixtures.cache.AbstractCacheAnnotationTests; +import org.springframework.context.test.fixtures.cache.SomeCustomKeyGenerator; +import org.springframework.context.test.fixtures.cache.beans.AnnotatedClassCacheableService; +import org.springframework.context.test.fixtures.cache.beans.CacheableService; +import org.springframework.context.test.fixtures.cache.beans.DefaultCacheableService; import org.springframework.tests.transaction.CallCountingTransactionManager; import org.springframework.transaction.support.TransactionTemplate; diff --git a/spring-context-support/src/test/java/org/springframework/cache/jcache/JCacheEhCacheApiTests.java b/spring-context-support/src/test/java/org/springframework/cache/jcache/JCacheEhCacheApiTests.java index d0797dd9269..4f9adba6ee8 100644 --- a/spring-context-support/src/test/java/org/springframework/cache/jcache/JCacheEhCacheApiTests.java +++ b/spring-context-support/src/test/java/org/springframework/cache/jcache/JCacheEhCacheApiTests.java @@ -25,7 +25,7 @@ import javax.cache.spi.CachingProvider; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; -import org.springframework.cache.AbstractValueAdaptingCacheTests; +import org.springframework.context.test.fixtures.cache.AbstractValueAdaptingCacheTests; /** * @author Stephane Nicoll diff --git a/spring-context-support/src/test/java/org/springframework/cache/jcache/config/JCacheJavaConfigTests.java b/spring-context-support/src/test/java/org/springframework/cache/jcache/config/JCacheJavaConfigTests.java index 60555a7a3e7..b7f3007dd78 100644 --- a/spring-context-support/src/test/java/org/springframework/cache/jcache/config/JCacheJavaConfigTests.java +++ b/spring-context-support/src/test/java/org/springframework/cache/jcache/config/JCacheJavaConfigTests.java @@ -25,7 +25,6 @@ import org.springframework.cache.CacheManager; import org.springframework.cache.annotation.EnableCaching; import org.springframework.cache.concurrent.ConcurrentMapCache; import org.springframework.cache.concurrent.ConcurrentMapCacheManager; -import org.springframework.cache.config.SomeKeyGenerator; import org.springframework.cache.interceptor.CacheErrorHandler; import org.springframework.cache.interceptor.CacheResolver; import org.springframework.cache.interceptor.KeyGenerator; @@ -43,6 +42,7 @@ import org.springframework.context.ConfigurableApplicationContext; import org.springframework.context.annotation.AnnotationConfigApplicationContext; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; +import org.springframework.context.test.fixtures.cache.SomeKeyGenerator; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatIllegalStateException; diff --git a/spring-context-support/src/test/java/org/springframework/scheduling/quartz/QuartzSupportTests.java b/spring-context-support/src/test/java/org/springframework/scheduling/quartz/QuartzSupportTests.java index 3e22f848352..c6b4efeff83 100644 --- a/spring-context-support/src/test/java/org/springframework/scheduling/quartz/QuartzSupportTests.java +++ b/spring-context-support/src/test/java/org/springframework/scheduling/quartz/QuartzSupportTests.java @@ -34,12 +34,12 @@ import org.quartz.impl.SchedulerRepository; import org.springframework.beans.factory.config.BeanDefinition; import org.springframework.beans.factory.support.BeanDefinitionBuilder; import org.springframework.beans.factory.support.RootBeanDefinition; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.context.support.ClassPathXmlApplicationContext; import org.springframework.context.support.StaticApplicationContext; import org.springframework.core.task.TaskExecutor; import org.springframework.core.test.fixtures.EnabledForTestGroups; import org.springframework.jdbc.core.JdbcTemplate; -import org.springframework.tests.sample.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException; diff --git a/spring-context-support/src/test/java/org/springframework/validation/beanvalidation2/BeanValidationPostProcessorTests.java b/spring-context-support/src/test/java/org/springframework/validation/beanvalidation2/BeanValidationPostProcessorTests.java index 0f6e099f6f4..39c6aae3808 100644 --- a/spring-context-support/src/test/java/org/springframework/validation/beanvalidation2/BeanValidationPostProcessorTests.java +++ b/spring-context-support/src/test/java/org/springframework/validation/beanvalidation2/BeanValidationPostProcessorTests.java @@ -24,9 +24,9 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.factory.BeanCreationException; import org.springframework.beans.factory.support.RootBeanDefinition; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.context.annotation.CommonAnnotationBeanPostProcessor; import org.springframework.context.support.GenericApplicationContext; -import org.springframework.tests.sample.beans.TestBean; import org.springframework.validation.beanvalidation.BeanValidationPostProcessor; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-context/spring-context.gradle b/spring-context/spring-context.gradle index 0894c8d55f0..77ab633b3e4 100644 --- a/spring-context/spring-context.gradle +++ b/spring-context/spring-context.gradle @@ -26,6 +26,7 @@ dependencies { optional("org.jetbrains.kotlin:kotlin-reflect") optional("org.jetbrains.kotlin:kotlin-stdlib") optional("org.reactivestreams:reactive-streams") + testCompile(testFixtures(project(":spring-beans"))) testCompile(testFixtures(project(":spring-core"))) testCompile("io.projectreactor:reactor-core") testCompile("org.codehaus.groovy:groovy-jsr223") @@ -41,4 +42,8 @@ dependencies { testRuntime("org.glassfish:javax.el") testRuntime("org.javamoney:moneta") testRuntime("org.junit.vintage:junit-vintage-engine") // for @Inject TCK + testFixturesApi("org.junit.jupiter:junit-jupiter-api") + testFixturesImplementation(testFixtures(project(":spring-beans"))) + testFixturesImplementation("com.google.code.findbugs:jsr305") + testFixturesImplementation("org.assertj:assertj-core") } diff --git a/spring-context/src/test/java/org/springframework/aop/aspectj/AfterAdviceBindingTests.java b/spring-context/src/test/java/org/springframework/aop/aspectj/AfterAdviceBindingTests.java index e23567fe45e..b5046caae51 100644 --- a/spring-context/src/test/java/org/springframework/aop/aspectj/AfterAdviceBindingTests.java +++ b/spring-context/src/test/java/org/springframework/aop/aspectj/AfterAdviceBindingTests.java @@ -22,9 +22,9 @@ import org.junit.jupiter.api.Test; import org.springframework.aop.aspectj.AdviceBindingTestAspect.AdviceBindingCollaborator; import org.springframework.aop.framework.Advised; import org.springframework.aop.support.AopUtils; +import org.springframework.beans.test.fixtures.beans.ITestBean; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.context.support.ClassPathXmlApplicationContext; -import org.springframework.tests.sample.beans.ITestBean; -import org.springframework.tests.sample.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; diff --git a/spring-context/src/test/java/org/springframework/aop/aspectj/AfterReturningAdviceBindingTests.java b/spring-context/src/test/java/org/springframework/aop/aspectj/AfterReturningAdviceBindingTests.java index 864cdad0837..224e749c670 100644 --- a/spring-context/src/test/java/org/springframework/aop/aspectj/AfterReturningAdviceBindingTests.java +++ b/spring-context/src/test/java/org/springframework/aop/aspectj/AfterReturningAdviceBindingTests.java @@ -22,9 +22,9 @@ import org.junit.jupiter.api.Test; import org.springframework.aop.aspectj.AfterReturningAdviceBindingTestAspect.AfterReturningAdviceBindingCollaborator; import org.springframework.aop.framework.Advised; import org.springframework.aop.support.AopUtils; +import org.springframework.beans.test.fixtures.beans.ITestBean; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.context.support.ClassPathXmlApplicationContext; -import org.springframework.tests.sample.beans.ITestBean; -import org.springframework.tests.sample.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; diff --git a/spring-context/src/test/java/org/springframework/aop/aspectj/AfterThrowingAdviceBindingTests.java b/spring-context/src/test/java/org/springframework/aop/aspectj/AfterThrowingAdviceBindingTests.java index 89acdb48e4b..95829f7c96e 100644 --- a/spring-context/src/test/java/org/springframework/aop/aspectj/AfterThrowingAdviceBindingTests.java +++ b/spring-context/src/test/java/org/springframework/aop/aspectj/AfterThrowingAdviceBindingTests.java @@ -20,8 +20,8 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.springframework.aop.aspectj.AfterThrowingAdviceBindingTestAspect.AfterThrowingAdviceBindingCollaborator; +import org.springframework.beans.test.fixtures.beans.ITestBean; import org.springframework.context.support.ClassPathXmlApplicationContext; -import org.springframework.tests.sample.beans.ITestBean; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; import static org.mockito.Mockito.mock; diff --git a/spring-context/src/test/java/org/springframework/aop/aspectj/AroundAdviceBindingTests.java b/spring-context/src/test/java/org/springframework/aop/aspectj/AroundAdviceBindingTests.java index bc7afb59780..f01b706f3ac 100644 --- a/spring-context/src/test/java/org/springframework/aop/aspectj/AroundAdviceBindingTests.java +++ b/spring-context/src/test/java/org/springframework/aop/aspectj/AroundAdviceBindingTests.java @@ -23,10 +23,10 @@ import org.junit.jupiter.api.Test; import org.springframework.aop.aspectj.AroundAdviceBindingTestAspect.AroundAdviceBindingCollaborator; import org.springframework.aop.framework.Advised; import org.springframework.aop.support.AopUtils; +import org.springframework.beans.test.fixtures.beans.ITestBean; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; -import org.springframework.tests.sample.beans.ITestBean; -import org.springframework.tests.sample.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; diff --git a/spring-context/src/test/java/org/springframework/aop/aspectj/AspectAndAdvicePrecedenceTests.java b/spring-context/src/test/java/org/springframework/aop/aspectj/AspectAndAdvicePrecedenceTests.java index 9f61a85b1b6..159d40ef02b 100644 --- a/spring-context/src/test/java/org/springframework/aop/aspectj/AspectAndAdvicePrecedenceTests.java +++ b/spring-context/src/test/java/org/springframework/aop/aspectj/AspectAndAdvicePrecedenceTests.java @@ -24,10 +24,10 @@ import org.junit.jupiter.api.Test; import org.springframework.aop.MethodBeforeAdvice; import org.springframework.beans.factory.BeanNameAware; +import org.springframework.beans.test.fixtures.beans.ITestBean; import org.springframework.context.support.ClassPathXmlApplicationContext; import org.springframework.core.Ordered; import org.springframework.lang.Nullable; -import org.springframework.tests.sample.beans.ITestBean; /** * @author Adrian Colyer diff --git a/spring-context/src/test/java/org/springframework/aop/aspectj/AspectJExpressionPointcutAdvisorTests.java b/spring-context/src/test/java/org/springframework/aop/aspectj/AspectJExpressionPointcutAdvisorTests.java index b912acd586e..53441e6f852 100644 --- a/spring-context/src/test/java/org/springframework/aop/aspectj/AspectJExpressionPointcutAdvisorTests.java +++ b/spring-context/src/test/java/org/springframework/aop/aspectj/AspectJExpressionPointcutAdvisorTests.java @@ -21,8 +21,8 @@ import org.aopalliance.intercept.MethodInvocation; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; +import org.springframework.beans.test.fixtures.beans.ITestBean; import org.springframework.context.support.ClassPathXmlApplicationContext; -import org.springframework.tests.sample.beans.ITestBean; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-context/src/test/java/org/springframework/aop/aspectj/BeanNamePointcutAtAspectTests.java b/spring-context/src/test/java/org/springframework/aop/aspectj/BeanNamePointcutAtAspectTests.java index 1f0bee00d20..60de4114d9d 100644 --- a/spring-context/src/test/java/org/springframework/aop/aspectj/BeanNamePointcutAtAspectTests.java +++ b/spring-context/src/test/java/org/springframework/aop/aspectj/BeanNamePointcutAtAspectTests.java @@ -22,9 +22,9 @@ import org.junit.jupiter.api.Test; import org.springframework.aop.aspectj.annotation.AspectJProxyFactory; import org.springframework.aop.framework.Advised; +import org.springframework.beans.test.fixtures.beans.ITestBean; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.context.support.ClassPathXmlApplicationContext; -import org.springframework.tests.sample.beans.ITestBean; -import org.springframework.tests.sample.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-context/src/test/java/org/springframework/aop/aspectj/BeanNamePointcutTests.java b/spring-context/src/test/java/org/springframework/aop/aspectj/BeanNamePointcutTests.java index 38068cb9d2d..f315b7643b1 100644 --- a/spring-context/src/test/java/org/springframework/aop/aspectj/BeanNamePointcutTests.java +++ b/spring-context/src/test/java/org/springframework/aop/aspectj/BeanNamePointcutTests.java @@ -25,9 +25,9 @@ import org.junit.jupiter.api.Test; import org.springframework.aop.MethodBeforeAdvice; import org.springframework.aop.framework.Advised; import org.springframework.beans.factory.FactoryBean; +import org.springframework.beans.test.fixtures.beans.ITestBean; import org.springframework.context.support.ClassPathXmlApplicationContext; import org.springframework.lang.Nullable; -import org.springframework.tests.sample.beans.ITestBean; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-context/src/test/java/org/springframework/aop/aspectj/BeforeAdviceBindingTests.java b/spring-context/src/test/java/org/springframework/aop/aspectj/BeforeAdviceBindingTests.java index 05deebd0044..e3be4ccc200 100644 --- a/spring-context/src/test/java/org/springframework/aop/aspectj/BeforeAdviceBindingTests.java +++ b/spring-context/src/test/java/org/springframework/aop/aspectj/BeforeAdviceBindingTests.java @@ -22,9 +22,9 @@ import org.junit.jupiter.api.Test; import org.springframework.aop.aspectj.AdviceBindingTestAspect.AdviceBindingCollaborator; import org.springframework.aop.framework.Advised; import org.springframework.aop.support.AopUtils; +import org.springframework.beans.test.fixtures.beans.ITestBean; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.context.support.ClassPathXmlApplicationContext; -import org.springframework.tests.sample.beans.ITestBean; -import org.springframework.tests.sample.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; diff --git a/spring-context/src/test/java/org/springframework/aop/aspectj/DeclareParentsTests.java b/spring-context/src/test/java/org/springframework/aop/aspectj/DeclareParentsTests.java index 5c86668424f..ce1c128623f 100644 --- a/spring-context/src/test/java/org/springframework/aop/aspectj/DeclareParentsTests.java +++ b/spring-context/src/test/java/org/springframework/aop/aspectj/DeclareParentsTests.java @@ -21,8 +21,8 @@ import org.junit.jupiter.api.Test; import test.mixin.Lockable; import org.springframework.aop.support.AopUtils; +import org.springframework.beans.test.fixtures.beans.ITestBean; import org.springframework.context.support.ClassPathXmlApplicationContext; -import org.springframework.tests.sample.beans.ITestBean; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatIllegalStateException; diff --git a/spring-context/src/test/java/org/springframework/aop/aspectj/ImplicitJPArgumentMatchingAtAspectJTests.java b/spring-context/src/test/java/org/springframework/aop/aspectj/ImplicitJPArgumentMatchingAtAspectJTests.java index 8c2ce72a22c..0ac74719adc 100644 --- a/spring-context/src/test/java/org/springframework/aop/aspectj/ImplicitJPArgumentMatchingAtAspectJTests.java +++ b/spring-context/src/test/java/org/springframework/aop/aspectj/ImplicitJPArgumentMatchingAtAspectJTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2013 the original author or authors. + * Copyright 2002-2019 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. @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package org.springframework.aop.aspectj; import org.aspectj.lang.ProceedingJoinPoint; @@ -20,8 +21,8 @@ import org.aspectj.lang.annotation.Around; import org.aspectj.lang.annotation.Aspect; import org.junit.jupiter.api.Test; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.context.support.ClassPathXmlApplicationContext; -import org.springframework.tests.sample.beans.TestBean; /** * Tests to check if the first implicit join point argument is correctly processed. @@ -33,14 +34,15 @@ import org.springframework.tests.sample.beans.TestBean; public class ImplicitJPArgumentMatchingAtAspectJTests { @Test + @SuppressWarnings("resource") public void testAspect() { - // nothing to really test; it is enough if we don't get error while creating app context + // nothing to really test; it is enough if we don't get error while creating the app context new ClassPathXmlApplicationContext(getClass().getSimpleName() + ".xml", getClass()); } @Aspect static class CounterAtAspectJAspect { - @Around(value="execution(* org.springframework.tests.sample.beans.TestBean.*(..)) and this(bean) and args(argument)", + @Around(value="execution(* org.springframework.beans.test.fixtures.beans.TestBean.*(..)) and this(bean) and args(argument)", argNames="bean,argument") public void increment(ProceedingJoinPoint pjp, TestBean bean, Object argument) throws Throwable { pjp.proceed(); diff --git a/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/AspectImplementingInterfaceTests.java b/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/AspectImplementingInterfaceTests.java index f92eee68ab9..f4b650f8da6 100644 --- a/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/AspectImplementingInterfaceTests.java +++ b/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/AspectImplementingInterfaceTests.java @@ -20,8 +20,8 @@ import org.aspectj.lang.ProceedingJoinPoint; import org.junit.jupiter.api.Test; import org.springframework.aop.framework.Advised; +import org.springframework.beans.test.fixtures.beans.ITestBean; import org.springframework.context.support.ClassPathXmlApplicationContext; -import org.springframework.tests.sample.beans.ITestBean; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorAndLazyInitTargetSourceTests.java b/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorAndLazyInitTargetSourceTests.java index 84e3e1176fd..43c9226c995 100644 --- a/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorAndLazyInitTargetSourceTests.java +++ b/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorAndLazyInitTargetSourceTests.java @@ -18,9 +18,9 @@ package org.springframework.aop.aspectj.autoproxy; import org.junit.jupiter.api.Test; +import org.springframework.beans.test.fixtures.beans.ITestBean; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.context.support.ClassPathXmlApplicationContext; -import org.springframework.tests.sample.beans.ITestBean; -import org.springframework.tests.sample.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests.java b/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests.java index 8c88ad34b78..fee1f223aeb 100644 --- a/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests.java +++ b/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests.java @@ -43,6 +43,10 @@ import org.springframework.beans.factory.config.MethodInvokingFactoryBean; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.support.RootBeanDefinition; import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; +import org.springframework.beans.test.fixtures.beans.INestedTestBean; +import org.springframework.beans.test.fixtures.beans.ITestBean; +import org.springframework.beans.test.fixtures.beans.NestedTestBean; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; import org.springframework.context.support.GenericApplicationContext; @@ -54,10 +58,6 @@ import org.springframework.core.test.fixtures.Assume; import org.springframework.core.test.fixtures.EnabledForTestGroups; import org.springframework.core.test.fixtures.TestGroup; import org.springframework.lang.Nullable; -import org.springframework.tests.sample.beans.INestedTestBean; -import org.springframework.tests.sample.beans.ITestBean; -import org.springframework.tests.sample.beans.NestedTestBean; -import org.springframework.tests.sample.beans.TestBean; import org.springframework.util.StopWatch; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/AtAspectJAfterThrowingTests.java b/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/AtAspectJAfterThrowingTests.java index 002159ef739..eb254e8dd1c 100644 --- a/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/AtAspectJAfterThrowingTests.java +++ b/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/AtAspectJAfterThrowingTests.java @@ -23,8 +23,8 @@ import org.aspectj.lang.annotation.Aspect; import org.junit.jupiter.api.Test; import org.springframework.aop.support.AopUtils; +import org.springframework.beans.test.fixtures.beans.ITestBean; import org.springframework.context.support.ClassPathXmlApplicationContext; -import org.springframework.tests.sample.beans.ITestBean; import static org.assertj.core.api.Assertions.assertThat; @@ -64,7 +64,7 @@ class ExceptionHandlingAspect { public IOException lastException; - @AfterThrowing(pointcut = "within(org.springframework.tests.sample.beans.ITestBean+)", throwing = "ex") + @AfterThrowing(pointcut = "within(org.springframework.beans.test.fixtures.beans.ITestBean+)", throwing = "ex") public void handleIOException(IOException ex) { handled++; lastException = ex; diff --git a/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/benchmark/BenchmarkTests.java b/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/benchmark/BenchmarkTests.java index 1557110b08a..0ed10779ddc 100644 --- a/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/benchmark/BenchmarkTests.java +++ b/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/benchmark/BenchmarkTests.java @@ -32,8 +32,8 @@ import org.springframework.aop.framework.Advised; import org.springframework.aop.support.AopUtils; import org.springframework.aop.support.DefaultPointcutAdvisor; import org.springframework.aop.support.StaticMethodMatcherPointcut; +import org.springframework.beans.test.fixtures.beans.ITestBean; import org.springframework.context.support.ClassPathXmlApplicationContext; -import org.springframework.tests.sample.beans.ITestBean; import org.springframework.util.StopWatch; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-context/src/test/java/org/springframework/aop/aspectj/generic/AfterReturningGenericTypeMatchingTests.java b/spring-context/src/test/java/org/springframework/aop/aspectj/generic/AfterReturningGenericTypeMatchingTests.java index ff70f11c0f5..2b37c428ab1 100644 --- a/spring-context/src/test/java/org/springframework/aop/aspectj/generic/AfterReturningGenericTypeMatchingTests.java +++ b/spring-context/src/test/java/org/springframework/aop/aspectj/generic/AfterReturningGenericTypeMatchingTests.java @@ -25,9 +25,9 @@ import org.aspectj.lang.annotation.Pointcut; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; +import org.springframework.beans.test.fixtures.beans.Employee; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.context.support.ClassPathXmlApplicationContext; -import org.springframework.tests.sample.beans.Employee; -import org.springframework.tests.sample.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-context/src/test/java/org/springframework/aop/config/AopNamespaceHandlerProxyTargetClassTests.java b/spring-context/src/test/java/org/springframework/aop/config/AopNamespaceHandlerProxyTargetClassTests.java index f6a807125d4..a57e1113e3a 100644 --- a/spring-context/src/test/java/org/springframework/aop/config/AopNamespaceHandlerProxyTargetClassTests.java +++ b/spring-context/src/test/java/org/springframework/aop/config/AopNamespaceHandlerProxyTargetClassTests.java @@ -20,7 +20,7 @@ import org.junit.jupiter.api.Test; import org.springframework.aop.framework.Advised; import org.springframework.aop.support.AopUtils; -import org.springframework.tests.sample.beans.ITestBean; +import org.springframework.beans.test.fixtures.beans.ITestBean; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-context/src/test/java/org/springframework/aop/config/AopNamespaceHandlerTests.java b/spring-context/src/test/java/org/springframework/aop/config/AopNamespaceHandlerTests.java index c359b76fc60..3b5af8a87a4 100644 --- a/spring-context/src/test/java/org/springframework/aop/config/AopNamespaceHandlerTests.java +++ b/spring-context/src/test/java/org/springframework/aop/config/AopNamespaceHandlerTests.java @@ -23,11 +23,11 @@ import org.junit.jupiter.api.Test; import org.springframework.aop.Advisor; import org.springframework.aop.framework.Advised; import org.springframework.aop.support.AopUtils; +import org.springframework.beans.test.fixtures.beans.ITestBean; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; import org.springframework.tests.aop.advice.CountingBeforeAdvice; -import org.springframework.tests.sample.beans.ITestBean; -import org.springframework.tests.sample.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-context/src/test/java/org/springframework/aop/framework/AbstractAopProxyTests.java b/spring-context/src/test/java/org/springframework/aop/framework/AbstractAopProxyTests.java index 8fb952e12f0..3876a78a33d 100644 --- a/spring-context/src/test/java/org/springframework/aop/framework/AbstractAopProxyTests.java +++ b/spring-context/src/test/java/org/springframework/aop/framework/AbstractAopProxyTests.java @@ -57,6 +57,11 @@ import org.springframework.aop.support.Pointcuts; import org.springframework.aop.support.StaticMethodMatcherPointcutAdvisor; import org.springframework.aop.target.HotSwappableTargetSource; import org.springframework.aop.target.SingletonTargetSource; +import org.springframework.beans.test.fixtures.beans.IOther; +import org.springframework.beans.test.fixtures.beans.ITestBean; +import org.springframework.beans.test.fixtures.beans.Person; +import org.springframework.beans.test.fixtures.beans.SerializablePerson; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.core.test.fixtures.EnabledForTestGroups; import org.springframework.core.test.fixtures.TestGroup; import org.springframework.core.test.fixtures.TimeStamped; @@ -69,11 +74,6 @@ import org.springframework.tests.aop.advice.MyThrowsHandler; import org.springframework.tests.aop.interceptor.NopInterceptor; import org.springframework.tests.aop.interceptor.SerializableNopInterceptor; import org.springframework.tests.aop.interceptor.TimestampIntroductionInterceptor; -import org.springframework.tests.sample.beans.IOther; -import org.springframework.tests.sample.beans.ITestBean; -import org.springframework.tests.sample.beans.Person; -import org.springframework.tests.sample.beans.SerializablePerson; -import org.springframework.tests.sample.beans.TestBean; import org.springframework.util.StopWatch; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-context/src/test/java/org/springframework/aop/framework/CglibProxyTests.java b/spring-context/src/test/java/org/springframework/aop/framework/CglibProxyTests.java index d324c58c598..aec81a331e8 100644 --- a/spring-context/src/test/java/org/springframework/aop/framework/CglibProxyTests.java +++ b/spring-context/src/test/java/org/springframework/aop/framework/CglibProxyTests.java @@ -28,13 +28,13 @@ import org.springframework.aop.MethodMatcher; import org.springframework.aop.Pointcut; import org.springframework.aop.support.AopUtils; import org.springframework.aop.support.DefaultPointcutAdvisor; +import org.springframework.beans.test.fixtures.beans.ITestBean; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContextException; import org.springframework.context.support.ClassPathXmlApplicationContext; import org.springframework.tests.aop.advice.CountingBeforeAdvice; import org.springframework.tests.aop.interceptor.NopInterceptor; -import org.springframework.tests.sample.beans.ITestBean; -import org.springframework.tests.sample.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; diff --git a/spring-context/src/test/java/org/springframework/aop/framework/JdkDynamicProxyTests.java b/spring-context/src/test/java/org/springframework/aop/framework/JdkDynamicProxyTests.java index 732d867aa24..d34ac00a3ad 100644 --- a/spring-context/src/test/java/org/springframework/aop/framework/JdkDynamicProxyTests.java +++ b/spring-context/src/test/java/org/springframework/aop/framework/JdkDynamicProxyTests.java @@ -24,9 +24,9 @@ import org.junit.jupiter.api.Test; import org.springframework.aop.interceptor.ExposeInvocationInterceptor; import org.springframework.aop.support.AopUtils; -import org.springframework.tests.sample.beans.IOther; -import org.springframework.tests.sample.beans.ITestBean; -import org.springframework.tests.sample.beans.TestBean; +import org.springframework.beans.test.fixtures.beans.IOther; +import org.springframework.beans.test.fixtures.beans.ITestBean; +import org.springframework.beans.test.fixtures.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException; diff --git a/spring-context/src/test/java/org/springframework/aop/framework/ProxyFactoryBeanTests.java b/spring-context/src/test/java/org/springframework/aop/framework/ProxyFactoryBeanTests.java index 24c744ccba7..22ca040e517 100644 --- a/spring-context/src/test/java/org/springframework/aop/framework/ProxyFactoryBeanTests.java +++ b/spring-context/src/test/java/org/springframework/aop/framework/ProxyFactoryBeanTests.java @@ -45,8 +45,12 @@ import org.springframework.beans.factory.support.BeanDefinitionRegistry; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.support.RootBeanDefinition; import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; +import org.springframework.beans.test.fixtures.beans.ITestBean; +import org.springframework.beans.test.fixtures.beans.Person; +import org.springframework.beans.test.fixtures.beans.SideEffectBean; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.context.ApplicationListener; -import org.springframework.context.TestListener; +import org.springframework.context.test.fixtures.beans.TestApplicationListener; import org.springframework.core.io.ClassPathResource; import org.springframework.core.test.fixtures.TimeStamped; import org.springframework.core.test.fixtures.io.SerializationTestUtils; @@ -55,10 +59,6 @@ import org.springframework.tests.aop.advice.CountingBeforeAdvice; import org.springframework.tests.aop.advice.MyThrowsHandler; import org.springframework.tests.aop.interceptor.NopInterceptor; import org.springframework.tests.aop.interceptor.TimestampIntroductionInterceptor; -import org.springframework.tests.sample.beans.ITestBean; -import org.springframework.tests.sample.beans.Person; -import org.springframework.tests.sample.beans.SideEffectBean; -import org.springframework.tests.sample.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; @@ -93,7 +93,7 @@ public class ProxyFactoryBeanTests { @BeforeEach public void setUp() throws Exception { DefaultListableBeanFactory parent = new DefaultListableBeanFactory(); - parent.registerBeanDefinition("target2", new RootBeanDefinition(TestListener.class)); + parent.registerBeanDefinition("target2", new RootBeanDefinition(TestApplicationListener.class)); this.factory = new DefaultListableBeanFactory(parent); new XmlBeanDefinitionReader((BeanDefinitionRegistry) this.factory).loadBeanDefinitions( new ClassPathResource(CONTEXT, getClass())); diff --git a/spring-context/src/test/java/org/springframework/aop/framework/adapter/AdvisorAdapterRegistrationTests.java b/spring-context/src/test/java/org/springframework/aop/framework/adapter/AdvisorAdapterRegistrationTests.java index 0c285b6bee2..cb71798c54f 100644 --- a/spring-context/src/test/java/org/springframework/aop/framework/adapter/AdvisorAdapterRegistrationTests.java +++ b/spring-context/src/test/java/org/springframework/aop/framework/adapter/AdvisorAdapterRegistrationTests.java @@ -28,8 +28,8 @@ import org.junit.jupiter.api.Test; import org.springframework.aop.Advisor; import org.springframework.aop.BeforeAdvice; import org.springframework.aop.framework.Advised; +import org.springframework.beans.test.fixtures.beans.ITestBean; import org.springframework.context.support.ClassPathXmlApplicationContext; -import org.springframework.tests.sample.beans.ITestBean; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; diff --git a/spring-context/src/test/java/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorTests.java b/spring-context/src/test/java/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorTests.java index 46fde4423f4..1b83b1680d1 100644 --- a/spring-context/src/test/java/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorTests.java +++ b/spring-context/src/test/java/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorTests.java @@ -31,11 +31,11 @@ import org.springframework.aop.target.LazyInitTargetSource; import org.springframework.aop.target.PrototypeTargetSource; import org.springframework.aop.target.ThreadLocalTargetSource; import org.springframework.beans.factory.BeanFactory; +import org.springframework.beans.test.fixtures.beans.CountingTestBean; +import org.springframework.beans.test.fixtures.beans.ITestBean; import org.springframework.context.support.ClassPathXmlApplicationContext; import org.springframework.tests.aop.advice.CountingBeforeAdvice; import org.springframework.tests.aop.interceptor.NopInterceptor; -import org.springframework.tests.sample.beans.CountingTestBean; -import org.springframework.tests.sample.beans.ITestBean; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-context/src/test/java/org/springframework/aop/framework/autoproxy/AutoProxyCreatorTests.java b/spring-context/src/test/java/org/springframework/aop/framework/autoproxy/AutoProxyCreatorTests.java index 3bcb291eccb..e2565bde791 100644 --- a/spring-context/src/test/java/org/springframework/aop/framework/autoproxy/AutoProxyCreatorTests.java +++ b/spring-context/src/test/java/org/springframework/aop/framework/autoproxy/AutoProxyCreatorTests.java @@ -37,16 +37,16 @@ import org.springframework.beans.factory.FactoryBean; import org.springframework.beans.factory.InitializingBean; import org.springframework.beans.factory.config.BeanDefinitionHolder; import org.springframework.beans.factory.support.RootBeanDefinition; +import org.springframework.beans.test.fixtures.beans.ITestBean; +import org.springframework.beans.test.fixtures.beans.IndexedTestBean; +import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.test.fixtures.beans.factory.DummyFactory; import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContextAware; import org.springframework.context.MessageSource; import org.springframework.context.support.StaticApplicationContext; import org.springframework.context.support.StaticMessageSource; import org.springframework.lang.Nullable; -import org.springframework.tests.sample.beans.ITestBean; -import org.springframework.tests.sample.beans.IndexedTestBean; -import org.springframework.tests.sample.beans.TestBean; -import org.springframework.tests.sample.beans.factory.DummyFactory; import org.springframework.util.ReflectionUtils; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-context/src/test/java/org/springframework/aop/framework/autoproxy/BeanNameAutoProxyCreatorInitTests.java b/spring-context/src/test/java/org/springframework/aop/framework/autoproxy/BeanNameAutoProxyCreatorInitTests.java index 6b18de04ffe..2374a56fcbb 100644 --- a/spring-context/src/test/java/org/springframework/aop/framework/autoproxy/BeanNameAutoProxyCreatorInitTests.java +++ b/spring-context/src/test/java/org/springframework/aop/framework/autoproxy/BeanNameAutoProxyCreatorInitTests.java @@ -21,9 +21,9 @@ import java.lang.reflect.Method; import org.junit.jupiter.api.Test; import org.springframework.aop.MethodBeforeAdvice; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.context.support.ClassPathXmlApplicationContext; import org.springframework.lang.Nullable; -import org.springframework.tests.sample.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException; diff --git a/spring-context/src/test/java/org/springframework/aop/framework/autoproxy/BeanNameAutoProxyCreatorTests.java b/spring-context/src/test/java/org/springframework/aop/framework/autoproxy/BeanNameAutoProxyCreatorTests.java index 1af446bf16f..e60395ef6f8 100644 --- a/spring-context/src/test/java/org/springframework/aop/framework/autoproxy/BeanNameAutoProxyCreatorTests.java +++ b/spring-context/src/test/java/org/springframework/aop/framework/autoproxy/BeanNameAutoProxyCreatorTests.java @@ -25,12 +25,12 @@ import org.springframework.aop.framework.Advised; import org.springframework.aop.support.AopUtils; import org.springframework.beans.factory.BeanFactory; import org.springframework.beans.factory.FactoryBean; +import org.springframework.beans.test.fixtures.beans.ITestBean; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.context.support.ClassPathXmlApplicationContext; import org.springframework.core.test.fixtures.TimeStamped; import org.springframework.tests.aop.advice.CountingBeforeAdvice; import org.springframework.tests.aop.interceptor.NopInterceptor; -import org.springframework.tests.sample.beans.ITestBean; -import org.springframework.tests.sample.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; diff --git a/spring-context/src/test/java/org/springframework/aop/scope/ScopedProxyTests.java b/spring-context/src/test/java/org/springframework/aop/scope/ScopedProxyTests.java index 82e9f010043..3a2bf91f916 100644 --- a/spring-context/src/test/java/org/springframework/aop/scope/ScopedProxyTests.java +++ b/spring-context/src/test/java/org/springframework/aop/scope/ScopedProxyTests.java @@ -25,12 +25,12 @@ import org.junit.jupiter.api.Test; import org.springframework.aop.support.AopUtils; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; +import org.springframework.beans.test.fixtures.beans.ITestBean; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.context.support.GenericApplicationContext; +import org.springframework.context.test.fixtures.SimpleMapScope; import org.springframework.core.io.ClassPathResource; import org.springframework.core.test.fixtures.io.SerializationTestUtils; -import org.springframework.tests.context.SimpleMapScope; -import org.springframework.tests.sample.beans.ITestBean; -import org.springframework.tests.sample.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-context/src/test/java/org/springframework/aop/target/CommonsPool2TargetSourceTests.java b/spring-context/src/test/java/org/springframework/aop/target/CommonsPool2TargetSourceTests.java index beb840ae6ca..0c2390d1243 100644 --- a/spring-context/src/test/java/org/springframework/aop/target/CommonsPool2TargetSourceTests.java +++ b/spring-context/src/test/java/org/springframework/aop/target/CommonsPool2TargetSourceTests.java @@ -25,12 +25,12 @@ import org.junit.jupiter.api.Test; import org.springframework.aop.framework.Advised; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; +import org.springframework.beans.test.fixtures.beans.Person; +import org.springframework.beans.test.fixtures.beans.SerializablePerson; +import org.springframework.beans.test.fixtures.beans.SideEffectBean; import org.springframework.context.support.StaticApplicationContext; import org.springframework.core.io.ClassPathResource; import org.springframework.core.test.fixtures.io.SerializationTestUtils; -import org.springframework.tests.sample.beans.Person; -import org.springframework.tests.sample.beans.SerializablePerson; -import org.springframework.tests.sample.beans.SideEffectBean; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; diff --git a/spring-context/src/test/java/org/springframework/beans/factory/xml/LookupMethodWrappedByCglibProxyTests.java b/spring-context/src/test/java/org/springframework/beans/factory/xml/LookupMethodWrappedByCglibProxyTests.java index b9647606608..275ddd9fcbb 100644 --- a/spring-context/src/test/java/org/springframework/beans/factory/xml/LookupMethodWrappedByCglibProxyTests.java +++ b/spring-context/src/test/java/org/springframework/beans/factory/xml/LookupMethodWrappedByCglibProxyTests.java @@ -20,9 +20,9 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.springframework.aop.interceptor.DebugInterceptor; +import org.springframework.beans.test.fixtures.beans.ITestBean; import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; -import org.springframework.tests.sample.beans.ITestBean; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-context/src/test/java/org/springframework/beans/factory/xml/SimplePropertyNamespaceHandlerWithExpressionLanguageTests.java b/spring-context/src/test/java/org/springframework/beans/factory/xml/SimplePropertyNamespaceHandlerWithExpressionLanguageTests.java index a6c9a870f6e..18ef636ee13 100644 --- a/spring-context/src/test/java/org/springframework/beans/factory/xml/SimplePropertyNamespaceHandlerWithExpressionLanguageTests.java +++ b/spring-context/src/test/java/org/springframework/beans/factory/xml/SimplePropertyNamespaceHandlerWithExpressionLanguageTests.java @@ -18,9 +18,9 @@ package org.springframework.beans.factory.xml; import org.junit.jupiter.api.Test; +import org.springframework.beans.test.fixtures.beans.ITestBean; import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; -import org.springframework.tests.sample.beans.ITestBean; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-context/src/test/java/org/springframework/beans/factory/xml/XmlBeanFactoryTestTypes.java b/spring-context/src/test/java/org/springframework/beans/factory/xml/XmlBeanFactoryTestTypes.java index f9d5edba0db..936981add7b 100644 --- a/spring-context/src/test/java/org/springframework/beans/factory/xml/XmlBeanFactoryTestTypes.java +++ b/spring-context/src/test/java/org/springframework/beans/factory/xml/XmlBeanFactoryTestTypes.java @@ -33,10 +33,10 @@ import org.springframework.beans.factory.DisposableBean; import org.springframework.beans.factory.InitializingBean; import org.springframework.beans.factory.config.BeanPostProcessor; import org.springframework.beans.factory.support.MethodReplacer; -import org.springframework.tests.sample.beans.ITestBean; -import org.springframework.tests.sample.beans.IndexedTestBean; -import org.springframework.tests.sample.beans.TestBean; -import org.springframework.tests.sample.beans.factory.DummyFactory; +import org.springframework.beans.test.fixtures.beans.ITestBean; +import org.springframework.beans.test.fixtures.beans.IndexedTestBean; +import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.test.fixtures.beans.factory.DummyFactory; /** * Types used by {@link XmlBeanFactoryTests} and its attendant XML config files. diff --git a/spring-context/src/test/java/org/springframework/beans/factory/xml/XmlBeanFactoryTests.java b/spring-context/src/test/java/org/springframework/beans/factory/xml/XmlBeanFactoryTests.java index d820baa1356..311a933b21a 100644 --- a/spring-context/src/test/java/org/springframework/beans/factory/xml/XmlBeanFactoryTests.java +++ b/spring-context/src/test/java/org/springframework/beans/factory/xml/XmlBeanFactoryTests.java @@ -51,18 +51,18 @@ import org.springframework.beans.factory.support.AbstractBeanDefinition; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.support.MethodReplacer; import org.springframework.beans.factory.support.RootBeanDefinition; +import org.springframework.beans.test.fixtures.beans.DependenciesBean; +import org.springframework.beans.test.fixtures.beans.DerivedTestBean; +import org.springframework.beans.test.fixtures.beans.ITestBean; +import org.springframework.beans.test.fixtures.beans.IndexedTestBean; +import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.test.fixtures.beans.factory.DummyFactory; import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.FileSystemResource; import org.springframework.core.io.UrlResource; import org.springframework.core.io.support.EncodedResource; import org.springframework.core.test.fixtures.io.SerializationTestUtils; -import org.springframework.tests.sample.beans.DependenciesBean; -import org.springframework.tests.sample.beans.DerivedTestBean; -import org.springframework.tests.sample.beans.ITestBean; -import org.springframework.tests.sample.beans.IndexedTestBean; import org.springframework.tests.sample.beans.ResourceTestBean; -import org.springframework.tests.sample.beans.TestBean; -import org.springframework.tests.sample.beans.factory.DummyFactory; import org.springframework.util.ClassUtils; import org.springframework.util.FileCopyUtils; import org.springframework.util.StopWatch; diff --git a/spring-context/src/test/java/org/springframework/beans/factory/xml/support/CustomNamespaceHandlerTests.java b/spring-context/src/test/java/org/springframework/beans/factory/xml/support/CustomNamespaceHandlerTests.java index a280952bc4a..a03a18f4a1e 100644 --- a/spring-context/src/test/java/org/springframework/beans/factory/xml/support/CustomNamespaceHandlerTests.java +++ b/spring-context/src/test/java/org/springframework/beans/factory/xml/support/CustomNamespaceHandlerTests.java @@ -51,13 +51,13 @@ import org.springframework.beans.factory.xml.NamespaceHandlerSupport; import org.springframework.beans.factory.xml.ParserContext; import org.springframework.beans.factory.xml.PluggableSchemaResolver; import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; +import org.springframework.beans.test.fixtures.beans.ITestBean; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.context.ApplicationListener; import org.springframework.context.support.GenericApplicationContext; import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.Resource; import org.springframework.tests.aop.interceptor.NopInterceptor; -import org.springframework.tests.sample.beans.ITestBean; -import org.springframework.tests.sample.beans.TestBean; import static java.lang.String.format; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-context/src/test/java/org/springframework/cache/CacheReproTests.java b/spring-context/src/test/java/org/springframework/cache/CacheReproTests.java index 2d9ca8f647f..4ade8ae382a 100644 --- a/spring-context/src/test/java/org/springframework/cache/CacheReproTests.java +++ b/spring-context/src/test/java/org/springframework/cache/CacheReproTests.java @@ -24,6 +24,7 @@ import java.util.Optional; import org.junit.jupiter.api.Test; import org.mockito.Mockito; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.cache.annotation.CachePut; import org.springframework.cache.annotation.Cacheable; import org.springframework.cache.annotation.Caching; @@ -39,7 +40,6 @@ import org.springframework.context.annotation.AnnotationConfigApplicationContext import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.lang.Nullable; -import org.springframework.tests.sample.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatIllegalStateException; diff --git a/spring-context/src/test/java/org/springframework/cache/concurrent/ConcurrentMapCacheTests.java b/spring-context/src/test/java/org/springframework/cache/concurrent/ConcurrentMapCacheTests.java index 2a6d4641c7d..e933a9bf028 100644 --- a/spring-context/src/test/java/org/springframework/cache/concurrent/ConcurrentMapCacheTests.java +++ b/spring-context/src/test/java/org/springframework/cache/concurrent/ConcurrentMapCacheTests.java @@ -25,7 +25,7 @@ import java.util.concurrent.ConcurrentMap; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; -import org.springframework.cache.AbstractValueAdaptingCacheTests; +import org.springframework.context.test.fixtures.cache.AbstractValueAdaptingCacheTests; import org.springframework.core.serializer.support.SerializationDelegate; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-context/src/test/java/org/springframework/cache/config/AnnotationDrivenCacheConfigTests.java b/spring-context/src/test/java/org/springframework/cache/config/AnnotationDrivenCacheConfigTests.java index 81c3764536e..1e99b6f7965 100644 --- a/spring-context/src/test/java/org/springframework/cache/config/AnnotationDrivenCacheConfigTests.java +++ b/spring-context/src/test/java/org/springframework/cache/config/AnnotationDrivenCacheConfigTests.java @@ -18,6 +18,7 @@ package org.springframework.cache.config; import org.springframework.context.ConfigurableApplicationContext; import org.springframework.context.support.GenericXmlApplicationContext; +import org.springframework.context.test.fixtures.cache.AbstractCacheAnnotationTests; /** * @author Costin Leau diff --git a/spring-context/src/test/java/org/springframework/cache/config/AnnotationNamespaceDrivenTests.java b/spring-context/src/test/java/org/springframework/cache/config/AnnotationNamespaceDrivenTests.java index 13a420feef8..e032e367422 100644 --- a/spring-context/src/test/java/org/springframework/cache/config/AnnotationNamespaceDrivenTests.java +++ b/spring-context/src/test/java/org/springframework/cache/config/AnnotationNamespaceDrivenTests.java @@ -22,6 +22,7 @@ import org.springframework.cache.interceptor.CacheErrorHandler; import org.springframework.cache.interceptor.CacheInterceptor; import org.springframework.context.ConfigurableApplicationContext; import org.springframework.context.support.GenericXmlApplicationContext; +import org.springframework.context.test.fixtures.cache.AbstractCacheAnnotationTests; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-context/src/test/java/org/springframework/cache/config/CacheAdviceNamespaceTests.java b/spring-context/src/test/java/org/springframework/cache/config/CacheAdviceNamespaceTests.java index 097559767d5..5b679a3269e 100644 --- a/spring-context/src/test/java/org/springframework/cache/config/CacheAdviceNamespaceTests.java +++ b/spring-context/src/test/java/org/springframework/cache/config/CacheAdviceNamespaceTests.java @@ -21,6 +21,7 @@ import org.junit.jupiter.api.Test; import org.springframework.cache.interceptor.CacheInterceptor; import org.springframework.context.ConfigurableApplicationContext; import org.springframework.context.support.GenericXmlApplicationContext; +import org.springframework.context.test.fixtures.cache.AbstractCacheAnnotationTests; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-context/src/test/java/org/springframework/cache/config/CustomInterceptorTests.java b/spring-context/src/test/java/org/springframework/cache/config/CustomInterceptorTests.java index cc8aeb18ba8..b94b3811de4 100644 --- a/spring-context/src/test/java/org/springframework/cache/config/CustomInterceptorTests.java +++ b/spring-context/src/test/java/org/springframework/cache/config/CustomInterceptorTests.java @@ -24,7 +24,6 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.springframework.cache.CacheManager; -import org.springframework.cache.CacheTestUtils; import org.springframework.cache.annotation.EnableCaching; import org.springframework.cache.interceptor.CacheInterceptor; import org.springframework.cache.interceptor.CacheOperationInvoker; @@ -33,6 +32,9 @@ import org.springframework.context.ConfigurableApplicationContext; import org.springframework.context.annotation.AnnotationConfigApplicationContext; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; +import org.springframework.context.test.fixtures.cache.CacheTestUtils; +import org.springframework.context.test.fixtures.cache.beans.CacheableService; +import org.springframework.context.test.fixtures.cache.beans.DefaultCacheableService; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; diff --git a/spring-context/src/test/java/org/springframework/cache/config/EnableCachingIntegrationTests.java b/spring-context/src/test/java/org/springframework/cache/config/EnableCachingIntegrationTests.java index 57a186f1dfa..2b1de9a12f1 100644 --- a/spring-context/src/test/java/org/springframework/cache/config/EnableCachingIntegrationTests.java +++ b/spring-context/src/test/java/org/springframework/cache/config/EnableCachingIntegrationTests.java @@ -24,7 +24,6 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.cache.Cache; import org.springframework.cache.CacheManager; -import org.springframework.cache.CacheTestUtils; import org.springframework.cache.annotation.CacheConfig; import org.springframework.cache.annotation.Cacheable; import org.springframework.cache.annotation.CachingConfigurerSupport; @@ -34,12 +33,13 @@ import org.springframework.context.annotation.AnnotationConfigApplicationContext import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; +import org.springframework.context.test.fixtures.cache.CacheTestUtils; import org.springframework.core.env.Environment; import org.springframework.mock.env.MockEnvironment; import static org.assertj.core.api.Assertions.assertThat; -import static org.springframework.cache.CacheTestUtils.assertCacheHit; -import static org.springframework.cache.CacheTestUtils.assertCacheMiss; +import static org.springframework.context.test.fixtures.cache.CacheTestUtils.assertCacheHit; +import static org.springframework.context.test.fixtures.cache.CacheTestUtils.assertCacheMiss; /** * Tests that represent real use cases with advanced configuration. diff --git a/spring-context/src/test/java/org/springframework/cache/config/EnableCachingTests.java b/spring-context/src/test/java/org/springframework/cache/config/EnableCachingTests.java index 94235e694b3..551b28c50fd 100644 --- a/spring-context/src/test/java/org/springframework/cache/config/EnableCachingTests.java +++ b/spring-context/src/test/java/org/springframework/cache/config/EnableCachingTests.java @@ -20,7 +20,6 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.factory.BeanCreationException; import org.springframework.cache.CacheManager; -import org.springframework.cache.CacheTestUtils; import org.springframework.cache.annotation.CachingConfigurerSupport; import org.springframework.cache.annotation.EnableCaching; import org.springframework.cache.interceptor.CacheErrorHandler; @@ -35,6 +34,13 @@ import org.springframework.context.ConfigurableApplicationContext; import org.springframework.context.annotation.AnnotationConfigApplicationContext; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; +import org.springframework.context.test.fixtures.cache.AbstractCacheAnnotationTests; +import org.springframework.context.test.fixtures.cache.CacheTestUtils; +import org.springframework.context.test.fixtures.cache.SomeCustomKeyGenerator; +import org.springframework.context.test.fixtures.cache.SomeKeyGenerator; +import org.springframework.context.test.fixtures.cache.beans.AnnotatedClassCacheableService; +import org.springframework.context.test.fixtures.cache.beans.CacheableService; +import org.springframework.context.test.fixtures.cache.beans.DefaultCacheableService; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-context/src/test/java/org/springframework/cache/config/SomeCustomKeyGenerator.java b/spring-context/src/test/java/org/springframework/cache/config/SomeCustomKeyGenerator.java deleted file mode 100644 index 8f1b961ce5d..00000000000 --- a/spring-context/src/test/java/org/springframework/cache/config/SomeCustomKeyGenerator.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2002-2018 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. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.cache.config; - -import java.lang.reflect.Method; - -import org.springframework.cache.interceptor.KeyGenerator; - -/** - * A custom {@link KeyGenerator} that exposes the algorithm used to compute the key - * for convenience in tests scenario. - * - * @author Stephane Nicoll - */ -public class SomeCustomKeyGenerator implements KeyGenerator { - - @Override - public Object generate(Object target, Method method, Object... params) { - return generateKey(method.getName(), params); - } - - /** - * @see #generate(Object, java.lang.reflect.Method, Object...) - */ - static Object generateKey(String methodName, Object... params) { - final StringBuilder sb = new StringBuilder(methodName); - for (Object param : params) { - sb.append(param); - } - return sb.toString(); - } -} diff --git a/spring-context/src/test/java/org/springframework/cache/interceptor/CacheResolverCustomizationTests.java b/spring-context/src/test/java/org/springframework/cache/interceptor/CacheResolverCustomizationTests.java index c1be67af2bb..45e3d575327 100644 --- a/spring-context/src/test/java/org/springframework/cache/interceptor/CacheResolverCustomizationTests.java +++ b/spring-context/src/test/java/org/springframework/cache/interceptor/CacheResolverCustomizationTests.java @@ -27,7 +27,6 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.factory.NoSuchBeanDefinitionException; import org.springframework.cache.Cache; import org.springframework.cache.CacheManager; -import org.springframework.cache.CacheTestUtils; import org.springframework.cache.annotation.CacheConfig; import org.springframework.cache.annotation.Cacheable; import org.springframework.cache.annotation.CachingConfigurerSupport; @@ -36,14 +35,15 @@ import org.springframework.context.ApplicationContext; import org.springframework.context.annotation.AnnotationConfigApplicationContext; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; +import org.springframework.context.test.fixtures.cache.CacheTestUtils; import org.springframework.lang.Nullable; import org.springframework.util.ReflectionUtils; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; import static org.assertj.core.api.Assertions.assertThatIllegalStateException; -import static org.springframework.cache.CacheTestUtils.assertCacheHit; -import static org.springframework.cache.CacheTestUtils.assertCacheMiss; +import static org.springframework.context.test.fixtures.cache.CacheTestUtils.assertCacheHit; +import static org.springframework.context.test.fixtures.cache.CacheTestUtils.assertCacheMiss; /** * Provides various {@link CacheResolver} customisations scenario diff --git a/spring-context/src/test/java/org/springframework/cache/interceptor/CacheSyncFailureTests.java b/spring-context/src/test/java/org/springframework/cache/interceptor/CacheSyncFailureTests.java index 3bd47bd1fbe..cc5ffb06344 100644 --- a/spring-context/src/test/java/org/springframework/cache/interceptor/CacheSyncFailureTests.java +++ b/spring-context/src/test/java/org/springframework/cache/interceptor/CacheSyncFailureTests.java @@ -23,7 +23,6 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.springframework.cache.CacheManager; -import org.springframework.cache.CacheTestUtils; import org.springframework.cache.annotation.CacheEvict; import org.springframework.cache.annotation.Cacheable; import org.springframework.cache.annotation.Caching; @@ -33,6 +32,7 @@ import org.springframework.context.ConfigurableApplicationContext; import org.springframework.context.annotation.AnnotationConfigApplicationContext; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; +import org.springframework.context.test.fixtures.cache.CacheTestUtils; import static org.assertj.core.api.Assertions.assertThatIllegalStateException; diff --git a/spring-context/src/test/java/org/springframework/context/ACATester.java b/spring-context/src/test/java/org/springframework/context/ACATester.java deleted file mode 100644 index fb179bfe58e..00000000000 --- a/spring-context/src/test/java/org/springframework/context/ACATester.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2002-2012 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. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.context; - -import java.util.Locale; - -public class ACATester implements ApplicationContextAware { - - private ApplicationContext ac; - - @Override - public void setApplicationContext(ApplicationContext ctx) throws ApplicationContextException { - // check reinitialization - if (this.ac != null) { - throw new IllegalStateException("Already initialized"); - } - - // check message source availability - if (ctx != null) { - try { - ctx.getMessage("code1", null, Locale.getDefault()); - } - catch (NoSuchMessageException ex) { - // expected - } - } - - this.ac = ctx; - } - - public ApplicationContext getApplicationContext() { - return ac; - } - -} diff --git a/spring-context/src/test/java/org/springframework/context/BeanThatBroadcasts.java b/spring-context/src/test/java/org/springframework/context/BeanThatBroadcasts.java deleted file mode 100644 index d452c8123a3..00000000000 --- a/spring-context/src/test/java/org/springframework/context/BeanThatBroadcasts.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright 2002-2012 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. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.context; - -/** - * @author Juergen Hoeller - */ -public class BeanThatBroadcasts implements ApplicationContextAware { - - public ApplicationContext applicationContext; - - public int receivedCount; - - - @Override - public void setApplicationContext(ApplicationContext applicationContext) { - this.applicationContext = applicationContext; - if (applicationContext.getDisplayName().contains("listener")) { - applicationContext.getBean("listener"); - } - } - -} diff --git a/spring-context/src/test/java/org/springframework/context/LifecycleContextBean.java b/spring-context/src/test/java/org/springframework/context/LifecycleContextBean.java index 010c27acd95..c6e1fe0b194 100644 --- a/spring-context/src/test/java/org/springframework/context/LifecycleContextBean.java +++ b/spring-context/src/test/java/org/springframework/context/LifecycleContextBean.java @@ -18,7 +18,7 @@ package org.springframework.context; import org.springframework.beans.BeansException; import org.springframework.beans.factory.BeanFactory; -import org.springframework.tests.sample.beans.LifecycleBean; +import org.springframework.beans.test.fixtures.beans.LifecycleBean; /** * Simple bean to test ApplicationContext lifecycle methods for beans diff --git a/spring-context/src/test/java/org/springframework/context/TestListener.java b/spring-context/src/test/java/org/springframework/context/TestListener.java deleted file mode 100644 index bc8949f2700..00000000000 --- a/spring-context/src/test/java/org/springframework/context/TestListener.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2002-2012 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. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.context; - -/** - * Listener that maintains a global count of events. - * - * @author Rod Johnson - * @since January 21, 2001 - */ -public class TestListener implements ApplicationListener { - - private int eventCount; - - public int getEventCount() { - return eventCount; - } - - public void zeroCounter() { - eventCount = 0; - } - - @Override - public void onApplicationEvent(ApplicationEvent e) { - ++eventCount; - } - -} diff --git a/spring-context/src/test/java/org/springframework/context/annotation/AbstractCircularImportDetectionTests.java b/spring-context/src/test/java/org/springframework/context/annotation/AbstractCircularImportDetectionTests.java index bb33ca5b79d..3ad2a49c70a 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/AbstractCircularImportDetectionTests.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/AbstractCircularImportDetectionTests.java @@ -19,7 +19,7 @@ package org.springframework.context.annotation; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.parsing.BeanDefinitionParsingException; -import org.springframework.tests.sample.beans.TestBean; +import org.springframework.beans.test.fixtures.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-context/src/test/java/org/springframework/context/annotation/AnnotationProcessorPerformanceTests.java b/spring-context/src/test/java/org/springframework/context/annotation/AnnotationProcessorPerformanceTests.java index bf789c11205..128bd67f2d6 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/AnnotationProcessorPerformanceTests.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/AnnotationProcessorPerformanceTests.java @@ -33,11 +33,11 @@ import org.springframework.beans.factory.config.BeanDefinition; import org.springframework.beans.factory.config.RuntimeBeanReference; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.support.RootBeanDefinition; +import org.springframework.beans.test.fixtures.beans.ITestBean; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.context.support.GenericApplicationContext; import org.springframework.core.test.fixtures.Assume; import org.springframework.core.test.fixtures.EnabledForTestGroups; -import org.springframework.tests.sample.beans.ITestBean; -import org.springframework.tests.sample.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; import static org.springframework.core.test.fixtures.TestGroup.PERFORMANCE; diff --git a/spring-context/src/test/java/org/springframework/context/annotation/ClassPathBeanDefinitionScannerTests.java b/spring-context/src/test/java/org/springframework/context/annotation/ClassPathBeanDefinitionScannerTests.java index 22a2d8f2196..f569b9e252d 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/ClassPathBeanDefinitionScannerTests.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/ClassPathBeanDefinitionScannerTests.java @@ -31,13 +31,13 @@ import org.springframework.beans.factory.config.BeanDefinition; import org.springframework.beans.factory.support.BeanDefinitionRegistry; import org.springframework.beans.factory.support.RootBeanDefinition; import org.springframework.beans.factory.support.StaticListableBeanFactory; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.context.MessageSource; import org.springframework.context.annotation2.NamedStubDao2; import org.springframework.context.support.GenericApplicationContext; import org.springframework.core.type.filter.AnnotationTypeFilter; import org.springframework.core.type.filter.AssignableTypeFilter; import org.springframework.stereotype.Component; -import org.springframework.tests.sample.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; diff --git a/spring-context/src/test/java/org/springframework/context/annotation/ClassPathFactoryBeanDefinitionScannerTests.java b/spring-context/src/test/java/org/springframework/context/annotation/ClassPathFactoryBeanDefinitionScannerTests.java index c4c9101a0cd..b8cd73c5b04 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/ClassPathFactoryBeanDefinitionScannerTests.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/ClassPathFactoryBeanDefinitionScannerTests.java @@ -23,12 +23,12 @@ import org.springframework.aop.support.AopUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.beans.factory.support.RootBeanDefinition; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.context.annotation4.DependencyBean; import org.springframework.context.annotation4.FactoryMethodComponent; import org.springframework.context.support.AbstractApplicationContext; import org.springframework.context.support.GenericApplicationContext; -import org.springframework.tests.context.SimpleMapScope; -import org.springframework.tests.sample.beans.TestBean; +import org.springframework.context.test.fixtures.SimpleMapScope; import org.springframework.util.ClassUtils; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-context/src/test/java/org/springframework/context/annotation/ClassPathScanningCandidateComponentProviderTests.java b/spring-context/src/test/java/org/springframework/context/annotation/ClassPathScanningCandidateComponentProviderTests.java index bcef50b1279..949fbd356d1 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/ClassPathScanningCandidateComponentProviderTests.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/ClassPathScanningCandidateComponentProviderTests.java @@ -42,7 +42,7 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.AnnotatedGenericBeanDefinition; import org.springframework.beans.factory.config.BeanDefinition; -import org.springframework.context.index.CandidateComponentsTestClassLoader; +import org.springframework.context.test.fixtures.index.CandidateComponentsTestClassLoader; import org.springframework.core.env.ConfigurableEnvironment; import org.springframework.core.env.StandardEnvironment; import org.springframework.core.io.ClassPathResource; diff --git a/spring-context/src/test/java/org/springframework/context/annotation/CommonAnnotationBeanPostProcessorTests.java b/spring-context/src/test/java/org/springframework/context/annotation/CommonAnnotationBeanPostProcessorTests.java index 96b9d1f7874..405aa16ccbc 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/CommonAnnotationBeanPostProcessorTests.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/CommonAnnotationBeanPostProcessorTests.java @@ -36,14 +36,14 @@ import org.springframework.beans.factory.config.DestructionAwareBeanPostProcesso import org.springframework.beans.factory.config.PropertyPlaceholderConfigurer; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.support.RootBeanDefinition; +import org.springframework.beans.test.fixtures.beans.INestedTestBean; +import org.springframework.beans.test.fixtures.beans.ITestBean; +import org.springframework.beans.test.fixtures.beans.NestedTestBean; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.context.support.GenericApplicationContext; +import org.springframework.context.test.fixtures.jndi.ExpectedLookupTemplate; import org.springframework.core.test.fixtures.io.SerializationTestUtils; import org.springframework.jndi.support.SimpleJndiBeanFactory; -import org.springframework.tests.mock.jndi.ExpectedLookupTemplate; -import org.springframework.tests.sample.beans.INestedTestBean; -import org.springframework.tests.sample.beans.ITestBean; -import org.springframework.tests.sample.beans.NestedTestBean; -import org.springframework.tests.sample.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-context/src/test/java/org/springframework/context/annotation/ComponentScanAnnotationIntegrationTests.java b/spring-context/src/test/java/org/springframework/context/annotation/ComponentScanAnnotationIntegrationTests.java index 4f13113e52f..441ca88cd0d 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/ComponentScanAnnotationIntegrationTests.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/ComponentScanAnnotationIntegrationTests.java @@ -51,6 +51,7 @@ import org.springframework.context.annotation.ComponentScanParserTests.KustomAnn import org.springframework.context.annotation.componentscan.simple.ClassWithNestedComponents; import org.springframework.context.annotation.componentscan.simple.SimpleComponent; import org.springframework.context.support.GenericApplicationContext; +import org.springframework.context.test.fixtures.SimpleMapScope; import org.springframework.core.env.ConfigurableEnvironment; import org.springframework.core.env.Environment; import org.springframework.core.env.Profiles; @@ -59,7 +60,6 @@ import org.springframework.core.test.fixtures.io.SerializationTestUtils; import org.springframework.core.type.classreading.MetadataReader; import org.springframework.core.type.classreading.MetadataReaderFactory; import org.springframework.core.type.filter.TypeFilter; -import org.springframework.tests.context.SimpleMapScope; import static org.assertj.core.api.Assertions.assertThat; import static org.springframework.beans.factory.support.BeanDefinitionBuilder.genericBeanDefinition; diff --git a/spring-context/src/test/java/org/springframework/context/annotation/ComponentScanParserScopedProxyTests.java b/spring-context/src/test/java/org/springframework/context/annotation/ComponentScanParserScopedProxyTests.java index 4c3f6baef11..4b163056601 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/ComponentScanParserScopedProxyTests.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/ComponentScanParserScopedProxyTests.java @@ -23,8 +23,8 @@ import org.junit.jupiter.api.Test; import org.springframework.aop.support.AopUtils; import org.springframework.beans.factory.parsing.BeanDefinitionParsingException; import org.springframework.context.support.ClassPathXmlApplicationContext; +import org.springframework.context.test.fixtures.SimpleMapScope; import org.springframework.core.test.fixtures.io.SerializationTestUtils; -import org.springframework.tests.context.SimpleMapScope; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; diff --git a/spring-context/src/test/java/org/springframework/context/annotation/ConfigurationClassAndBFPPTests.java b/spring-context/src/test/java/org/springframework/context/annotation/ConfigurationClassAndBFPPTests.java index 4b9d0c993e4..4eb979370fe 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/ConfigurationClassAndBFPPTests.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/ConfigurationClassAndBFPPTests.java @@ -22,7 +22,7 @@ import org.springframework.beans.BeansException; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.config.BeanFactoryPostProcessor; import org.springframework.beans.factory.config.ConfigurableListableBeanFactory; -import org.springframework.tests.sample.beans.TestBean; +import org.springframework.beans.test.fixtures.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-context/src/test/java/org/springframework/context/annotation/ConfigurationClassPostConstructAndAutowiringTests.java b/spring-context/src/test/java/org/springframework/context/annotation/ConfigurationClassPostConstructAndAutowiringTests.java index 9888d8895b1..5d8fe0c6e1f 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/ConfigurationClassPostConstructAndAutowiringTests.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/ConfigurationClassPostConstructAndAutowiringTests.java @@ -21,7 +21,7 @@ import javax.annotation.PostConstruct; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.tests.sample.beans.TestBean; +import org.springframework.beans.test.fixtures.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-context/src/test/java/org/springframework/context/annotation/ConfigurationClassPostProcessorTests.java b/spring-context/src/test/java/org/springframework/context/annotation/ConfigurationClassPostProcessorTests.java index cacdc161af9..f6ac667ba90 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/ConfigurationClassPostProcessorTests.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/ConfigurationClassPostProcessorTests.java @@ -53,6 +53,8 @@ import org.springframework.beans.factory.support.BeanDefinitionRegistryPostProce import org.springframework.beans.factory.support.ChildBeanDefinition; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.support.RootBeanDefinition; +import org.springframework.beans.test.fixtures.beans.ITestBean; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.context.ApplicationContext; import org.springframework.context.annotation.componentscan.simple.SimpleComponent; import org.springframework.core.ResolvableType; @@ -61,8 +63,6 @@ import org.springframework.core.env.ConfigurableEnvironment; import org.springframework.core.env.StandardEnvironment; import org.springframework.core.io.DescriptiveResource; import org.springframework.stereotype.Component; -import org.springframework.tests.sample.beans.ITestBean; -import org.springframework.tests.sample.beans.TestBean; import org.springframework.util.Assert; import org.springframework.util.ObjectUtils; diff --git a/spring-context/src/test/java/org/springframework/context/annotation/FooServiceDependentConverter.java b/spring-context/src/test/java/org/springframework/context/annotation/FooServiceDependentConverter.java index 318d3463c71..b2f5d054444 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/FooServiceDependentConverter.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/FooServiceDependentConverter.java @@ -23,7 +23,7 @@ import org.springframework.core.convert.converter.Converter; /** * @author Juergen Hoeller */ -public class FooServiceDependentConverter implements Converter { +public class FooServiceDependentConverter implements Converter { @SuppressWarnings("unused") private FooService fooService; @@ -33,8 +33,8 @@ public class FooServiceDependentConverter implements Converter { + public static class FactoryBeanTestListener extends TestApplicationListener implements FactoryBean { @Override public Object getObject() { diff --git a/spring-context/src/test/java/org/springframework/context/expression/ApplicationContextExpressionTests.java b/spring-context/src/test/java/org/springframework/context/expression/ApplicationContextExpressionTests.java index 0c1e65b76f8..598c1a0c863 100644 --- a/spring-context/src/test/java/org/springframework/context/expression/ApplicationContextExpressionTests.java +++ b/spring-context/src/test/java/org/springframework/context/expression/ApplicationContextExpressionTests.java @@ -43,6 +43,7 @@ import org.springframework.beans.factory.support.AutowireCandidateQualifier; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.support.GenericBeanDefinition; import org.springframework.beans.factory.support.RootBeanDefinition; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.context.annotation.AnnotationConfigApplicationContext; import org.springframework.context.annotation.AnnotationConfigUtils; import org.springframework.context.support.GenericApplicationContext; @@ -54,7 +55,6 @@ import org.springframework.core.io.support.EncodedResource; import org.springframework.core.test.fixtures.Assume; import org.springframework.core.test.fixtures.EnabledForTestGroups; import org.springframework.core.test.fixtures.io.SerializationTestUtils; -import org.springframework.tests.sample.beans.TestBean; import org.springframework.util.FileCopyUtils; import org.springframework.util.StopWatch; diff --git a/spring-context/src/test/java/org/springframework/context/expression/EnvironmentAccessorIntegrationTests.java b/spring-context/src/test/java/org/springframework/context/expression/EnvironmentAccessorIntegrationTests.java index a68066125eb..8db30517da0 100644 --- a/spring-context/src/test/java/org/springframework/context/expression/EnvironmentAccessorIntegrationTests.java +++ b/spring-context/src/test/java/org/springframework/context/expression/EnvironmentAccessorIntegrationTests.java @@ -19,10 +19,10 @@ package org.springframework.context.expression; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.support.DefaultListableBeanFactory; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.context.support.AbstractApplicationContext; import org.springframework.context.support.GenericApplicationContext; import org.springframework.core.test.fixtures.env.MockPropertySource; -import org.springframework.tests.sample.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; import static org.springframework.beans.factory.support.BeanDefinitionBuilder.genericBeanDefinition; diff --git a/spring-context/src/test/java/org/springframework/context/index/CandidateComponentsIndexLoaderTests.java b/spring-context/src/test/java/org/springframework/context/index/CandidateComponentsIndexLoaderTests.java index dc5798a3b50..402dc3cdb77 100644 --- a/spring-context/src/test/java/org/springframework/context/index/CandidateComponentsIndexLoaderTests.java +++ b/spring-context/src/test/java/org/springframework/context/index/CandidateComponentsIndexLoaderTests.java @@ -21,6 +21,7 @@ import java.util.Set; import org.junit.jupiter.api.Test; +import org.springframework.context.test.fixtures.index.CandidateComponentsTestClassLoader; import org.springframework.core.io.ClassPathResource; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-context/src/test/java/org/springframework/context/support/BeanFactoryPostProcessorTests.java b/spring-context/src/test/java/org/springframework/context/support/BeanFactoryPostProcessorTests.java index 2976825d6d9..d17406dec44 100644 --- a/spring-context/src/test/java/org/springframework/context/support/BeanFactoryPostProcessorTests.java +++ b/spring-context/src/test/java/org/springframework/context/support/BeanFactoryPostProcessorTests.java @@ -27,13 +27,13 @@ import org.springframework.beans.factory.support.BeanDefinitionRegistry; import org.springframework.beans.factory.support.BeanDefinitionRegistryPostProcessor; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.support.RootBeanDefinition; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationEvent; import org.springframework.context.ApplicationListener; import org.springframework.context.event.ContextRefreshedEvent; import org.springframework.core.Ordered; import org.springframework.core.PriorityOrdered; -import org.springframework.tests.sample.beans.TestBean; import org.springframework.util.Assert; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-context/src/test/java/org/springframework/context/support/PropertyResourceConfigurerIntegrationTests.java b/spring-context/src/test/java/org/springframework/context/support/PropertyResourceConfigurerIntegrationTests.java index 0cc659c5114..47cabda4f51 100644 --- a/spring-context/src/test/java/org/springframework/context/support/PropertyResourceConfigurerIntegrationTests.java +++ b/spring-context/src/test/java/org/springframework/context/support/PropertyResourceConfigurerIntegrationTests.java @@ -26,8 +26,8 @@ import org.springframework.beans.factory.BeanInitializationException; import org.springframework.beans.factory.config.PropertyPlaceholderConfigurer; import org.springframework.beans.factory.config.PropertyResourceConfigurer; import org.springframework.beans.factory.config.RuntimeBeanReference; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.context.ApplicationContext; -import org.springframework.tests.sample.beans.TestBean; import org.springframework.util.StringUtils; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-context/src/test/java/org/springframework/context/support/PropertySourcesPlaceholderConfigurerTests.java b/spring-context/src/test/java/org/springframework/context/support/PropertySourcesPlaceholderConfigurerTests.java index fb1f12ac195..bc71706e11f 100644 --- a/spring-context/src/test/java/org/springframework/context/support/PropertySourcesPlaceholderConfigurerTests.java +++ b/spring-context/src/test/java/org/springframework/context/support/PropertySourcesPlaceholderConfigurerTests.java @@ -23,6 +23,7 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.factory.BeanDefinitionStoreException; import org.springframework.beans.factory.support.DefaultListableBeanFactory; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.core.convert.support.DefaultConversionService; import org.springframework.core.env.MutablePropertySources; import org.springframework.core.env.PropertySource; @@ -31,7 +32,6 @@ import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.Resource; import org.springframework.core.test.fixtures.env.MockPropertySource; import org.springframework.mock.env.MockEnvironment; -import org.springframework.tests.sample.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; diff --git a/spring-context/src/test/java/org/springframework/context/support/SimpleThreadScopeTests.java b/spring-context/src/test/java/org/springframework/context/support/SimpleThreadScopeTests.java index f1e0c9cc312..2dfc95a76a3 100644 --- a/spring-context/src/test/java/org/springframework/context/support/SimpleThreadScopeTests.java +++ b/spring-context/src/test/java/org/springframework/context/support/SimpleThreadScopeTests.java @@ -21,8 +21,8 @@ import java.util.concurrent.TimeUnit; import org.awaitility.Awaitility; import org.junit.jupiter.api.Test; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.context.ApplicationContext; -import org.springframework.tests.sample.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-context/src/test/java/org/springframework/context/support/StaticApplicationContextMulticasterTests.java b/spring-context/src/test/java/org/springframework/context/support/StaticApplicationContextMulticasterTests.java index aa4b7d25fce..9eda916bce5 100644 --- a/spring-context/src/test/java/org/springframework/context/support/StaticApplicationContextMulticasterTests.java +++ b/spring-context/src/test/java/org/springframework/context/support/StaticApplicationContextMulticasterTests.java @@ -24,18 +24,18 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.MutablePropertyValues; import org.springframework.beans.factory.support.PropertiesBeanDefinitionReader; -import org.springframework.context.ACATester; -import org.springframework.context.AbstractApplicationContextTests; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.context.ApplicationEvent; -import org.springframework.context.BeanThatListens; import org.springframework.context.ConfigurableApplicationContext; import org.springframework.context.event.SimpleApplicationEventMulticaster; +import org.springframework.context.test.fixtures.AbstractApplicationContextTests; +import org.springframework.context.test.fixtures.beans.ACATester; +import org.springframework.context.test.fixtures.beans.BeanThatListens; import org.springframework.core.ResolvableType; import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.Resource; import org.springframework.core.io.support.EncodedResource; import org.springframework.lang.Nullable; -import org.springframework.tests.sample.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-context/src/test/java/org/springframework/context/support/StaticApplicationContextTests.java b/spring-context/src/test/java/org/springframework/context/support/StaticApplicationContextTests.java index 5a525c90fc7..16562fec9a4 100644 --- a/spring-context/src/test/java/org/springframework/context/support/StaticApplicationContextTests.java +++ b/spring-context/src/test/java/org/springframework/context/support/StaticApplicationContextTests.java @@ -24,12 +24,12 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.MutablePropertyValues; import org.springframework.beans.factory.support.PropertiesBeanDefinitionReader; -import org.springframework.context.ACATester; -import org.springframework.context.AbstractApplicationContextTests; -import org.springframework.context.BeanThatListens; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.context.ConfigurableApplicationContext; +import org.springframework.context.test.fixtures.AbstractApplicationContextTests; +import org.springframework.context.test.fixtures.beans.ACATester; +import org.springframework.context.test.fixtures.beans.BeanThatListens; import org.springframework.core.io.ClassPathResource; -import org.springframework.tests.sample.beans.TestBean; /** * Tests for static application context. diff --git a/spring-context/src/test/java/org/springframework/context/support/StaticMessageSourceTests.java b/spring-context/src/test/java/org/springframework/context/support/StaticMessageSourceTests.java index ca5b1bf675a..d002ff50519 100644 --- a/spring-context/src/test/java/org/springframework/context/support/StaticMessageSourceTests.java +++ b/spring-context/src/test/java/org/springframework/context/support/StaticMessageSourceTests.java @@ -26,12 +26,12 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.MutablePropertyValues; import org.springframework.beans.factory.support.PropertiesBeanDefinitionReader; -import org.springframework.context.ACATester; -import org.springframework.context.AbstractApplicationContextTests; -import org.springframework.context.BeanThatListens; import org.springframework.context.ConfigurableApplicationContext; import org.springframework.context.MessageSourceResolvable; import org.springframework.context.NoSuchMessageException; +import org.springframework.context.test.fixtures.AbstractApplicationContextTests; +import org.springframework.context.test.fixtures.beans.ACATester; +import org.springframework.context.test.fixtures.beans.BeanThatListens; import org.springframework.core.io.ClassPathResource; import static org.assertj.core.api.Assertions.assertThat; @@ -182,9 +182,9 @@ public class StaticMessageSourceTests extends AbstractApplicationContextTests { Map m = new HashMap<>(); m.put("name", "Roderick"); - parent.registerPrototype("rod", org.springframework.tests.sample.beans.TestBean.class, new MutablePropertyValues(m)); + parent.registerPrototype("rod", org.springframework.beans.test.fixtures.beans.TestBean.class, new MutablePropertyValues(m)); m.put("name", "Albert"); - parent.registerPrototype("father", org.springframework.tests.sample.beans.TestBean.class, new MutablePropertyValues(m)); + parent.registerPrototype("father", org.springframework.beans.test.fixtures.beans.TestBean.class, new MutablePropertyValues(m)); parent.refresh(); parent.addApplicationListener(parentListener); diff --git a/spring-context/src/test/java/org/springframework/ejb/config/JeeNamespaceHandlerEventTests.java b/spring-context/src/test/java/org/springframework/ejb/config/JeeNamespaceHandlerEventTests.java index 750ba274968..214f1b53163 100644 --- a/spring-context/src/test/java/org/springframework/ejb/config/JeeNamespaceHandlerEventTests.java +++ b/spring-context/src/test/java/org/springframework/ejb/config/JeeNamespaceHandlerEventTests.java @@ -23,8 +23,8 @@ import org.springframework.beans.factory.parsing.BeanComponentDefinition; import org.springframework.beans.factory.parsing.ComponentDefinition; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; +import org.springframework.beans.test.fixtures.beans.CollectingReaderEventListener; import org.springframework.core.io.ClassPathResource; -import org.springframework.tests.beans.CollectingReaderEventListener; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-context/src/test/java/org/springframework/ejb/config/JeeNamespaceHandlerTests.java b/spring-context/src/test/java/org/springframework/ejb/config/JeeNamespaceHandlerTests.java index 0922393a8ce..ac91f812a0e 100644 --- a/spring-context/src/test/java/org/springframework/ejb/config/JeeNamespaceHandlerTests.java +++ b/spring-context/src/test/java/org/springframework/ejb/config/JeeNamespaceHandlerTests.java @@ -23,12 +23,12 @@ import org.springframework.beans.factory.config.BeanDefinition; import org.springframework.beans.factory.config.ConfigurableListableBeanFactory; import org.springframework.beans.factory.config.RuntimeBeanReference; import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; +import org.springframework.beans.test.fixtures.beans.ITestBean; import org.springframework.context.support.GenericApplicationContext; import org.springframework.core.io.ClassPathResource; import org.springframework.ejb.access.LocalStatelessSessionProxyFactoryBean; import org.springframework.ejb.access.SimpleRemoteStatelessSessionProxyFactoryBean; import org.springframework.jndi.JndiObjectFactoryBean; -import org.springframework.tests.sample.beans.ITestBean; import static org.assertj.core.api.Assertions.assertThat; @@ -126,7 +126,7 @@ public class JeeNamespaceHandlerTests { assertPropertyValue(beanDefinition, "lookupHomeOnStartup", "true"); assertPropertyValue(beanDefinition, "resourceRef", "true"); assertPropertyValue(beanDefinition, "jndiEnvironment", "foo=bar"); - assertPropertyValue(beanDefinition, "homeInterface", "org.springframework.tests.sample.beans.ITestBean"); + assertPropertyValue(beanDefinition, "homeInterface", "org.springframework.beans.test.fixtures.beans.ITestBean"); assertPropertyValue(beanDefinition, "refreshHomeOnConnectFailure", "true"); assertPropertyValue(beanDefinition, "cacheSessionBean", "true"); } diff --git a/spring-context/src/test/java/org/springframework/jmx/export/MBeanExporterTests.java b/spring-context/src/test/java/org/springframework/jmx/export/MBeanExporterTests.java index bca575d460e..c743b5d7f71 100644 --- a/spring-context/src/test/java/org/springframework/jmx/export/MBeanExporterTests.java +++ b/spring-context/src/test/java/org/springframework/jmx/export/MBeanExporterTests.java @@ -42,6 +42,7 @@ import org.springframework.beans.factory.FactoryBean; import org.springframework.beans.factory.support.BeanDefinitionBuilder; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.support.RootBeanDefinition; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.context.ConfigurableApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; import org.springframework.jmx.AbstractMBeanServerTests; @@ -54,7 +55,6 @@ import org.springframework.jmx.export.naming.SelfNaming; import org.springframework.jmx.support.ObjectNameManager; import org.springframework.jmx.support.RegistrationPolicy; import org.springframework.tests.aop.interceptor.NopInterceptor; -import org.springframework.tests.sample.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; diff --git a/spring-context/src/test/java/org/springframework/jndi/JndiObjectFactoryBeanTests.java b/spring-context/src/test/java/org/springframework/jndi/JndiObjectFactoryBeanTests.java index 0483dd68243..368b7b68ac7 100644 --- a/spring-context/src/test/java/org/springframework/jndi/JndiObjectFactoryBeanTests.java +++ b/spring-context/src/test/java/org/springframework/jndi/JndiObjectFactoryBeanTests.java @@ -22,10 +22,10 @@ import javax.naming.NamingException; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.support.DefaultListableBeanFactory; -import org.springframework.tests.mock.jndi.ExpectedLookupTemplate; -import org.springframework.tests.sample.beans.DerivedTestBean; -import org.springframework.tests.sample.beans.ITestBean; -import org.springframework.tests.sample.beans.TestBean; +import org.springframework.beans.test.fixtures.beans.DerivedTestBean; +import org.springframework.beans.test.fixtures.beans.ITestBean; +import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.context.test.fixtures.jndi.ExpectedLookupTemplate; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; @@ -365,7 +365,7 @@ public class JndiObjectFactoryBeanTests { jof.setProxyInterface(ITestBean.class); assertThatExceptionOfType(NamingException.class).isThrownBy( jof::afterPropertiesSet) - .withMessageContaining("org.springframework.tests.sample.beans.DerivedTestBean"); + .withMessageContaining("org.springframework.beans.test.fixtures.beans.DerivedTestBean"); } @Test diff --git a/spring-context/src/test/java/org/springframework/jndi/JndiPropertySourceTests.java b/spring-context/src/test/java/org/springframework/jndi/JndiPropertySourceTests.java index 9ea45ecefce..e2e55593ba5 100644 --- a/spring-context/src/test/java/org/springframework/jndi/JndiPropertySourceTests.java +++ b/spring-context/src/test/java/org/springframework/jndi/JndiPropertySourceTests.java @@ -21,7 +21,7 @@ import javax.naming.NamingException; import org.junit.jupiter.api.Test; -import org.springframework.tests.mock.jndi.SimpleNamingContext; +import org.springframework.context.test.fixtures.jndi.SimpleNamingContext; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-context/src/test/java/org/springframework/scripting/ContextScriptBean.java b/spring-context/src/test/java/org/springframework/scripting/ContextScriptBean.java index 19fbabcdf58..b811e3a8293 100644 --- a/spring-context/src/test/java/org/springframework/scripting/ContextScriptBean.java +++ b/spring-context/src/test/java/org/springframework/scripting/ContextScriptBean.java @@ -16,8 +16,8 @@ package org.springframework.scripting; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.context.ApplicationContext; -import org.springframework.tests.sample.beans.TestBean; /** * @author Juergen Hoeller diff --git a/spring-context/src/test/java/org/springframework/scripting/TestBeanAwareMessenger.java b/spring-context/src/test/java/org/springframework/scripting/TestBeanAwareMessenger.java index f5298f8ae71..94a5492a9da 100644 --- a/spring-context/src/test/java/org/springframework/scripting/TestBeanAwareMessenger.java +++ b/spring-context/src/test/java/org/springframework/scripting/TestBeanAwareMessenger.java @@ -16,7 +16,7 @@ package org.springframework.scripting; -import org.springframework.tests.sample.beans.TestBean; +import org.springframework.beans.test.fixtures.beans.TestBean; /** * @author Juergen Hoeller diff --git a/spring-context/src/test/java/org/springframework/scripting/bsh/BshScriptFactoryTests.java b/spring-context/src/test/java/org/springframework/scripting/bsh/BshScriptFactoryTests.java index 108db8c817e..088c1b55399 100644 --- a/spring-context/src/test/java/org/springframework/scripting/bsh/BshScriptFactoryTests.java +++ b/spring-context/src/test/java/org/springframework/scripting/bsh/BshScriptFactoryTests.java @@ -24,6 +24,7 @@ import org.junit.jupiter.api.Test; import org.springframework.aop.support.AopUtils; import org.springframework.aop.target.dynamic.Refreshable; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationEvent; import org.springframework.context.support.ClassPathXmlApplicationContext; @@ -35,7 +36,6 @@ import org.springframework.scripting.ScriptCompilationException; import org.springframework.scripting.ScriptSource; import org.springframework.scripting.TestBeanAwareMessenger; import org.springframework.scripting.support.ScriptFactoryPostProcessor; -import org.springframework.tests.sample.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; diff --git a/spring-context/src/test/java/org/springframework/scripting/groovy/GroovyScriptFactoryTests.java b/spring-context/src/test/java/org/springframework/scripting/groovy/GroovyScriptFactoryTests.java index 6f2df78bdd5..66e18acce54 100644 --- a/spring-context/src/test/java/org/springframework/scripting/groovy/GroovyScriptFactoryTests.java +++ b/spring-context/src/test/java/org/springframework/scripting/groovy/GroovyScriptFactoryTests.java @@ -29,6 +29,7 @@ import org.springframework.aop.target.dynamic.Refreshable; import org.springframework.beans.factory.BeanCreationException; import org.springframework.beans.factory.FactoryBean; import org.springframework.beans.factory.config.BeanDefinition; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; import org.springframework.core.NestedRuntimeException; @@ -42,7 +43,6 @@ import org.springframework.scripting.ScriptCompilationException; import org.springframework.scripting.ScriptSource; import org.springframework.scripting.support.ScriptFactoryPostProcessor; import org.springframework.stereotype.Component; -import org.springframework.tests.sample.beans.TestBean; import org.springframework.util.ObjectUtils; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-context/src/test/java/org/springframework/tests/context/TestMethodInvokingTask.java b/spring-context/src/test/java/org/springframework/tests/context/TestMethodInvokingTask.java deleted file mode 100644 index f5c8085d93b..00000000000 --- a/spring-context/src/test/java/org/springframework/tests/context/TestMethodInvokingTask.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright 2002-2018 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. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.tests.context; - -/** - * @author Juergen Hoeller - * @since 09.10.2004 - */ -public class TestMethodInvokingTask { - - public int counter = 0; - - private Object lock = new Object(); - - public void doSomething() { - this.counter++; - } - - public void doWait() { - this.counter++; - // wait until stop is called - synchronized (this.lock) { - try { - this.lock.wait(); - } - catch (InterruptedException e) { - // fall through - } - } - } - - public void stop() { - synchronized(this.lock) { - this.lock.notify(); - } - } - -} diff --git a/spring-context/src/test/java/org/springframework/tests/mock/jndi/package-info.java b/spring-context/src/test/java/org/springframework/tests/mock/jndi/package-info.java deleted file mode 100644 index baff7e5567d..00000000000 --- a/spring-context/src/test/java/org/springframework/tests/mock/jndi/package-info.java +++ /dev/null @@ -1,9 +0,0 @@ -/** - * The simplest implementation of the JNDI SPI that could possibly work. - * - *

Useful for setting up a simple JNDI environment for test suites - * or standalone applications. If e.g. JDBC DataSources get bound to the - * same JNDI names as within a Java EE container, both application code and - * configuration can me reused without changes. - */ -package org.springframework.tests.mock.jndi; diff --git a/spring-context/src/test/java/org/springframework/tests/sample/beans/FieldAccessBean.java b/spring-context/src/test/java/org/springframework/tests/sample/beans/FieldAccessBean.java index c58a8456849..c1453a0d045 100644 --- a/spring-context/src/test/java/org/springframework/tests/sample/beans/FieldAccessBean.java +++ b/spring-context/src/test/java/org/springframework/tests/sample/beans/FieldAccessBean.java @@ -16,6 +16,8 @@ package org.springframework.tests.sample.beans; +import org.springframework.beans.test.fixtures.beans.TestBean; + /** * @author Juergen Hoeller * @since 07.03.2006 diff --git a/spring-context/src/test/java/org/springframework/ui/ModelMapTests.java b/spring-context/src/test/java/org/springframework/ui/ModelMapTests.java index afa9fee847c..cee193825b8 100644 --- a/spring-context/src/test/java/org/springframework/ui/ModelMapTests.java +++ b/spring-context/src/test/java/org/springframework/ui/ModelMapTests.java @@ -30,7 +30,7 @@ import java.util.Map; import org.junit.jupiter.api.Test; import org.springframework.aop.framework.ProxyFactory; -import org.springframework.tests.sample.beans.TestBean; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.util.ClassUtils; import org.springframework.util.StringUtils; diff --git a/spring-context/src/test/java/org/springframework/validation/DataBinderFieldAccessTests.java b/spring-context/src/test/java/org/springframework/validation/DataBinderFieldAccessTests.java index 4603386af36..4f1a60ad675 100644 --- a/spring-context/src/test/java/org/springframework/validation/DataBinderFieldAccessTests.java +++ b/spring-context/src/test/java/org/springframework/validation/DataBinderFieldAccessTests.java @@ -25,8 +25,8 @@ import org.springframework.beans.MutablePropertyValues; import org.springframework.beans.NotWritablePropertyException; import org.springframework.beans.NullValueInNestedPathException; import org.springframework.beans.PropertyValue; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.tests.sample.beans.FieldAccessBean; -import org.springframework.tests.sample.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; diff --git a/spring-context/src/test/java/org/springframework/validation/DataBinderTests.java b/spring-context/src/test/java/org/springframework/validation/DataBinderTests.java index bccedfdb40a..0c6b8ba82e9 100644 --- a/spring-context/src/test/java/org/springframework/validation/DataBinderTests.java +++ b/spring-context/src/test/java/org/springframework/validation/DataBinderTests.java @@ -48,6 +48,11 @@ import org.springframework.beans.TypeMismatchException; import org.springframework.beans.propertyeditors.CustomCollectionEditor; import org.springframework.beans.propertyeditors.CustomNumberEditor; import org.springframework.beans.propertyeditors.StringTrimmerEditor; +import org.springframework.beans.test.fixtures.beans.DerivedTestBean; +import org.springframework.beans.test.fixtures.beans.ITestBean; +import org.springframework.beans.test.fixtures.beans.IndexedTestBean; +import org.springframework.beans.test.fixtures.beans.SerializablePerson; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.context.i18n.LocaleContextHolder; import org.springframework.context.support.ResourceBundleMessageSource; import org.springframework.context.support.StaticMessageSource; @@ -59,11 +64,6 @@ import org.springframework.format.support.DefaultFormattingConversionService; import org.springframework.format.support.FormattingConversionService; import org.springframework.lang.Nullable; import org.springframework.tests.sample.beans.BeanWithObjectProperty; -import org.springframework.tests.sample.beans.DerivedTestBean; -import org.springframework.tests.sample.beans.ITestBean; -import org.springframework.tests.sample.beans.IndexedTestBean; -import org.springframework.tests.sample.beans.SerializablePerson; -import org.springframework.tests.sample.beans.TestBean; import org.springframework.util.ObjectUtils; import org.springframework.util.StringUtils; @@ -1578,7 +1578,7 @@ public class DataBinderTests { assertThat(errors.getFieldError("array[0]").getCodes()[1]).isEqualTo("NOT_ROD.tb.array"); assertThat(errors.getFieldError("array[0]").getCodes()[2]).isEqualTo("NOT_ROD.array[0]"); assertThat(errors.getFieldError("array[0]").getCodes()[3]).isEqualTo("NOT_ROD.array"); - assertThat(errors.getFieldError("array[0]").getCodes()[4]).isEqualTo("NOT_ROD.org.springframework.tests.sample.beans.DerivedTestBean"); + assertThat(errors.getFieldError("array[0]").getCodes()[4]).isEqualTo("NOT_ROD.org.springframework.beans.test.fixtures.beans.DerivedTestBean"); assertThat(errors.getFieldError("array[0]").getCodes()[5]).isEqualTo("NOT_ROD"); assertThat(errors.getFieldValue("array[0]")).isEqualTo("arraya"); @@ -1588,7 +1588,7 @@ public class DataBinderTests { assertThat(errors.getFieldError("map[key1]").getCodes()[1]).isEqualTo("NOT_ROD.tb.map"); assertThat(errors.getFieldError("map[key1]").getCodes()[2]).isEqualTo("NOT_ROD.map[key1]"); assertThat(errors.getFieldError("map[key1]").getCodes()[3]).isEqualTo("NOT_ROD.map"); - assertThat(errors.getFieldError("map[key1]").getCodes()[4]).isEqualTo("NOT_ROD.org.springframework.tests.sample.beans.TestBean"); + assertThat(errors.getFieldError("map[key1]").getCodes()[4]).isEqualTo("NOT_ROD.org.springframework.beans.test.fixtures.beans.TestBean"); assertThat(errors.getFieldError("map[key1]").getCodes()[5]).isEqualTo("NOT_ROD"); assertThat(errors.getFieldErrorCount("map[key0]")).isEqualTo(1); @@ -1627,7 +1627,7 @@ public class DataBinderTests { assertThat(errors.getFieldError("map[key0]").getCodes()[3]).isEqualTo("NOT_NULL.map"); // This next code is only generated because of the registered editor, using the // registered type of the editor as guess for the content type of the collection. - assertThat(errors.getFieldError("map[key0]").getCodes()[4]).isEqualTo("NOT_NULL.org.springframework.tests.sample.beans.TestBean"); + assertThat(errors.getFieldError("map[key0]").getCodes()[4]).isEqualTo("NOT_NULL.org.springframework.beans.test.fixtures.beans.TestBean"); assertThat(errors.getFieldError("map[key0]").getCodes()[5]).isEqualTo("NOT_NULL"); } @@ -1658,7 +1658,7 @@ public class DataBinderTests { assertThat(errors.getFieldError("map[key0]").getCodes()[3]).isEqualTo("NOT_NULL.map"); // This next code is only generated because of the registered editor, using the // registered type of the editor as guess for the content type of the collection. - assertThat(errors.getFieldError("map[key0]").getCodes()[4]).isEqualTo("NOT_NULL.org.springframework.tests.sample.beans.TestBean"); + assertThat(errors.getFieldError("map[key0]").getCodes()[4]).isEqualTo("NOT_NULL.org.springframework.beans.test.fixtures.beans.TestBean"); assertThat(errors.getFieldError("map[key0]").getCodes()[5]).isEqualTo("NOT_NULL"); } @@ -1691,7 +1691,7 @@ public class DataBinderTests { assertThat(errors.getFieldError("array[0]").getCodes()[1]).isEqualTo("NOT_ROD.tb.array"); assertThat(errors.getFieldError("array[0]").getCodes()[2]).isEqualTo("NOT_ROD.array[0]"); assertThat(errors.getFieldError("array[0]").getCodes()[3]).isEqualTo("NOT_ROD.array"); - assertThat(errors.getFieldError("array[0]").getCodes()[4]).isEqualTo("NOT_ROD.org.springframework.tests.sample.beans.DerivedTestBean"); + assertThat(errors.getFieldError("array[0]").getCodes()[4]).isEqualTo("NOT_ROD.org.springframework.beans.test.fixtures.beans.DerivedTestBean"); assertThat(errors.getFieldError("array[0]").getCodes()[5]).isEqualTo("NOT_ROD"); assertThat(errors.getFieldValue("array[0]")).isEqualTo("arraya"); } diff --git a/spring-context/src/test/java/org/springframework/validation/DefaultMessageCodesResolverTests.java b/spring-context/src/test/java/org/springframework/validation/DefaultMessageCodesResolverTests.java index a2861ea039b..91b1e993575 100644 --- a/spring-context/src/test/java/org/springframework/validation/DefaultMessageCodesResolverTests.java +++ b/spring-context/src/test/java/org/springframework/validation/DefaultMessageCodesResolverTests.java @@ -18,14 +18,11 @@ package org.springframework.validation; import org.junit.jupiter.api.Test; -import org.springframework.tests.sample.beans.TestBean; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.validation.DefaultMessageCodesResolver.Format; import static org.assertj.core.api.Assertions.assertThat; - - - /** * Tests for {@link DefaultMessageCodesResolver}. * @@ -50,7 +47,7 @@ public class DefaultMessageCodesResolverTests { assertThat(codes).containsExactly( "errorCode.objectName.field", "errorCode.field", - "errorCode.org.springframework.tests.sample.beans.TestBean", + "errorCode.org.springframework.beans.test.fixtures.beans.TestBean", "errorCode"); } @@ -66,7 +63,7 @@ public class DefaultMessageCodesResolverTests { "errorCode.a.b[3].c.d", "errorCode.a.b.c.d", "errorCode.d", - "errorCode.org.springframework.tests.sample.beans.TestBean", + "errorCode.org.springframework.beans.test.fixtures.beans.TestBean", "errorCode"); } @@ -87,7 +84,7 @@ public class DefaultMessageCodesResolverTests { assertThat(codes).containsExactly( "prefix.errorCode.objectName.field", "prefix.errorCode.field", - "prefix.errorCode.org.springframework.tests.sample.beans.TestBean", + "prefix.errorCode.org.springframework.beans.test.fixtures.beans.TestBean", "prefix.errorCode"); } @@ -99,7 +96,7 @@ public class DefaultMessageCodesResolverTests { assertThat(codes).containsExactly( "errorCode.objectName.field", "errorCode.field", - "errorCode.org.springframework.tests.sample.beans.TestBean", + "errorCode.org.springframework.beans.test.fixtures.beans.TestBean", "errorCode"); } @@ -110,7 +107,7 @@ public class DefaultMessageCodesResolverTests { assertThat(codes).containsExactly( "errorCode.objectName.field[", "errorCode.field[", - "errorCode.org.springframework.tests.sample.beans.TestBean", + "errorCode.org.springframework.beans.test.fixtures.beans.TestBean", "errorCode"); } @@ -141,7 +138,7 @@ public class DefaultMessageCodesResolverTests { assertThat(codes).containsExactly( "objectName.field.errorCode", "field.errorCode", - "org.springframework.tests.sample.beans.TestBean.errorCode", + "org.springframework.beans.test.fixtures.beans.TestBean.errorCode", "errorCode"); } diff --git a/spring-context/src/test/java/org/springframework/validation/ValidationUtilsTests.java b/spring-context/src/test/java/org/springframework/validation/ValidationUtilsTests.java index 50cb35484fe..b7cf77ba620 100644 --- a/spring-context/src/test/java/org/springframework/validation/ValidationUtilsTests.java +++ b/spring-context/src/test/java/org/springframework/validation/ValidationUtilsTests.java @@ -18,8 +18,8 @@ package org.springframework.validation; import org.junit.jupiter.api.Test; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.lang.Nullable; -import org.springframework.tests.sample.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException; diff --git a/spring-context/src/test/java/org/springframework/validation/beanvalidation/BeanValidationPostProcessorTests.java b/spring-context/src/test/java/org/springframework/validation/beanvalidation/BeanValidationPostProcessorTests.java index b2828f40b10..57556388158 100644 --- a/spring-context/src/test/java/org/springframework/validation/beanvalidation/BeanValidationPostProcessorTests.java +++ b/spring-context/src/test/java/org/springframework/validation/beanvalidation/BeanValidationPostProcessorTests.java @@ -25,11 +25,11 @@ import org.junit.jupiter.api.Test; import org.springframework.aop.framework.autoproxy.DefaultAdvisorAutoProxyCreator; import org.springframework.beans.factory.BeanCreationException; import org.springframework.beans.factory.support.RootBeanDefinition; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.context.annotation.CommonAnnotationBeanPostProcessor; import org.springframework.context.support.GenericApplicationContext; import org.springframework.scheduling.annotation.Async; import org.springframework.scheduling.annotation.AsyncAnnotationAdvisor; -import org.springframework.tests.sample.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; diff --git a/spring-context/src/test/java/test/aspect/TwoAdviceAspect.java b/spring-context/src/test/java/test/aspect/TwoAdviceAspect.java index 5fc892938e6..a1426d6aafb 100644 --- a/spring-context/src/test/java/test/aspect/TwoAdviceAspect.java +++ b/spring-context/src/test/java/test/aspect/TwoAdviceAspect.java @@ -26,12 +26,12 @@ public class TwoAdviceAspect { private int totalCalls; - @Around("execution(* org.springframework.tests.sample.beans.ITestBean.age())") + @Around("execution(* org.springframework.beans.test.fixtures.beans.ITestBean.age())") public int returnCallCount(ProceedingJoinPoint pjp) throws Exception { return totalCalls; } - @Before("execution(* org.springframework.tests.sample.beans.ITestBean.setAge(int)) && args(newAge)") + @Before("execution(* org.springframework.beans.test.fixtures.beans.ITestBean.setAge(int)) && args(newAge)") public void countSet(int newAge) throws Exception { ++totalCalls; } diff --git a/spring-context/src/test/resources/org/springframework/aop/aspectj/AfterAdviceBindingTests.xml b/spring-context/src/test/resources/org/springframework/aop/aspectj/AfterAdviceBindingTests.xml index a3616c2df33..5ecde6ca491 100644 --- a/spring-context/src/test/resources/org/springframework/aop/aspectj/AfterAdviceBindingTests.xml +++ b/spring-context/src/test/resources/org/springframework/aop/aspectj/AfterAdviceBindingTests.xml @@ -19,6 +19,6 @@ - + diff --git a/spring-context/src/test/resources/org/springframework/aop/aspectj/AfterReturningAdviceBindingTests.xml b/spring-context/src/test/resources/org/springframework/aop/aspectj/AfterReturningAdviceBindingTests.xml index 214013f01af..5cc51680df5 100644 --- a/spring-context/src/test/resources/org/springframework/aop/aspectj/AfterReturningAdviceBindingTests.xml +++ b/spring-context/src/test/resources/org/springframework/aop/aspectj/AfterReturningAdviceBindingTests.xml @@ -18,7 +18,7 @@ + pointcut="execution(org.springframework.beans.test.fixtures.beans.ITestBean[] *(..))"/> @@ -30,6 +30,6 @@ - + diff --git a/spring-context/src/test/resources/org/springframework/aop/aspectj/AfterThrowingAdviceBindingTests.xml b/spring-context/src/test/resources/org/springframework/aop/aspectj/AfterThrowingAdviceBindingTests.xml index ad8a252f2b8..e665e035250 100644 --- a/spring-context/src/test/resources/org/springframework/aop/aspectj/AfterThrowingAdviceBindingTests.xml +++ b/spring-context/src/test/resources/org/springframework/aop/aspectj/AfterThrowingAdviceBindingTests.xml @@ -37,6 +37,6 @@ - + \ No newline at end of file diff --git a/spring-context/src/test/resources/org/springframework/aop/aspectj/AroundAdviceBindingTests.xml b/spring-context/src/test/resources/org/springframework/aop/aspectj/AroundAdviceBindingTests.xml index 20a1703e869..8e68af9d141 100644 --- a/spring-context/src/test/resources/org/springframework/aop/aspectj/AroundAdviceBindingTests.xml +++ b/spring-context/src/test/resources/org/springframework/aop/aspectj/AroundAdviceBindingTests.xml @@ -17,6 +17,6 @@ - + diff --git a/spring-context/src/test/resources/org/springframework/aop/aspectj/AroundAdviceCircularTests.xml b/spring-context/src/test/resources/org/springframework/aop/aspectj/AroundAdviceCircularTests.xml index 8ba7742ffa8..f410271d7b3 100644 --- a/spring-context/src/test/resources/org/springframework/aop/aspectj/AroundAdviceCircularTests.xml +++ b/spring-context/src/test/resources/org/springframework/aop/aspectj/AroundAdviceCircularTests.xml @@ -17,11 +17,11 @@ - + - + diff --git a/spring-context/src/test/resources/org/springframework/aop/aspectj/AspectAndAdvicePrecedenceTests.xml b/spring-context/src/test/resources/org/springframework/aop/aspectj/AspectAndAdvicePrecedenceTests.xml index bb299a67b4b..1b140f9632a 100644 --- a/spring-context/src/test/resources/org/springframework/aop/aspectj/AspectAndAdvicePrecedenceTests.xml +++ b/spring-context/src/test/resources/org/springframework/aop/aspectj/AspectAndAdvicePrecedenceTests.xml @@ -85,6 +85,6 @@ - + diff --git a/spring-context/src/test/resources/org/springframework/aop/aspectj/AspectJExpressionPointcutAdvisorTests.xml b/spring-context/src/test/resources/org/springframework/aop/aspectj/AspectJExpressionPointcutAdvisorTests.xml index 2c97c864362..baad9c68b56 100644 --- a/spring-context/src/test/resources/org/springframework/aop/aspectj/AspectJExpressionPointcutAdvisorTests.xml +++ b/spring-context/src/test/resources/org/springframework/aop/aspectj/AspectJExpressionPointcutAdvisorTests.xml @@ -5,11 +5,11 @@ - + + value="execution(org.springframework.beans.test.fixtures.beans.ITestBean[] org.springframework.beans.test.fixtures.beans.ITestBean.*(..))"/> diff --git a/spring-context/src/test/resources/org/springframework/aop/aspectj/BeanNamePointcutAtAspectTests.xml b/spring-context/src/test/resources/org/springframework/aop/aspectj/BeanNamePointcutAtAspectTests.xml index 4d6537107f7..2cfba0956be 100644 --- a/spring-context/src/test/resources/org/springframework/aop/aspectj/BeanNamePointcutAtAspectTests.xml +++ b/spring-context/src/test/resources/org/springframework/aop/aspectj/BeanNamePointcutAtAspectTests.xml @@ -7,9 +7,9 @@ - - - + + + diff --git a/spring-context/src/test/resources/org/springframework/aop/aspectj/BeanNamePointcutTests.xml b/spring-context/src/test/resources/org/springframework/aop/aspectj/BeanNamePointcutTests.xml index 0e653ebde60..9f41524e6d3 100644 --- a/spring-context/src/test/resources/org/springframework/aop/aspectj/BeanNamePointcutTests.xml +++ b/spring-context/src/test/resources/org/springframework/aop/aspectj/BeanNamePointcutTests.xml @@ -21,15 +21,15 @@ - + - + - + - + @@ -55,9 +55,9 @@ - + - + diff --git a/spring-context/src/test/resources/org/springframework/aop/aspectj/BeforeAdviceBindingTests.xml b/spring-context/src/test/resources/org/springframework/aop/aspectj/BeforeAdviceBindingTests.xml index 626fa5d4d16..19c4ce3bc8f 100644 --- a/spring-context/src/test/resources/org/springframework/aop/aspectj/BeforeAdviceBindingTests.xml +++ b/spring-context/src/test/resources/org/springframework/aop/aspectj/BeforeAdviceBindingTests.xml @@ -26,7 +26,7 @@ - + diff --git a/spring-context/src/test/resources/org/springframework/aop/aspectj/DeclareParentsTests.xml b/spring-context/src/test/resources/org/springframework/aop/aspectj/DeclareParentsTests.xml index c4c2e40b1a7..7f74e47c7cf 100644 --- a/spring-context/src/test/resources/org/springframework/aop/aspectj/DeclareParentsTests.xml +++ b/spring-context/src/test/resources/org/springframework/aop/aspectj/DeclareParentsTests.xml @@ -8,7 +8,7 @@ @@ -22,6 +22,6 @@ - + diff --git a/spring-context/src/test/resources/org/springframework/aop/aspectj/ImplicitJPArgumentMatchingAtAspectJTests.xml b/spring-context/src/test/resources/org/springframework/aop/aspectj/ImplicitJPArgumentMatchingAtAspectJTests.xml index 8c88ac24548..7c46bcce08e 100644 --- a/spring-context/src/test/resources/org/springframework/aop/aspectj/ImplicitJPArgumentMatchingAtAspectJTests.xml +++ b/spring-context/src/test/resources/org/springframework/aop/aspectj/ImplicitJPArgumentMatchingAtAspectJTests.xml @@ -5,7 +5,7 @@ xsi:schemaLocation="http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://www.springframework.org/schema/aop https://www.springframework.org/schema/aop/spring-aop-2.0.xsd"> - + diff --git a/spring-context/src/test/resources/org/springframework/aop/aspectj/ImplicitJPArgumentMatchingTests.xml b/spring-context/src/test/resources/org/springframework/aop/aspectj/ImplicitJPArgumentMatchingTests.xml index 32c1882cd45..ac966540837 100644 --- a/spring-context/src/test/resources/org/springframework/aop/aspectj/ImplicitJPArgumentMatchingTests.xml +++ b/spring-context/src/test/resources/org/springframework/aop/aspectj/ImplicitJPArgumentMatchingTests.xml @@ -8,12 +8,12 @@ + expression="execution(* org.springframework.beans.test.fixtures.beans.TestBean.*(..)) and this(bean) and args(argument)"/> - + diff --git a/spring-context/src/test/resources/org/springframework/aop/aspectj/OverloadedAdviceTests-ambiguous.xml b/spring-context/src/test/resources/org/springframework/aop/aspectj/OverloadedAdviceTests-ambiguous.xml index b23236c90c2..0b5aa6944cc 100644 --- a/spring-context/src/test/resources/org/springframework/aop/aspectj/OverloadedAdviceTests-ambiguous.xml +++ b/spring-context/src/test/resources/org/springframework/aop/aspectj/OverloadedAdviceTests-ambiguous.xml @@ -15,6 +15,6 @@ - + \ No newline at end of file diff --git a/spring-context/src/test/resources/org/springframework/aop/aspectj/OverloadedAdviceTests.xml b/spring-context/src/test/resources/org/springframework/aop/aspectj/OverloadedAdviceTests.xml index 9cc3ab152da..13e4f86a983 100644 --- a/spring-context/src/test/resources/org/springframework/aop/aspectj/OverloadedAdviceTests.xml +++ b/spring-context/src/test/resources/org/springframework/aop/aspectj/OverloadedAdviceTests.xml @@ -16,6 +16,6 @@ - + \ No newline at end of file diff --git a/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/AspectImplementingInterfaceTests-context.xml b/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/AspectImplementingInterfaceTests-context.xml index dd92fa2bb0f..002466ec29a 100644 --- a/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/AspectImplementingInterfaceTests-context.xml +++ b/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/AspectImplementingInterfaceTests-context.xml @@ -13,7 +13,7 @@ - + diff --git a/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests-aspects.xml b/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests-aspects.xml index 7f371a008c0..c6a0ff0a777 100644 --- a/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests-aspects.xml +++ b/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests-aspects.xml @@ -23,11 +23,11 @@ - + - + diff --git a/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests-aspectsPlusAdvisor.xml b/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests-aspectsPlusAdvisor.xml index ed1fb59f5fa..ecd344e78e9 100644 --- a/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests-aspectsPlusAdvisor.xml +++ b/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests-aspectsPlusAdvisor.xml @@ -9,17 +9,17 @@ - + - + - + diff --git a/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests-aspectsWithAbstractBean.xml b/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests-aspectsWithAbstractBean.xml index 7977bcbb436..be0cb20777a 100644 --- a/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests-aspectsWithAbstractBean.xml +++ b/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests-aspectsWithAbstractBean.xml @@ -19,7 +19,7 @@ - + diff --git a/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests-aspectsWithOrdering.xml b/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests-aspectsWithOrdering.xml index 72a43eda6ff..e29fb7e2854 100644 --- a/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests-aspectsWithOrdering.xml +++ b/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests-aspectsWithOrdering.xml @@ -17,7 +17,7 @@ - + diff --git a/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests-pertarget.xml b/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests-pertarget.xml index 3faa981e4f4..dc1f1bb0787 100644 --- a/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests-pertarget.xml +++ b/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests-pertarget.xml @@ -10,12 +10,12 @@ - + - + diff --git a/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests-perthis.xml b/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests-perthis.xml index 55e1b88daaf..eb7eed64d40 100644 --- a/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests-perthis.xml +++ b/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests-perthis.xml @@ -7,7 +7,7 @@ - + diff --git a/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests-twoAdviceAspect.xml b/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests-twoAdviceAspect.xml index 29ee403b6bb..f113cfe7169 100644 --- a/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests-twoAdviceAspect.xml +++ b/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests-twoAdviceAspect.xml @@ -9,7 +9,7 @@ - + diff --git a/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests-twoAdviceAspectPrototype.xml b/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests-twoAdviceAspectPrototype.xml index 096c69852ee..d2064c69863 100644 --- a/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests-twoAdviceAspectPrototype.xml +++ b/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests-twoAdviceAspectPrototype.xml @@ -7,7 +7,7 @@ - + diff --git a/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests-twoAdviceAspectSingleton.xml b/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests-twoAdviceAspectSingleton.xml index 11f5a3d99fa..9df7f552b09 100644 --- a/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests-twoAdviceAspectSingleton.xml +++ b/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests-twoAdviceAspectSingleton.xml @@ -7,7 +7,7 @@ - + diff --git a/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests-usesInclude.xml b/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests-usesInclude.xml index fe8a05b633d..5d804f663a0 100644 --- a/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests-usesInclude.xml +++ b/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests-usesInclude.xml @@ -18,7 +18,7 @@ - + diff --git a/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests-usesJoinPointAspect.xml b/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests-usesJoinPointAspect.xml index 0acc4a49ab4..9b3669425e5 100644 --- a/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests-usesJoinPointAspect.xml +++ b/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests-usesJoinPointAspect.xml @@ -7,7 +7,7 @@ - + diff --git a/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/AtAspectJAfterThrowingTests-context.xml b/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/AtAspectJAfterThrowingTests-context.xml index 2a557ee717b..50415ee7377 100644 --- a/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/AtAspectJAfterThrowingTests-context.xml +++ b/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/AtAspectJAfterThrowingTests-context.xml @@ -5,7 +5,7 @@ - + diff --git a/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/benchmark/BenchmarkTests-aspectj.xml b/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/benchmark/BenchmarkTests-aspectj.xml index 47cdc5856d7..231c290f60e 100644 --- a/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/benchmark/BenchmarkTests-aspectj.xml +++ b/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/benchmark/BenchmarkTests-aspectj.xml @@ -22,7 +22,7 @@ class="org.springframework.aop.aspectj.autoproxy.benchmark.TraceAspect" > - + diff --git a/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/benchmark/BenchmarkTests-springAop.xml b/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/benchmark/BenchmarkTests-springAop.xml index de10c8c7731..486d65bfc52 100644 --- a/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/benchmark/BenchmarkTests-springAop.xml +++ b/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/benchmark/BenchmarkTests-springAop.xml @@ -31,7 +31,7 @@ - + diff --git a/spring-context/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerAdviceTypeTests-error.xml b/spring-context/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerAdviceTypeTests-error.xml index 15ec7150b40..c3358ad7bfb 100644 --- a/spring-context/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerAdviceTypeTests-error.xml +++ b/spring-context/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerAdviceTypeTests-error.xml @@ -19,7 +19,7 @@ - + diff --git a/spring-context/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerAdviceTypeTests-ok.xml b/spring-context/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerAdviceTypeTests-ok.xml index 6865c0d4611..b9f74dac0c9 100644 --- a/spring-context/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerAdviceTypeTests-ok.xml +++ b/spring-context/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerAdviceTypeTests-ok.xml @@ -20,7 +20,7 @@ - + diff --git a/spring-context/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerArgNamesTests-error.xml b/spring-context/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerArgNamesTests-error.xml index d2feb4cd1b0..dcbc2f7e181 100644 --- a/spring-context/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerArgNamesTests-error.xml +++ b/spring-context/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerArgNamesTests-error.xml @@ -16,7 +16,7 @@ - + diff --git a/spring-context/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerArgNamesTests-ok.xml b/spring-context/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerArgNamesTests-ok.xml index a165115b462..b6fbab330c9 100644 --- a/spring-context/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerArgNamesTests-ok.xml +++ b/spring-context/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerArgNamesTests-ok.xml @@ -16,7 +16,7 @@ - + diff --git a/spring-context/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerProxyTargetClassTests-context.xml b/spring-context/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerProxyTargetClassTests-context.xml index ef6dab39ecb..83a496efa5b 100644 --- a/spring-context/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerProxyTargetClassTests-context.xml +++ b/spring-context/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerProxyTargetClassTests-context.xml @@ -23,7 +23,7 @@ - + diff --git a/spring-context/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerReturningTests-error.xml b/spring-context/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerReturningTests-error.xml index 47a168f1aa7..aff7923afb0 100644 --- a/spring-context/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerReturningTests-error.xml +++ b/spring-context/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerReturningTests-error.xml @@ -15,7 +15,7 @@ - + diff --git a/spring-context/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerReturningTests-ok.xml b/spring-context/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerReturningTests-ok.xml index 48c4ef100ac..1d16230fdf8 100644 --- a/spring-context/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerReturningTests-ok.xml +++ b/spring-context/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerReturningTests-ok.xml @@ -15,7 +15,7 @@ - + diff --git a/spring-context/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerTests-context.xml b/spring-context/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerTests-context.xml index bfb326cd731..0757bdc261e 100644 --- a/spring-context/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerTests-context.xml +++ b/spring-context/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerTests-context.xml @@ -23,7 +23,7 @@ - + diff --git a/spring-context/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerThrowingTests-error.xml b/spring-context/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerThrowingTests-error.xml index c66b4ce4f7f..19151e25d9b 100644 --- a/spring-context/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerThrowingTests-error.xml +++ b/spring-context/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerThrowingTests-error.xml @@ -15,7 +15,7 @@ - + diff --git a/spring-context/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerThrowingTests-ok.xml b/spring-context/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerThrowingTests-ok.xml index 3f858a72566..69bda253a19 100644 --- a/spring-context/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerThrowingTests-ok.xml +++ b/spring-context/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerThrowingTests-ok.xml @@ -15,7 +15,7 @@ - + diff --git a/spring-context/src/test/resources/org/springframework/aop/config/PrototypeProxyTests-context.xml b/spring-context/src/test/resources/org/springframework/aop/config/PrototypeProxyTests-context.xml index fa1dd714491..31327e7da58 100644 --- a/spring-context/src/test/resources/org/springframework/aop/config/PrototypeProxyTests-context.xml +++ b/spring-context/src/test/resources/org/springframework/aop/config/PrototypeProxyTests-context.xml @@ -5,13 +5,13 @@ xsi:schemaLocation="http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://www.springframework.org/schema/aop https://www.springframework.org/schema/aop/spring-aop-2.0.xsd"> - + - + - + @@ -20,7 +20,7 @@ - + diff --git a/spring-context/src/test/resources/org/springframework/aop/framework/ProxyFactoryBeanTests-autowiring.xml b/spring-context/src/test/resources/org/springframework/aop/framework/ProxyFactoryBeanTests-autowiring.xml index fd417d62620..ff14f489b7d 100644 --- a/spring-context/src/test/resources/org/springframework/aop/framework/ProxyFactoryBeanTests-autowiring.xml +++ b/spring-context/src/test/resources/org/springframework/aop/framework/ProxyFactoryBeanTests-autowiring.xml @@ -8,7 +8,7 @@ - + diff --git a/spring-context/src/test/resources/org/springframework/aop/framework/ProxyFactoryBeanTests-context.xml b/spring-context/src/test/resources/org/springframework/aop/framework/ProxyFactoryBeanTests-context.xml index 44820ac9a6a..edd3e72571f 100644 --- a/spring-context/src/test/resources/org/springframework/aop/framework/ProxyFactoryBeanTests-context.xml +++ b/spring-context/src/test/resources/org/springframework/aop/framework/ProxyFactoryBeanTests-context.xml @@ -4,7 +4,7 @@ - + custom 666 @@ -12,7 +12,7 @@ - org.springframework.tests.sample.beans.ITestBean + org.springframework.beans.test.fixtures.beans.ITestBean debugInterceptor @@ -27,7 +27,7 @@ Aspect interfaces don't need to be included here. They may, for example, be added by global interceptors. --> - org.springframework.tests.sample.beans.ITestBean + org.springframework.beans.test.fixtures.beans.ITestBean countingBeforeAdvice,adamTargetSource @@ -42,7 +42,7 @@ - org.springframework.tests.sample.beans.ITestBean + org.springframework.beans.test.fixtures.beans.ITestBean adam diff --git a/spring-context/src/test/resources/org/springframework/aop/framework/ProxyFactoryBeanTests-frozen.xml b/spring-context/src/test/resources/org/springframework/aop/framework/ProxyFactoryBeanTests-frozen.xml index 2d6a5dea29e..e365c73fd9d 100644 --- a/spring-context/src/test/resources/org/springframework/aop/framework/ProxyFactoryBeanTests-frozen.xml +++ b/spring-context/src/test/resources/org/springframework/aop/framework/ProxyFactoryBeanTests-frozen.xml @@ -4,7 +4,7 @@ - + custom 666 @@ -16,7 +16,7 @@ - org.springframework.tests.sample.beans.ITestBean + org.springframework.beans.test.fixtures.beans.ITestBean debugInterceptor diff --git a/spring-context/src/test/resources/org/springframework/aop/framework/ProxyFactoryBeanTests-inner-bean-target.xml b/spring-context/src/test/resources/org/springframework/aop/framework/ProxyFactoryBeanTests-inner-bean-target.xml index 4318d669f78..67345999ad2 100644 --- a/spring-context/src/test/resources/org/springframework/aop/framework/ProxyFactoryBeanTests-inner-bean-target.xml +++ b/spring-context/src/test/resources/org/springframework/aop/framework/ProxyFactoryBeanTests-inner-bean-target.xml @@ -16,7 +16,7 @@ class="org.springframework.aop.framework.ProxyFactoryBean" > - + innerBeanTarget diff --git a/spring-context/src/test/resources/org/springframework/aop/framework/ProxyFactoryBeanTests-invalid.xml b/spring-context/src/test/resources/org/springframework/aop/framework/ProxyFactoryBeanTests-invalid.xml index 6f0de72edf9..ed2ba7dc1cb 100644 --- a/spring-context/src/test/resources/org/springframework/aop/framework/ProxyFactoryBeanTests-invalid.xml +++ b/spring-context/src/test/resources/org/springframework/aop/framework/ProxyFactoryBeanTests-invalid.xml @@ -5,7 +5,7 @@ - org.springframework.tests.sample.beans.ITestBean + org.springframework.beans.test.fixtures.beans.ITestBean @@ -14,7 +14,7 @@ Must have target after *. --> - org.springframework.tests.sample.beans.ITestBean + org.springframework.beans.test.fixtures.beans.ITestBean global* diff --git a/spring-context/src/test/resources/org/springframework/aop/framework/ProxyFactoryBeanTests-notlast-targetsource.xml b/spring-context/src/test/resources/org/springframework/aop/framework/ProxyFactoryBeanTests-notlast-targetsource.xml index 09e433e7044..3141c7ffc83 100644 --- a/spring-context/src/test/resources/org/springframework/aop/framework/ProxyFactoryBeanTests-notlast-targetsource.xml +++ b/spring-context/src/test/resources/org/springframework/aop/framework/ProxyFactoryBeanTests-notlast-targetsource.xml @@ -9,7 +9,7 @@ - + Adam @@ -23,7 +23,7 @@ --> - org.springframework.tests.sample.beans.ITestBean + org.springframework.beans.test.fixtures.beans.ITestBean adam,countingBeforeAdvice diff --git a/spring-context/src/test/resources/org/springframework/aop/framework/ProxyFactoryBeanTests-prototype.xml b/spring-context/src/test/resources/org/springframework/aop/framework/ProxyFactoryBeanTests-prototype.xml index afd64d239db..fa09e6b416c 100644 --- a/spring-context/src/test/resources/org/springframework/aop/framework/ProxyFactoryBeanTests-prototype.xml +++ b/spring-context/src/test/resources/org/springframework/aop/framework/ProxyFactoryBeanTests-prototype.xml @@ -7,11 +7,11 @@ - + 10 - + 10 diff --git a/spring-context/src/test/resources/org/springframework/aop/framework/ProxyFactoryBeanTests-serialization.xml b/spring-context/src/test/resources/org/springframework/aop/framework/ProxyFactoryBeanTests-serialization.xml index 1895bb31084..86933697ba8 100644 --- a/spring-context/src/test/resources/org/springframework/aop/framework/ProxyFactoryBeanTests-serialization.xml +++ b/spring-context/src/test/resources/org/springframework/aop/framework/ProxyFactoryBeanTests-serialization.xml @@ -12,28 +12,28 @@ serializableNopInterceptor - org.springframework.tests.sample.beans.Person + org.springframework.beans.test.fixtures.beans.Person - + serializableSingleton - + serializablePrototype serializableNopInterceptor,prototypeTarget - org.springframework.tests.sample.beans.Person + org.springframework.beans.test.fixtures.beans.Person false nopInterceptor - + diff --git a/spring-context/src/test/resources/org/springframework/aop/framework/ProxyFactoryBeanTests-targetsource.xml b/spring-context/src/test/resources/org/springframework/aop/framework/ProxyFactoryBeanTests-targetsource.xml index c502a911a54..e4df8653c77 100644 --- a/spring-context/src/test/resources/org/springframework/aop/framework/ProxyFactoryBeanTests-targetsource.xml +++ b/spring-context/src/test/resources/org/springframework/aop/framework/ProxyFactoryBeanTests-targetsource.xml @@ -8,7 +8,7 @@ - + Adam @@ -49,7 +49,7 @@ --> - org.springframework.tests.sample.beans.ITestBean + org.springframework.beans.test.fixtures.beans.ITestBean nopInterceptor,unsupportedInterceptor diff --git a/spring-context/src/test/resources/org/springframework/aop/framework/adapter/AdvisorAdapterRegistrationTests-with-bpp.xml b/spring-context/src/test/resources/org/springframework/aop/framework/adapter/AdvisorAdapterRegistrationTests-with-bpp.xml index 9d65bfc4c26..7d66aec5847 100644 --- a/spring-context/src/test/resources/org/springframework/aop/framework/adapter/AdvisorAdapterRegistrationTests-with-bpp.xml +++ b/spring-context/src/test/resources/org/springframework/aop/framework/adapter/AdvisorAdapterRegistrationTests-with-bpp.xml @@ -3,7 +3,7 @@ - + @@ -12,7 +12,7 @@ - org.springframework.tests.sample.beans.ITestBean + org.springframework.beans.test.fixtures.beans.ITestBean simpleBeforeAdviceAdvisor,testBeanTarget diff --git a/spring-context/src/test/resources/org/springframework/aop/framework/adapter/AdvisorAdapterRegistrationTests-without-bpp.xml b/spring-context/src/test/resources/org/springframework/aop/framework/adapter/AdvisorAdapterRegistrationTests-without-bpp.xml index d761c43b7fe..a6b51baf38b 100644 --- a/spring-context/src/test/resources/org/springframework/aop/framework/adapter/AdvisorAdapterRegistrationTests-without-bpp.xml +++ b/spring-context/src/test/resources/org/springframework/aop/framework/adapter/AdvisorAdapterRegistrationTests-without-bpp.xml @@ -3,7 +3,7 @@ - + @@ -12,7 +12,7 @@ - org.springframework.tests.sample.beans.ITestBean + org.springframework.beans.test.fixtures.beans.ITestBean simpleBeforeAdviceAdvisor,testBeanTarget diff --git a/spring-context/src/test/resources/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorTests-common-interceptors.xml b/spring-context/src/test/resources/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorTests-common-interceptors.xml index f099a217a33..2a06a46d7d2 100644 --- a/spring-context/src/test/resources/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorTests-common-interceptors.xml +++ b/spring-context/src/test/resources/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorTests-common-interceptors.xml @@ -33,11 +33,11 @@ - + - + diff --git a/spring-context/src/test/resources/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorTests-custom-targetsource.xml b/spring-context/src/test/resources/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorTests-custom-targetsource.xml index 7a88be86df0..ddabde322af 100644 --- a/spring-context/src/test/resources/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorTests-custom-targetsource.xml +++ b/spring-context/src/test/resources/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorTests-custom-targetsource.xml @@ -12,22 +12,22 @@ - + Rod - + Rod - + Rod - + Kerry diff --git a/spring-context/src/test/resources/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorTests-optimized.xml b/spring-context/src/test/resources/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorTests-optimized.xml index 1c5a1569d23..8c2df4bcb02 100644 --- a/spring-context/src/test/resources/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorTests-optimized.xml +++ b/spring-context/src/test/resources/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorTests-optimized.xml @@ -3,7 +3,7 @@ - + diff --git a/spring-context/src/test/resources/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorTests-quick-targetsource.xml b/spring-context/src/test/resources/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorTests-quick-targetsource.xml index 19455a0b078..8294fff16be 100644 --- a/spring-context/src/test/resources/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorTests-quick-targetsource.xml +++ b/spring-context/src/test/resources/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorTests-quick-targetsource.xml @@ -14,29 +14,29 @@ - + Rod - + Kerry - + Rod - + Rod - + Rod diff --git a/spring-context/src/test/resources/org/springframework/aop/framework/autoproxy/BeanNameAutoProxyCreatorInitTests-context.xml b/spring-context/src/test/resources/org/springframework/aop/framework/autoproxy/BeanNameAutoProxyCreatorInitTests-context.xml index cce28c6965f..c5a497646f0 100644 --- a/spring-context/src/test/resources/org/springframework/aop/framework/autoproxy/BeanNameAutoProxyCreatorInitTests-context.xml +++ b/spring-context/src/test/resources/org/springframework/aop/framework/autoproxy/BeanNameAutoProxyCreatorInitTests-context.xml @@ -24,6 +24,6 @@ - + diff --git a/spring-context/src/test/resources/org/springframework/aop/framework/autoproxy/BeanNameAutoProxyCreatorTests-context.xml b/spring-context/src/test/resources/org/springframework/aop/framework/autoproxy/BeanNameAutoProxyCreatorTests-context.xml index 2c390607f29..9b9c9bd2e9e 100644 --- a/spring-context/src/test/resources/org/springframework/aop/framework/autoproxy/BeanNameAutoProxyCreatorTests-context.xml +++ b/spring-context/src/test/resources/org/springframework/aop/framework/autoproxy/BeanNameAutoProxyCreatorTests-context.xml @@ -73,11 +73,11 @@ - + introductionUsingJdk - + second-introductionUsingJdk @@ -88,29 +88,29 @@ lazy-init="true"> - + jdk1 - + - + cglib1 - + onlyJdk - + doubleJdk - + noproxy diff --git a/spring-context/src/test/resources/org/springframework/aop/scope/ScopedProxyTests-list.xml b/spring-context/src/test/resources/org/springframework/aop/scope/ScopedProxyTests-list.xml index 6794fd8ba28..72c913aad66 100644 --- a/spring-context/src/test/resources/org/springframework/aop/scope/ScopedProxyTests-list.xml +++ b/spring-context/src/test/resources/org/springframework/aop/scope/ScopedProxyTests-list.xml @@ -9,7 +9,7 @@ - + diff --git a/spring-context/src/test/resources/org/springframework/aop/scope/ScopedProxyTests-override.xml b/spring-context/src/test/resources/org/springframework/aop/scope/ScopedProxyTests-override.xml index a432352d34c..ac7df01af81 100644 --- a/spring-context/src/test/resources/org/springframework/aop/scope/ScopedProxyTests-override.xml +++ b/spring-context/src/test/resources/org/springframework/aop/scope/ScopedProxyTests-override.xml @@ -5,7 +5,7 @@ xsi:schemaLocation="http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans-2.5.xsd http://www.springframework.org/schema/aop https://www.springframework.org/schema/aop/spring-aop-2.5.xsd"> - + diff --git a/spring-context/src/test/resources/org/springframework/aop/scope/ScopedProxyTests-testbean.xml b/spring-context/src/test/resources/org/springframework/aop/scope/ScopedProxyTests-testbean.xml index 75888861a0a..c580a34580b 100644 --- a/spring-context/src/test/resources/org/springframework/aop/scope/ScopedProxyTests-testbean.xml +++ b/spring-context/src/test/resources/org/springframework/aop/scope/ScopedProxyTests-testbean.xml @@ -3,7 +3,7 @@ - + diff --git a/spring-context/src/test/resources/org/springframework/aop/target/CommonsPool2TargetSourceTests-context.xml b/spring-context/src/test/resources/org/springframework/aop/target/CommonsPool2TargetSourceTests-context.xml index 989b1b11a9f..95922d4e033 100644 --- a/spring-context/src/test/resources/org/springframework/aop/target/CommonsPool2TargetSourceTests-context.xml +++ b/spring-context/src/test/resources/org/springframework/aop/target/CommonsPool2TargetSourceTests-context.xml @@ -3,7 +3,7 @@ - + 10 @@ -42,7 +42,7 @@ - + prototypePerson diff --git a/spring-context/src/test/resources/org/springframework/beans/factory/xml/LookupMethodWrappedByCglibProxyTests-context.xml b/spring-context/src/test/resources/org/springframework/beans/factory/xml/LookupMethodWrappedByCglibProxyTests-context.xml index 2f2eb5ce175..2d780083d69 100644 --- a/spring-context/src/test/resources/org/springframework/beans/factory/xml/LookupMethodWrappedByCglibProxyTests-context.xml +++ b/spring-context/src/test/resources/org/springframework/beans/factory/xml/LookupMethodWrappedByCglibProxyTests-context.xml @@ -22,7 +22,7 @@ interceptor - + Jenny 30 diff --git a/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-autowire.xml b/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-autowire.xml index c5f0194a199..27c17dbce59 100644 --- a/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-autowire.xml +++ b/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-autowire.xml @@ -3,19 +3,19 @@ - + - + - + - + @@ -31,12 +31,12 @@ - - + diff --git a/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-child.xml b/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-child.xml index 29adf6023be..2010652c046 100644 --- a/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-child.xml +++ b/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-child.xml @@ -8,13 +8,13 @@ - override - override @@ -42,7 +42,7 @@ - + myname diff --git a/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-collections.xml b/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-collections.xml index 5e422bbae29..468e027e5e6 100644 --- a/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-collections.xml +++ b/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-collections.xml @@ -3,7 +3,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans-2.5.xsd"> - + Jenny 30 @@ -12,7 +12,7 @@ - + Simple bean, without any collections. @@ -23,7 +23,7 @@ 27 - + Rod 32 @@ -35,7 +35,7 @@ - + Jenny 30 @@ -44,12 +44,12 @@ - + David 27 - + Rod 32 @@ -63,7 +63,7 @@ - + loner 26 @@ -97,26 +97,26 @@ - + verbose - + - + - + - + @@ -126,7 +126,7 @@ - + @@ -158,7 +158,7 @@ - + @@ -167,7 +167,7 @@ - + @@ -199,7 +199,7 @@ - + @@ -207,7 +207,7 @@ - + bar @@ -217,7 +217,7 @@ - + @@ -225,7 +225,7 @@ - + bar @@ -234,7 +234,7 @@ - + @@ -243,7 +243,7 @@ - + one @@ -252,7 +252,7 @@ - + java.lang.String @@ -261,7 +261,7 @@ - + 0 diff --git a/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-complexFactoryCircle.xml b/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-complexFactoryCircle.xml index 840e640fc87..5b2b7da536d 100644 --- a/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-complexFactoryCircle.xml +++ b/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-complexFactoryCircle.xml @@ -11,16 +11,16 @@ - + - + - + - + diff --git a/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-constructorArg.xml b/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-constructorArg.xml index f2ef16d76e3..f9b1f979dbc 100644 --- a/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-constructorArg.xml +++ b/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-constructorArg.xml @@ -13,7 +13,7 @@ - + @@ -117,7 +117,7 @@ - + Kerry1 @@ -126,7 +126,7 @@ - + Kerry2 @@ -135,7 +135,7 @@ - + /test @@ -187,13 +187,13 @@ - + - + diff --git a/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-constructorOverrides.xml b/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-constructorOverrides.xml index d91e025fa34..7fcdaa785e8 100644 --- a/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-constructorOverrides.xml +++ b/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-constructorOverrides.xml @@ -18,7 +18,7 @@ - Jenny 30 diff --git a/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-defaultAutowire.xml b/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-defaultAutowire.xml index 0c2406f9e14..10357e8ae7c 100644 --- a/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-defaultAutowire.xml +++ b/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-defaultAutowire.xml @@ -3,19 +3,19 @@ - + - + - + - + Kerry diff --git a/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-defaultLazyInit.xml b/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-defaultLazyInit.xml index fc927edbafe..eccba590a25 100644 --- a/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-defaultLazyInit.xml +++ b/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-defaultLazyInit.xml @@ -15,6 +15,6 @@ destroy-method="customDestroy" /> - + diff --git a/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-delegationOverrides.xml b/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-delegationOverrides.xml index 157562d49ae..f5a896a8a39 100644 --- a/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-delegationOverrides.xml +++ b/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-delegationOverrides.xml @@ -58,7 +58,7 @@ - Jenny 30 @@ -68,7 +68,7 @@ - Simple bean, without any collections. diff --git a/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-factoryCircle.xml b/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-factoryCircle.xml index de5f2b4dbda..d7b39e4d757 100644 --- a/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-factoryCircle.xml +++ b/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-factoryCircle.xml @@ -3,7 +3,7 @@ - + diff --git a/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-initializers.xml b/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-initializers.xml index fb146c2171f..b082cb757d6 100644 --- a/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-initializers.xml +++ b/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-initializers.xml @@ -11,7 +11,7 @@ - - + Jenny 30 diff --git a/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-invalidOverridesNoSuchMethod.xml b/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-invalidOverridesNoSuchMethod.xml index 23c89744c96..d4940de54e8 100644 --- a/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-invalidOverridesNoSuchMethod.xml +++ b/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-invalidOverridesNoSuchMethod.xml @@ -11,7 +11,7 @@ - + Jenny 30 diff --git a/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-localCollectionsUsingXsd.xml b/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-localCollectionsUsingXsd.xml index 31ca350d3cf..e34567d283d 100644 --- a/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-localCollectionsUsingXsd.xml +++ b/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-localCollectionsUsingXsd.xml @@ -12,7 +12,7 @@ - + diff --git a/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-overrides.xml b/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-overrides.xml index 6e61f9bcaa1..96decab1c68 100644 --- a/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-overrides.xml +++ b/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-overrides.xml @@ -35,32 +35,32 @@ - + Jenny 30 - + - + Jenny 30 - + - + - + Simple bean, without any collections. @@ -71,12 +71,12 @@ 27 - + - + diff --git a/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-parent.xml b/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-parent.xml index 8903bb169d6..7b4a0a00d72 100644 --- a/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-parent.xml +++ b/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-parent.xml @@ -3,7 +3,7 @@ - + parent 1 @@ -13,11 +13,11 @@ 1 - + parent 2 - + diff --git a/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-reftypes.xml b/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-reftypes.xml index 075f8b48ed7..9497d262266 100644 --- a/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-reftypes.xml +++ b/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-reftypes.xml @@ -1,121 +1,121 @@ - + Jenny 30 - + - + - + - + - + - + - + - + Andrew 36 - + - + Georgia 33 - + - + - + - + - + - + - + - + - + - + outer 0 - + hasInner 5 - + inner1 6 - + inner2 7 - - + + inner5 6 @@ -124,7 +124,7 @@ - + inner3 8 @@ -139,41 +139,41 @@ - + - + inner1 6 - + - + inner1 6 - + hasInner 5 - + inner1 6 - + inner2 7 - - + + inner5 6 @@ -181,11 +181,11 @@ - + - + inner3 8 @@ -201,9 +201,9 @@ - + - + inner1 6 diff --git a/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-testWithDuplicateNameInAlias.xml b/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-testWithDuplicateNameInAlias.xml index 7cf4c96afb0..843f46bf064 100644 --- a/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-testWithDuplicateNameInAlias.xml +++ b/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-testWithDuplicateNameInAlias.xml @@ -3,8 +3,8 @@ - + - + diff --git a/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-testWithDuplicateNames.xml b/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-testWithDuplicateNames.xml index 45463198c7c..996faed7f3a 100644 --- a/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-testWithDuplicateNames.xml +++ b/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-testWithDuplicateNames.xml @@ -3,8 +3,8 @@ - + - + diff --git a/spring-context/src/test/resources/org/springframework/beans/factory/xml/simplePropertyNamespaceHandlerWithExpressionLanguageTests.xml b/spring-context/src/test/resources/org/springframework/beans/factory/xml/simplePropertyNamespaceHandlerWithExpressionLanguageTests.xml index 5af5cddf68b..081c8b20f89 100644 --- a/spring-context/src/test/resources/org/springframework/beans/factory/xml/simplePropertyNamespaceHandlerWithExpressionLanguageTests.xml +++ b/spring-context/src/test/resources/org/springframework/beans/factory/xml/simplePropertyNamespaceHandlerWithExpressionLanguageTests.xml @@ -4,8 +4,8 @@ xmlns:p="http://www.springframework.org/schema/p" xsi:schemaLocation="http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd"> - + - + diff --git a/spring-context/src/test/resources/org/springframework/beans/factory/xml/support/CustomNamespaceHandlerTests-context.xml b/spring-context/src/test/resources/org/springframework/beans/factory/xml/support/CustomNamespaceHandlerTests-context.xml index 46f6111b934..eccc3bfd0ef 100644 --- a/spring-context/src/test/resources/org/springframework/beans/factory/xml/support/CustomNamespaceHandlerTests-context.xml +++ b/spring-context/src/test/resources/org/springframework/beans/factory/xml/support/CustomNamespaceHandlerTests-context.xml @@ -10,11 +10,11 @@ - + - + @@ -24,14 +24,14 @@ - + - + diff --git a/spring-context/src/test/resources/org/springframework/cache/config/annotationDrivenCacheConfig.xml b/spring-context/src/test/resources/org/springframework/cache/config/annotationDrivenCacheConfig.xml index 3df5e41c231..430783e5993 100644 --- a/spring-context/src/test/resources/org/springframework/cache/config/annotationDrivenCacheConfig.xml +++ b/spring-context/src/test/resources/org/springframework/cache/config/annotationDrivenCacheConfig.xml @@ -36,13 +36,13 @@ - + - + - + - + diff --git a/spring-context/src/test/resources/org/springframework/cache/config/annotationDrivenCacheNamespace.xml b/spring-context/src/test/resources/org/springframework/cache/config/annotationDrivenCacheNamespace.xml index 6e52ae6f704..0b914d6a989 100644 --- a/spring-context/src/test/resources/org/springframework/cache/config/annotationDrivenCacheNamespace.xml +++ b/spring-context/src/test/resources/org/springframework/cache/config/annotationDrivenCacheNamespace.xml @@ -26,15 +26,15 @@ - + - + - + - + diff --git a/spring-context/src/test/resources/org/springframework/cache/config/cache-advice.xml b/spring-context/src/test/resources/org/springframework/cache/config/cache-advice.xml index 2c57ad3f822..dc68f1adfcf 100644 --- a/spring-context/src/test/resources/org/springframework/cache/config/cache-advice.xml +++ b/spring-context/src/test/resources/org/springframework/cache/config/cache-advice.xml @@ -112,9 +112,9 @@ - + - + @@ -126,7 +126,7 @@ - + - + diff --git a/spring-context/src/test/resources/org/springframework/context/access/ContextJndiBeanFactoryLocatorTests-collections.xml b/spring-context/src/test/resources/org/springframework/context/access/ContextJndiBeanFactoryLocatorTests-collections.xml index 28563204976..7077cad2d41 100644 --- a/spring-context/src/test/resources/org/springframework/context/access/ContextJndiBeanFactoryLocatorTests-collections.xml +++ b/spring-context/src/test/resources/org/springframework/context/access/ContextJndiBeanFactoryLocatorTests-collections.xml @@ -3,7 +3,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans-2.5.xsd"> - + Jenny 30 @@ -12,7 +12,7 @@ - + Simple bean, without any collections. @@ -23,7 +23,7 @@ 27 - + Rod 32 @@ -35,7 +35,7 @@ - + Jenny 30 @@ -44,12 +44,12 @@ - + David 27 - + Rod 32 @@ -63,7 +63,7 @@ - + loner 26 @@ -97,26 +97,26 @@ - + verbose - + - + - + - + @@ -126,7 +126,7 @@ - + @@ -158,7 +158,7 @@ - + @@ -167,7 +167,7 @@ - + @@ -199,7 +199,7 @@ - + @@ -207,7 +207,7 @@ - + bar @@ -217,7 +217,7 @@ - + @@ -225,7 +225,7 @@ - + bar @@ -234,7 +234,7 @@ - + @@ -243,7 +243,7 @@ - + one @@ -252,7 +252,7 @@ - + java.lang.String @@ -261,7 +261,7 @@ - + 0 diff --git a/spring-context/src/test/resources/org/springframework/context/access/ContextJndiBeanFactoryLocatorTests-parent.xml b/spring-context/src/test/resources/org/springframework/context/access/ContextJndiBeanFactoryLocatorTests-parent.xml index da5e835b8d2..5fc26275c13 100644 --- a/spring-context/src/test/resources/org/springframework/context/access/ContextJndiBeanFactoryLocatorTests-parent.xml +++ b/spring-context/src/test/resources/org/springframework/context/access/ContextJndiBeanFactoryLocatorTests-parent.xml @@ -3,7 +3,7 @@ - + parent 1 @@ -13,11 +13,11 @@ 1 - + parent 2 - + diff --git a/spring-context/src/test/resources/org/springframework/context/annotation/configuration/ImportNonXmlResourceConfig-context.properties b/spring-context/src/test/resources/org/springframework/context/annotation/configuration/ImportNonXmlResourceConfig-context.properties index 59146595c2a..3184784ef56 100644 --- a/spring-context/src/test/resources/org/springframework/context/annotation/configuration/ImportNonXmlResourceConfig-context.properties +++ b/spring-context/src/test/resources/org/springframework/context/annotation/configuration/ImportNonXmlResourceConfig-context.properties @@ -1 +1 @@ -propertiesDeclaredBean.(class)=org.springframework.tests.sample.beans.TestBean \ No newline at end of file +propertiesDeclaredBean.(class)=org.springframework.beans.test.fixtures.beans.TestBean \ No newline at end of file diff --git a/spring-context/src/test/resources/org/springframework/context/annotation/configuration/ImportXmlConfig-context.xml b/spring-context/src/test/resources/org/springframework/context/annotation/configuration/ImportXmlConfig-context.xml index 34b253a6529..1fcb8662b2b 100644 --- a/spring-context/src/test/resources/org/springframework/context/annotation/configuration/ImportXmlConfig-context.xml +++ b/spring-context/src/test/resources/org/springframework/context/annotation/configuration/ImportXmlConfig-context.xml @@ -3,7 +3,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd"> - + diff --git a/spring-context/src/test/resources/org/springframework/context/annotation/configuration/ImportXmlWithAopNamespace-context.xml b/spring-context/src/test/resources/org/springframework/context/annotation/configuration/ImportXmlWithAopNamespace-context.xml index ce24687bd2f..d81a474dd28 100644 --- a/spring-context/src/test/resources/org/springframework/context/annotation/configuration/ImportXmlWithAopNamespace-context.xml +++ b/spring-context/src/test/resources/org/springframework/context/annotation/configuration/ImportXmlWithAopNamespace-context.xml @@ -5,7 +5,7 @@ xsi:schemaLocation="http://www.springframework.org/schema/aop https://www.springframework.org/schema/aop/spring-aop.xsd http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd"> - + diff --git a/spring-context/src/test/resources/org/springframework/context/support/simpleThreadScopeTests.xml b/spring-context/src/test/resources/org/springframework/context/support/simpleThreadScopeTests.xml index 54cb8595af2..62d21b908f9 100644 --- a/spring-context/src/test/resources/org/springframework/context/support/simpleThreadScopeTests.xml +++ b/spring-context/src/test/resources/org/springframework/context/support/simpleThreadScopeTests.xml @@ -14,34 +14,34 @@ - + + business-interface="org.springframework.beans.test.fixtures.beans.ITestBean"/> @@ -54,15 +54,15 @@ + business-interface="org.springframework.beans.test.fixtures.beans.ITestBean"/> foo=bar @@ -71,8 +71,8 @@ + business-interface="org.springframework.beans.test.fixtures.beans.ITestBean" lazy-init="true" /> + business-interface="org.springframework.beans.test.fixtures.beans.ITestBean" lazy-init="true" /> diff --git a/spring-context/src/test/resources/org/springframework/jmx/export/propertyPlaceholderConfigurer.xml b/spring-context/src/test/resources/org/springframework/jmx/export/propertyPlaceholderConfigurer.xml index 3f91e5d3059..39e7db19653 100644 --- a/spring-context/src/test/resources/org/springframework/jmx/export/propertyPlaceholderConfigurer.xml +++ b/spring-context/src/test/resources/org/springframework/jmx/export/propertyPlaceholderConfigurer.xml @@ -17,7 +17,7 @@ - + diff --git a/spring-context/src/test/resources/org/springframework/scripting/bsh/MessengerImpl.bsh b/spring-context/src/test/resources/org/springframework/scripting/bsh/MessengerImpl.bsh index 72a1e6a39c4..7129a63d544 100644 --- a/spring-context/src/test/resources/org/springframework/scripting/bsh/MessengerImpl.bsh +++ b/spring-context/src/test/resources/org/springframework/scripting/bsh/MessengerImpl.bsh @@ -1,4 +1,4 @@ -import org.springframework.tests.sample.beans.TestBean; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.scripting.TestBeanAwareMessenger; public class MyMessenger implements TestBeanAwareMessenger { diff --git a/spring-context/src/test/resources/org/springframework/scripting/bsh/bsh-with-xsd.xml b/spring-context/src/test/resources/org/springframework/scripting/bsh/bsh-with-xsd.xml index 4e10b82ecc7..5c45b921de8 100644 --- a/spring-context/src/test/resources/org/springframework/scripting/bsh/bsh-with-xsd.xml +++ b/spring-context/src/test/resources/org/springframework/scripting/bsh/bsh-with-xsd.xml @@ -35,7 +35,7 @@ autowire="byName" init-method="init" destroy-method="destroy"> - + diff --git a/spring-context/src/test/resources/org/springframework/scripting/groovy/ScriptBean.groovy b/spring-context/src/test/resources/org/springframework/scripting/groovy/ScriptBean.groovy index 718afab987a..d65f08fe37b 100644 --- a/spring-context/src/test/resources/org/springframework/scripting/groovy/ScriptBean.groovy +++ b/spring-context/src/test/resources/org/springframework/scripting/groovy/ScriptBean.groovy @@ -1,9 +1,9 @@ package org.springframework.scripting.groovy; +import org.springframework.beans.test.fixtures.beans.TestBean import org.springframework.context.ApplicationContext import org.springframework.context.ApplicationContextAware import org.springframework.scripting.ContextScriptBean -import org.springframework.tests.sample.beans.TestBean class GroovyScriptBean implements ContextScriptBean, ApplicationContextAware { diff --git a/spring-context/src/test/resources/org/springframework/scripting/groovy/groovy-multiple-properties.xml b/spring-context/src/test/resources/org/springframework/scripting/groovy/groovy-multiple-properties.xml index 15082d9fa64..26760d2997e 100644 --- a/spring-context/src/test/resources/org/springframework/scripting/groovy/groovy-multiple-properties.xml +++ b/spring-context/src/test/resources/org/springframework/scripting/groovy/groovy-multiple-properties.xml @@ -19,6 +19,6 @@ - + diff --git a/spring-context/src/test/java/org/springframework/context/AbstractApplicationContextTests.java b/spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/AbstractApplicationContextTests.java similarity index 87% rename from spring-context/src/test/java/org/springframework/context/AbstractApplicationContextTests.java rename to spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/AbstractApplicationContextTests.java index ac18e6d85a5..dd7baafac3c 100644 --- a/spring-context/src/test/java/org/springframework/context/AbstractApplicationContextTests.java +++ b/spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/AbstractApplicationContextTests.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.context; +package org.springframework.context.test.fixtures; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; @@ -26,9 +26,16 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.BeanFactory; -import org.springframework.beans.factory.xml.AbstractListableBeanFactoryTests; -import org.springframework.tests.sample.beans.LifecycleBean; -import org.springframework.tests.sample.beans.TestBean; +import org.springframework.beans.test.fixtures.beans.LifecycleBean; +import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.test.fixtures.factory.xml.AbstractListableBeanFactoryTests; +import org.springframework.context.ApplicationContext; +import org.springframework.context.ApplicationEvent; +import org.springframework.context.ConfigurableApplicationContext; +import org.springframework.context.NoSuchMessageException; +import org.springframework.context.test.fixtures.beans.ACATester; +import org.springframework.context.test.fixtures.beans.BeanThatListens; +import org.springframework.context.test.fixtures.beans.TestApplicationListener; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; @@ -46,9 +53,9 @@ public abstract class AbstractApplicationContextTests extends AbstractListableBe protected ConfigurableApplicationContext applicationContext; /** Subclass must register this */ - protected TestListener listener = new TestListener(); + protected TestApplicationListener listener = new TestApplicationListener(); - protected TestListener parentListener = new TestListener(); + protected TestApplicationListener parentListener = new TestApplicationListener(); @BeforeEach public void setUp() throws Exception { @@ -162,7 +169,7 @@ public abstract class AbstractApplicationContextTests extends AbstractListableBe doTestEvents(this.listener, this.parentListener, event); } - protected void doTestEvents(TestListener listener, TestListener parentListener, + protected void doTestEvents(TestApplicationListener listener, TestApplicationListener parentListener, MyEvent event) { listener.zeroCounter(); parentListener.zeroCounter(); diff --git a/spring-context/src/test/java/org/springframework/tests/context/SimpleMapScope.java b/spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/SimpleMapScope.java similarity index 97% rename from spring-context/src/test/java/org/springframework/tests/context/SimpleMapScope.java rename to spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/SimpleMapScope.java index ceb8d1a56a4..089c75932fd 100644 --- a/spring-context/src/test/java/org/springframework/tests/context/SimpleMapScope.java +++ b/spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/SimpleMapScope.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.tests.context; +package org.springframework.context.test.fixtures; import java.io.Serializable; import java.util.HashMap; diff --git a/spring-webmvc/src/test/java/org/springframework/context/ACATester.java b/spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/beans/ACATester.java similarity index 75% rename from spring-webmvc/src/test/java/org/springframework/context/ACATester.java rename to spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/beans/ACATester.java index fb179bfe58e..995b84b6a8d 100644 --- a/spring-webmvc/src/test/java/org/springframework/context/ACATester.java +++ b/spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/beans/ACATester.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2012 the original author or authors. + * Copyright 2002-2019 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. @@ -14,17 +14,22 @@ * limitations under the License. */ -package org.springframework.context; +package org.springframework.context.test.fixtures.beans; import java.util.Locale; +import org.springframework.context.ApplicationContext; +import org.springframework.context.ApplicationContextAware; +import org.springframework.context.ApplicationContextException; +import org.springframework.context.NoSuchMessageException; + public class ACATester implements ApplicationContextAware { private ApplicationContext ac; @Override public void setApplicationContext(ApplicationContext ctx) throws ApplicationContextException { - // check reinitialization + // check re-initialization if (this.ac != null) { throw new IllegalStateException("Already initialized"); } diff --git a/spring-webmvc/src/test/java/org/springframework/context/BeanThatBroadcasts.java b/spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/beans/BeanThatBroadcasts.java similarity index 81% rename from spring-webmvc/src/test/java/org/springframework/context/BeanThatBroadcasts.java rename to spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/beans/BeanThatBroadcasts.java index d452c8123a3..3a50975f33e 100644 --- a/spring-webmvc/src/test/java/org/springframework/context/BeanThatBroadcasts.java +++ b/spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/beans/BeanThatBroadcasts.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2012 the original author or authors. + * Copyright 2002-2019 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. @@ -14,7 +14,10 @@ * limitations under the License. */ -package org.springframework.context; +package org.springframework.context.test.fixtures.beans; + +import org.springframework.context.ApplicationContext; +import org.springframework.context.ApplicationContextAware; /** * @author Juergen Hoeller diff --git a/spring-context/src/test/java/org/springframework/context/BeanThatListens.java b/spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/beans/BeanThatListens.java similarity index 87% rename from spring-context/src/test/java/org/springframework/context/BeanThatListens.java rename to spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/beans/BeanThatListens.java index 69bd1466b04..c7079188f9d 100644 --- a/spring-context/src/test/java/org/springframework/context/BeanThatListens.java +++ b/spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/beans/BeanThatListens.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2012 the original author or authors. + * Copyright 2002-2019 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. @@ -14,10 +14,13 @@ * limitations under the License. */ -package org.springframework.context; +package org.springframework.context.test.fixtures.beans; import java.util.Map; +import org.springframework.context.ApplicationEvent; +import org.springframework.context.ApplicationListener; + /** * A stub {@link ApplicationListener}. * diff --git a/spring-webmvc/src/test/java/org/springframework/context/TestListener.java b/spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/beans/TestApplicationListener.java similarity index 78% rename from spring-webmvc/src/test/java/org/springframework/context/TestListener.java rename to spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/beans/TestApplicationListener.java index 242d60ac635..a43e534ddec 100644 --- a/spring-webmvc/src/test/java/org/springframework/context/TestListener.java +++ b/spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/beans/TestApplicationListener.java @@ -14,7 +14,10 @@ * limitations under the License. */ -package org.springframework.context; +package org.springframework.context.test.fixtures.beans; + +import org.springframework.context.ApplicationEvent; +import org.springframework.context.ApplicationListener; /** * Listener that maintains a global count of events. @@ -22,7 +25,7 @@ package org.springframework.context; * @author Rod Johnson * @since January 21, 2001 */ -public class TestListener implements ApplicationListener { +public class TestApplicationListener implements ApplicationListener { private int eventCount; diff --git a/spring-context/src/test/java/org/springframework/cache/config/AbstractCacheAnnotationTests.java b/spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/cache/AbstractCacheAnnotationTests.java similarity index 97% rename from spring-context/src/test/java/org/springframework/cache/config/AbstractCacheAnnotationTests.java rename to spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/cache/AbstractCacheAnnotationTests.java index 55234006aaa..d94cacb17a2 100644 --- a/spring-context/src/test/java/org/springframework/cache/config/AbstractCacheAnnotationTests.java +++ b/spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/cache/AbstractCacheAnnotationTests.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.cache.config; +package org.springframework.context.test.fixtures.cache; import java.util.Collection; import java.util.UUID; @@ -28,6 +28,9 @@ import org.springframework.beans.factory.NoSuchBeanDefinitionException; import org.springframework.cache.Cache; import org.springframework.cache.CacheManager; import org.springframework.context.ConfigurableApplicationContext; +import org.springframework.context.test.fixtures.cache.beans.AnnotatedClassCacheableService; +import org.springframework.context.test.fixtures.cache.beans.CacheableService; +import org.springframework.context.test.fixtures.cache.beans.TestEntity; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; @@ -66,9 +69,7 @@ public abstract class AbstractCacheAnnotationTests { this.cm = ctx.getBean("cacheManager", CacheManager.class); Collection cn = this.cm.getCacheNames(); - assertThat(cn.contains("testCache")).isTrue(); - assertThat(cn.contains("secondary")).isTrue(); - assertThat(cn.contains("primary")).isTrue(); + assertThat(cn).containsOnly("testCache", "secondary", "primary"); } @AfterEach @@ -101,6 +102,8 @@ public abstract class AbstractCacheAnnotationTests { assertThat(r2).isSameAs(r1); assertThat(r3).isSameAs(r1); + assertThat(this.cm.getCache("testCache")).as("testCache").isNotNull(); + assertThat(this.cm.getCache("testCache").get(o1)).as("cached object").isNotNull(); assertThat(this.cm.getCache("testCache").get(o1).get()).isEqualTo(r3); assertThat(r3).as("Cached value should be null").isNull(); } diff --git a/spring-context/src/test/java/org/springframework/cache/AbstractCacheTests.java b/spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/cache/AbstractCacheTests.java similarity index 98% rename from spring-context/src/test/java/org/springframework/cache/AbstractCacheTests.java rename to spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/cache/AbstractCacheTests.java index 8fa63456e91..ab8490bd536 100644 --- a/spring-context/src/test/java/org/springframework/cache/AbstractCacheTests.java +++ b/spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/cache/AbstractCacheTests.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.cache; +package org.springframework.context.test.fixtures.cache; import java.util.List; import java.util.UUID; @@ -24,6 +24,8 @@ import java.util.concurrent.atomic.AtomicInteger; import org.junit.jupiter.api.Test; +import org.springframework.cache.Cache; + import static org.assertj.core.api.Assertions.assertThat; /** diff --git a/spring-context/src/test/java/org/springframework/cache/AbstractValueAdaptingCacheTests.java b/spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/cache/AbstractValueAdaptingCacheTests.java similarity index 96% rename from spring-context/src/test/java/org/springframework/cache/AbstractValueAdaptingCacheTests.java rename to spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/cache/AbstractValueAdaptingCacheTests.java index 0a6889e6e38..ccaa6ffe8e7 100644 --- a/spring-context/src/test/java/org/springframework/cache/AbstractValueAdaptingCacheTests.java +++ b/spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/cache/AbstractValueAdaptingCacheTests.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.cache; +package org.springframework.context.test.fixtures.cache; import org.junit.jupiter.api.Test; diff --git a/spring-context/src/test/java/org/springframework/cache/CacheTestUtils.java b/spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/cache/CacheTestUtils.java similarity index 93% rename from spring-context/src/test/java/org/springframework/cache/CacheTestUtils.java rename to spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/cache/CacheTestUtils.java index c69f2aa9514..1150a45a8f9 100644 --- a/spring-context/src/test/java/org/springframework/cache/CacheTestUtils.java +++ b/spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/cache/CacheTestUtils.java @@ -14,11 +14,13 @@ * limitations under the License. */ -package org.springframework.cache; +package org.springframework.context.test.fixtures.cache; import java.util.ArrayList; import java.util.List; +import org.springframework.cache.Cache; +import org.springframework.cache.CacheManager; import org.springframework.cache.concurrent.ConcurrentMapCache; import org.springframework.cache.support.SimpleCacheManager; diff --git a/spring-aspects/src/test/java/org/springframework/cache/config/SomeCustomKeyGenerator.java b/spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/cache/SomeCustomKeyGenerator.java similarity index 88% rename from spring-aspects/src/test/java/org/springframework/cache/config/SomeCustomKeyGenerator.java rename to spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/cache/SomeCustomKeyGenerator.java index 9a60d09982e..296e3cd3a2c 100644 --- a/spring-aspects/src/test/java/org/springframework/cache/config/SomeCustomKeyGenerator.java +++ b/spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/cache/SomeCustomKeyGenerator.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.cache.config; +package org.springframework.context.test.fixtures.cache; import java.lang.reflect.Method; @@ -22,7 +22,7 @@ import org.springframework.cache.interceptor.KeyGenerator; /** * A custom {@link KeyGenerator} that exposes the algorithm used to compute the key - * for convenience in tests scenario. + * for convenience in test scenarios. * * @author Stephane Nicoll */ @@ -36,7 +36,7 @@ public class SomeCustomKeyGenerator implements KeyGenerator { /** * @see #generate(Object, java.lang.reflect.Method, Object...) */ - static Object generateKey(String methodName, Object... params) { + public static Object generateKey(String methodName, Object... params) { final StringBuilder sb = new StringBuilder(methodName); for (Object param : params) { sb.append(param); diff --git a/spring-context/src/test/java/org/springframework/cache/config/SomeKeyGenerator.java b/spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/cache/SomeKeyGenerator.java similarity index 92% rename from spring-context/src/test/java/org/springframework/cache/config/SomeKeyGenerator.java rename to spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/cache/SomeKeyGenerator.java index 11e757b062f..b4555262675 100644 --- a/spring-context/src/test/java/org/springframework/cache/config/SomeKeyGenerator.java +++ b/spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/cache/SomeKeyGenerator.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.cache.config; +package org.springframework.context.test.fixtures.cache; import org.springframework.cache.interceptor.SimpleKeyGenerator; diff --git a/spring-context/src/test/java/org/springframework/cache/config/AnnotatedClassCacheableService.java b/spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/cache/beans/AnnotatedClassCacheableService.java similarity index 99% rename from spring-context/src/test/java/org/springframework/cache/config/AnnotatedClassCacheableService.java rename to spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/cache/beans/AnnotatedClassCacheableService.java index 5872dffc780..8441ed9baa1 100644 --- a/spring-context/src/test/java/org/springframework/cache/config/AnnotatedClassCacheableService.java +++ b/spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/cache/beans/AnnotatedClassCacheableService.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.cache.config; +package org.springframework.context.test.fixtures.cache.beans; import java.io.IOException; import java.util.concurrent.atomic.AtomicLong; diff --git a/spring-context/src/test/java/org/springframework/cache/config/CacheableService.java b/spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/cache/beans/CacheableService.java similarity index 96% rename from spring-context/src/test/java/org/springframework/cache/config/CacheableService.java rename to spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/cache/beans/CacheableService.java index e5ab4a5f94c..fbbb1fc572e 100644 --- a/spring-context/src/test/java/org/springframework/cache/config/CacheableService.java +++ b/spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/cache/beans/CacheableService.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.cache.config; +package org.springframework.context.test.fixtures.cache.beans; /** * Basic service interface for caching tests. diff --git a/spring-context/src/test/java/org/springframework/cache/config/DefaultCacheableService.java b/spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/cache/beans/DefaultCacheableService.java similarity index 99% rename from spring-context/src/test/java/org/springframework/cache/config/DefaultCacheableService.java rename to spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/cache/beans/DefaultCacheableService.java index 7df2bb4ea27..3c5a5d66654 100644 --- a/spring-context/src/test/java/org/springframework/cache/config/DefaultCacheableService.java +++ b/spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/cache/beans/DefaultCacheableService.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.cache.config; +package org.springframework.context.test.fixtures.cache.beans; import java.io.IOException; import java.util.concurrent.atomic.AtomicLong; diff --git a/spring-context/src/test/java/org/springframework/cache/config/TestEntity.java b/spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/cache/beans/TestEntity.java similarity index 95% rename from spring-context/src/test/java/org/springframework/cache/config/TestEntity.java rename to spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/cache/beans/TestEntity.java index 02a9191f4b2..db221313732 100644 --- a/spring-context/src/test/java/org/springframework/cache/config/TestEntity.java +++ b/spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/cache/beans/TestEntity.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.cache.config; +package org.springframework.context.test.fixtures.cache.beans; import org.springframework.util.ObjectUtils; diff --git a/spring-context/src/test/java/org/springframework/context/index/CandidateComponentsTestClassLoader.java b/spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/index/CandidateComponentsTestClassLoader.java similarity index 91% rename from spring-context/src/test/java/org/springframework/context/index/CandidateComponentsTestClassLoader.java rename to spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/index/CandidateComponentsTestClassLoader.java index fa28be77c27..02c91ed3d2b 100644 --- a/spring-context/src/test/java/org/springframework/context/index/CandidateComponentsTestClassLoader.java +++ b/spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/index/CandidateComponentsTestClassLoader.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2016 the original author or authors. + * Copyright 2002-2019 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. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.context.index; +package org.springframework.context.test.fixtures.index; import java.io.IOException; import java.net.URL; @@ -23,10 +23,11 @@ import java.util.Enumeration; import java.util.stream.Collectors; import java.util.stream.Stream; +import org.springframework.context.index.CandidateComponentsIndexLoader; import org.springframework.core.io.Resource; /** - * A test {@link ClassLoader} that can be used in testing context to control the + * A test {@link ClassLoader} that can be used in a testing context to control the * {@code spring.components} resource that should be loaded. Can also simulate a failure * by throwing a configurable {@link IOException}. * diff --git a/spring-context/src/test/java/org/springframework/tests/mock/jndi/ExpectedLookupTemplate.java b/spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/jndi/ExpectedLookupTemplate.java similarity index 87% rename from spring-context/src/test/java/org/springframework/tests/mock/jndi/ExpectedLookupTemplate.java rename to spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/jndi/ExpectedLookupTemplate.java index 70967213062..c5e575d22c9 100644 --- a/spring-context/src/test/java/org/springframework/tests/mock/jndi/ExpectedLookupTemplate.java +++ b/spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/jndi/ExpectedLookupTemplate.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2018 the original author or authors. + * Copyright 2002-2019 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. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.tests.mock.jndi; +package org.springframework.context.test.fixtures.jndi; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; @@ -24,7 +24,10 @@ import javax.naming.NamingException; import org.springframework.jndi.JndiTemplate; /** - * Simple extension of the JndiTemplate class that always returns a given object. + * Copy of the standard {@link org.springframework.context.test.fixtures.jndi.jndi.ExpectedLookupTemplate} + * for testing purposes. + * + *

Simple extension of the JndiTemplate class that always returns a given object. * *

Very useful for testing. Effectively a mock object. * diff --git a/spring-context/src/test/java/org/springframework/tests/mock/jndi/SimpleNamingContext.java b/spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/jndi/SimpleNamingContext.java similarity index 96% rename from spring-context/src/test/java/org/springframework/tests/mock/jndi/SimpleNamingContext.java rename to spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/jndi/SimpleNamingContext.java index d771a8b4ef6..f2f5450c84b 100644 --- a/spring-context/src/test/java/org/springframework/tests/mock/jndi/SimpleNamingContext.java +++ b/spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/jndi/SimpleNamingContext.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2018 the original author or authors. + * Copyright 2002-2019 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. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.tests.mock.jndi; +package org.springframework.context.test.fixtures.jndi; import java.util.HashMap; import java.util.Hashtable; @@ -38,7 +38,10 @@ import org.springframework.lang.Nullable; import org.springframework.util.StringUtils; /** - * Simple implementation of a JNDI naming context. + * Copy of the standard {@link org.springframework.mock.jndi.SimpleNamingContext} + * for testing purposes. + * + *

Simple implementation of a JNDI naming context. * Only supports binding plain Objects to String names. * Mainly for test environments, but also usable for standalone applications. * @@ -153,7 +156,7 @@ public class SimpleNamingContext implements Context { * Note: Not intended for direct use by applications * if setting up a JVM-level JNDI environment. * Use SimpleNamingContextBuilder to set up JNDI bindings then. - * @see org.springframework.tests.mock.jndi.SimpleNamingContextBuilder#bind + * @see org.springframework.context.test.fixtures.jndi.SimpleNamingContextBuilder#bind */ @Override public void bind(String name, Object obj) { diff --git a/spring-context/src/test/java/org/springframework/tests/mock/jndi/SimpleNamingContextBuilder.java b/spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/jndi/SimpleNamingContextBuilder.java similarity index 96% rename from spring-context/src/test/java/org/springframework/tests/mock/jndi/SimpleNamingContextBuilder.java rename to spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/jndi/SimpleNamingContextBuilder.java index 0839e436a73..08deabe1105 100644 --- a/spring-context/src/test/java/org/springframework/tests/mock/jndi/SimpleNamingContextBuilder.java +++ b/spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/jndi/SimpleNamingContextBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2018 the original author or authors. + * Copyright 2002-2019 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. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.tests.mock.jndi; +package org.springframework.context.test.fixtures.jndi; import java.util.Hashtable; @@ -33,7 +33,10 @@ import org.springframework.util.ClassUtils; import org.springframework.util.ReflectionUtils; /** - * Simple implementation of a JNDI naming context builder. + * Copy of the standard {@link org.springframework.mock.jndi.SimpleNamingContextBuilder} + * for testing purposes. + * + *

Simple implementation of a JNDI naming context builder. * *

Mainly targeted at test environments, where each test case can * configure JNDI appropriately, so that {@code new InitialContext()} diff --git a/spring-jdbc/spring-jdbc.gradle b/spring-jdbc/spring-jdbc.gradle index 3dc083492fc..e0737be91f5 100644 --- a/spring-jdbc/spring-jdbc.gradle +++ b/spring-jdbc/spring-jdbc.gradle @@ -14,5 +14,6 @@ dependencies { optional("org.apache.derby:derbyclient") optional("org.jetbrains.kotlin:kotlin-reflect") optional("org.jetbrains.kotlin:kotlin-stdlib") + testCompile(testFixtures(project(":spring-beans"))) testCompile(testFixtures(project(":spring-core"))) } diff --git a/spring-jdbc/src/test/java/org/springframework/jdbc/core/RowMapperTests.java b/spring-jdbc/src/test/java/org/springframework/jdbc/core/RowMapperTests.java index a8edb68e3b4..2031d4acf8b 100644 --- a/spring-jdbc/src/test/java/org/springframework/jdbc/core/RowMapperTests.java +++ b/spring-jdbc/src/test/java/org/springframework/jdbc/core/RowMapperTests.java @@ -28,9 +28,9 @@ import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.jdbc.datasource.SingleConnectionDataSource; import org.springframework.jdbc.support.SQLStateSQLExceptionTranslator; -import org.springframework.tests.sample.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.ArgumentMatchers.anyString; diff --git a/spring-jdbc/src/test/java/org/springframework/jdbc/core/namedparam/BeanPropertySqlParameterSourceTests.java b/spring-jdbc/src/test/java/org/springframework/jdbc/core/namedparam/BeanPropertySqlParameterSourceTests.java index cb1891d8c3f..b95761476f6 100644 --- a/spring-jdbc/src/test/java/org/springframework/jdbc/core/namedparam/BeanPropertySqlParameterSourceTests.java +++ b/spring-jdbc/src/test/java/org/springframework/jdbc/core/namedparam/BeanPropertySqlParameterSourceTests.java @@ -21,7 +21,7 @@ import java.util.Arrays; import org.junit.jupiter.api.Test; -import org.springframework.tests.sample.beans.TestBean; +import org.springframework.beans.test.fixtures.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException; diff --git a/spring-jdbc/src/test/java/org/springframework/jdbc/core/support/JdbcBeanDefinitionReaderTests.java b/spring-jdbc/src/test/java/org/springframework/jdbc/core/support/JdbcBeanDefinitionReaderTests.java index c2a14f0f0e4..da965268347 100644 --- a/spring-jdbc/src/test/java/org/springframework/jdbc/core/support/JdbcBeanDefinitionReaderTests.java +++ b/spring-jdbc/src/test/java/org/springframework/jdbc/core/support/JdbcBeanDefinitionReaderTests.java @@ -25,7 +25,7 @@ import javax.sql.DataSource; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.support.DefaultListableBeanFactory; -import org.springframework.tests.sample.beans.TestBean; +import org.springframework.beans.test.fixtures.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.BDDMockito.given; @@ -49,7 +49,7 @@ public class JdbcBeanDefinitionReaderTests { given(resultSet.next()).willReturn(true, true, false); given(resultSet.getString(1)).willReturn("one", "one"); given(resultSet.getString(2)).willReturn("(class)", "age"); - given(resultSet.getString(3)).willReturn("org.springframework.tests.sample.beans.TestBean", "53"); + given(resultSet.getString(3)).willReturn("org.springframework.beans.test.fixtures.beans.TestBean", "53"); Statement statement = mock(Statement.class); given(statement.executeQuery(sql)).willReturn(resultSet); @@ -66,4 +66,5 @@ public class JdbcBeanDefinitionReaderTests { verify(resultSet).close(); verify(statement).close(); } + } diff --git a/spring-jms/spring-jms.gradle b/spring-jms/spring-jms.gradle index 23cae3cf57d..e47e9458ce5 100644 --- a/spring-jms/spring-jms.gradle +++ b/spring-jms/spring-jms.gradle @@ -12,5 +12,6 @@ dependencies { optional("javax.resource:javax.resource-api") optional("javax.transaction:javax.transaction-api") optional("com.fasterxml.jackson.core:jackson-databind") + testCompile(testFixtures(project(":spring-beans"))) testImplementation("javax.jms:javax.jms-api") } diff --git a/spring-jms/src/test/java/org/springframework/jms/config/JmsNamespaceHandlerTests.java b/spring-jms/src/test/java/org/springframework/jms/config/JmsNamespaceHandlerTests.java index 9627ee22044..86920c2c52b 100644 --- a/spring-jms/src/test/java/org/springframework/jms/config/JmsNamespaceHandlerTests.java +++ b/spring-jms/src/test/java/org/springframework/jms/config/JmsNamespaceHandlerTests.java @@ -38,13 +38,13 @@ import org.springframework.beans.factory.parsing.EmptyReaderEventListener; import org.springframework.beans.factory.parsing.PassThroughSourceExtractor; import org.springframework.beans.factory.parsing.ReaderEventListener; import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.context.Phased; import org.springframework.context.support.ClassPathXmlApplicationContext; import org.springframework.jca.endpoint.GenericMessageEndpointManager; import org.springframework.jms.listener.DefaultMessageListenerContainer; import org.springframework.jms.listener.adapter.MessageListenerAdapter; import org.springframework.jms.listener.endpoint.JmsMessageEndpointManager; -import org.springframework.tests.sample.beans.TestBean; import org.springframework.util.ErrorHandler; import org.springframework.util.backoff.BackOff; import org.springframework.util.backoff.FixedBackOff; diff --git a/spring-jms/src/test/java/org/springframework/jms/remoting/JmsInvokerTests.java b/spring-jms/src/test/java/org/springframework/jms/remoting/JmsInvokerTests.java index da4c7df35d3..e85f771cb89 100644 --- a/spring-jms/src/test/java/org/springframework/jms/remoting/JmsInvokerTests.java +++ b/spring-jms/src/test/java/org/springframework/jms/remoting/JmsInvokerTests.java @@ -35,11 +35,11 @@ import javax.jms.Session; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; +import org.springframework.beans.test.fixtures.beans.ITestBean; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.jms.support.converter.MessageConversionException; import org.springframework.jms.support.converter.SimpleMessageConverter; import org.springframework.remoting.RemoteTimeoutException; -import org.springframework.tests.sample.beans.ITestBean; -import org.springframework.tests.sample.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; diff --git a/spring-jms/src/test/resources/org/springframework/jms/config/jmsNamespaceHandlerTests.xml b/spring-jms/src/test/resources/org/springframework/jms/config/jmsNamespaceHandlerTests.xml index 464b9a917c7..79711ceb07f 100644 --- a/spring-jms/src/test/resources/org/springframework/jms/config/jmsNamespaceHandlerTests.xml +++ b/spring-jms/src/test/resources/org/springframework/jms/config/jmsNamespaceHandlerTests.xml @@ -76,9 +76,9 @@ - + - + diff --git a/spring-orm/spring-orm.gradle b/spring-orm/spring-orm.gradle index 7c213fbbc7b..06686d31d2c 100644 --- a/spring-orm/spring-orm.gradle +++ b/spring-orm/spring-orm.gradle @@ -11,6 +11,8 @@ dependencies { optional("org.eclipse.persistence:org.eclipse.persistence.jpa") optional("org.hibernate:hibernate-core") optional("javax.servlet:javax.servlet-api:3.1.0") + testCompile(testFixtures(project(":spring-beans"))) + testCompile(testFixtures(project(":spring-context"))) testCompile(testFixtures(project(":spring-core"))) testCompile("org.aspectj:aspectjweaver") testCompile("org.hsqldb:hsqldb") diff --git a/spring-orm/src/test/java/org/springframework/orm/jpa/domain/Person.java b/spring-orm/src/test/java/org/springframework/orm/jpa/domain/Person.java index 3cba5344cfb..df2e48fdc10 100644 --- a/spring-orm/src/test/java/org/springframework/orm/jpa/domain/Person.java +++ b/spring-orm/src/test/java/org/springframework/orm/jpa/domain/Person.java @@ -27,8 +27,8 @@ import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.OneToOne; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.context.ApplicationContext; -import org.springframework.tests.sample.beans.TestBean; /** * Simple JavaBean domain object representing an person. diff --git a/spring-orm/src/test/java/org/springframework/orm/jpa/persistenceunit/DefaultPersistenceUnitManagerTests.java b/spring-orm/src/test/java/org/springframework/orm/jpa/persistenceunit/DefaultPersistenceUnitManagerTests.java index 149a28ad557..2dac01aab89 100644 --- a/spring-orm/src/test/java/org/springframework/orm/jpa/persistenceunit/DefaultPersistenceUnitManagerTests.java +++ b/spring-orm/src/test/java/org/springframework/orm/jpa/persistenceunit/DefaultPersistenceUnitManagerTests.java @@ -18,7 +18,7 @@ package org.springframework.orm.jpa.persistenceunit; import org.junit.jupiter.api.Test; -import org.springframework.context.index.CandidateComponentsTestClassLoader; +import org.springframework.context.test.fixtures.index.CandidateComponentsTestClassLoader; import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.DefaultResourceLoader; import org.springframework.orm.jpa.domain.Person; diff --git a/spring-orm/src/test/java/org/springframework/orm/jpa/persistenceunit/PersistenceXmlParsingTests.java b/spring-orm/src/test/java/org/springframework/orm/jpa/persistenceunit/PersistenceXmlParsingTests.java index 781027af228..3e3da8b68d6 100644 --- a/spring-orm/src/test/java/org/springframework/orm/jpa/persistenceunit/PersistenceXmlParsingTests.java +++ b/spring-orm/src/test/java/org/springframework/orm/jpa/persistenceunit/PersistenceXmlParsingTests.java @@ -28,6 +28,7 @@ import javax.sql.DataSource; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; +import org.springframework.context.test.fixtures.jndi.SimpleNamingContextBuilder; import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.Resource; import org.springframework.core.io.UrlResource; @@ -35,7 +36,6 @@ import org.springframework.core.io.support.PathMatchingResourcePatternResolver; import org.springframework.jdbc.datasource.DriverManagerDataSource; import org.springframework.jdbc.datasource.lookup.JndiDataSourceLookup; import org.springframework.jdbc.datasource.lookup.MapDataSourceLookup; -import org.springframework.tests.mock.jndi.SimpleNamingContextBuilder; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; diff --git a/spring-orm/src/test/java/org/springframework/orm/jpa/support/PersistenceInjectionTests.java b/spring-orm/src/test/java/org/springframework/orm/jpa/support/PersistenceInjectionTests.java index 3be9625da31..885e22d77c3 100644 --- a/spring-orm/src/test/java/org/springframework/orm/jpa/support/PersistenceInjectionTests.java +++ b/spring-orm/src/test/java/org/springframework/orm/jpa/support/PersistenceInjectionTests.java @@ -37,6 +37,8 @@ import org.springframework.beans.factory.FactoryBean; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.support.RootBeanDefinition; import org.springframework.context.support.GenericApplicationContext; +import org.springframework.context.test.fixtures.SimpleMapScope; +import org.springframework.context.test.fixtures.jndi.ExpectedLookupTemplate; import org.springframework.core.test.fixtures.io.SerializationTestUtils; import org.springframework.lang.Nullable; import org.springframework.orm.jpa.AbstractEntityManagerFactoryBeanTests; @@ -44,8 +46,6 @@ import org.springframework.orm.jpa.DefaultJpaDialect; import org.springframework.orm.jpa.EntityManagerFactoryInfo; import org.springframework.orm.jpa.EntityManagerHolder; import org.springframework.stereotype.Repository; -import org.springframework.tests.context.SimpleMapScope; -import org.springframework.tests.mock.jndi.ExpectedLookupTemplate; import org.springframework.transaction.support.TransactionSynchronizationManager; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-orm/src/test/resources/org/springframework/orm/jpa/domain/persistence-multi.xml b/spring-orm/src/test/resources/org/springframework/orm/jpa/domain/persistence-multi.xml index e729dfeabc3..082a1b1932a 100644 --- a/spring-orm/src/test/resources/org/springframework/orm/jpa/domain/persistence-multi.xml +++ b/spring-orm/src/test/resources/org/springframework/orm/jpa/domain/persistence-multi.xml @@ -9,7 +9,7 @@ - org.springframework.tests.sample.beans.TestBean + org.springframework.beans.test.fixtures.beans.TestBean diff --git a/spring-test/spring-test.gradle b/spring-test/spring-test.gradle index 0b66f51e277..053ab77e3bd 100644 --- a/spring-test/spring-test.gradle +++ b/spring-test/spring-test.gradle @@ -42,6 +42,8 @@ dependencies { optional("org.jetbrains.kotlinx:kotlinx-coroutines-reactor") testCompile(project(":spring-context-support")) testCompile(project(":spring-oxm")) + testCompile(testFixtures(project(":spring-beans"))) + testCompile(testFixtures(project(":spring-context"))) testCompile(testFixtures(project(":spring-core"))) testCompile("javax.annotation:javax.annotation-api") testCompile("javax.cache:cache-api") diff --git a/spring-context/src/test/java/org/springframework/jndi/SimpleNamingContextTests.java b/spring-test/src/test/java/org/springframework/mock/jndi/SimpleNamingContextTests.java similarity index 96% rename from spring-context/src/test/java/org/springframework/jndi/SimpleNamingContextTests.java rename to spring-test/src/test/java/org/springframework/mock/jndi/SimpleNamingContextTests.java index 9e3d5bed8c7..9ccab9ec3cb 100644 --- a/spring-context/src/test/java/org/springframework/jndi/SimpleNamingContextTests.java +++ b/spring-test/src/test/java/org/springframework/mock/jndi/SimpleNamingContextTests.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.jndi; +package org.springframework.mock.jndi; import java.io.PrintWriter; import java.sql.Connection; @@ -36,20 +36,20 @@ import javax.sql.DataSource; import org.junit.jupiter.api.Test; -import org.springframework.tests.mock.jndi.SimpleNamingContext; -import org.springframework.tests.mock.jndi.SimpleNamingContextBuilder; - import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; /** + * Tests for {@link SimpleNamingContextBuilder} and {@link SimpleNamingContext}. + * * @author Juergen Hoeller * @author Chris Beams */ -public class SimpleNamingContextTests { +@SuppressWarnings("deprecation") +class SimpleNamingContextTests { @Test - public void testNamingContextBuilder() throws NamingException { + void namingContextBuilder() throws NamingException { SimpleNamingContextBuilder builder = new SimpleNamingContextBuilder(); InitialContextFactory factory = builder.createInitialContextFactory(null); @@ -168,7 +168,7 @@ public class SimpleNamingContextTests { * used repeatedly, and how it affects creating a new InitialContext() */ @Test - public void testCreateInitialContext() throws Exception { + void createInitialContext() throws Exception { SimpleNamingContextBuilder builder = SimpleNamingContextBuilder.emptyActivatedContextBuilder(); String name = "foo"; Object o = new Object(); diff --git a/spring-test/src/test/java/org/springframework/test/context/configuration/ContextConfigurationWithPropertiesExtendingPropertiesAndInheritedLoaderTests.java b/spring-test/src/test/java/org/springframework/test/context/configuration/ContextConfigurationWithPropertiesExtendingPropertiesAndInheritedLoaderTests.java index b8f378ce980..793ae833f22 100644 --- a/spring-test/src/test/java/org/springframework/test/context/configuration/ContextConfigurationWithPropertiesExtendingPropertiesAndInheritedLoaderTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/configuration/ContextConfigurationWithPropertiesExtendingPropertiesAndInheritedLoaderTests.java @@ -19,10 +19,10 @@ package org.springframework.test.context.configuration; import org.junit.Test; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.test.fixtures.beans.Pet; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.ContextLoader; import org.springframework.test.context.junit4.PropertiesBasedSpringJUnit4ClassRunnerAppCtxTests; -import org.springframework.tests.sample.beans.Pet; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-test/src/test/java/org/springframework/test/context/configuration/ContextConfigurationWithPropertiesExtendingPropertiesTests.java b/spring-test/src/test/java/org/springframework/test/context/configuration/ContextConfigurationWithPropertiesExtendingPropertiesTests.java index 627c812f0e4..8faf721a1df 100644 --- a/spring-test/src/test/java/org/springframework/test/context/configuration/ContextConfigurationWithPropertiesExtendingPropertiesTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/configuration/ContextConfigurationWithPropertiesExtendingPropertiesTests.java @@ -19,11 +19,11 @@ package org.springframework.test.context.configuration; import org.junit.Test; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.test.fixtures.beans.Pet; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.ContextLoader; import org.springframework.test.context.junit4.PropertiesBasedSpringJUnit4ClassRunnerAppCtxTests; import org.springframework.test.context.support.GenericPropertiesContextLoader; -import org.springframework.tests.sample.beans.Pet; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-test/src/test/java/org/springframework/test/context/configuration/interfaces/ActiveProfilesInterfaceTests.java b/spring-test/src/test/java/org/springframework/test/context/configuration/interfaces/ActiveProfilesInterfaceTests.java index 3a6d264e0b2..e12e08f6215 100644 --- a/spring-test/src/test/java/org/springframework/test/context/configuration/interfaces/ActiveProfilesInterfaceTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/configuration/interfaces/ActiveProfilesInterfaceTests.java @@ -20,11 +20,11 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.test.fixtures.beans.Employee; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Profile; import org.springframework.test.context.junit.jupiter.SpringExtension; -import org.springframework.tests.sample.beans.Employee; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-test/src/test/java/org/springframework/test/context/configuration/interfaces/ContextConfigurationInterfaceTests.java b/spring-test/src/test/java/org/springframework/test/context/configuration/interfaces/ContextConfigurationInterfaceTests.java index 8f302fd4232..f1fdd2530d2 100644 --- a/spring-test/src/test/java/org/springframework/test/context/configuration/interfaces/ContextConfigurationInterfaceTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/configuration/interfaces/ContextConfigurationInterfaceTests.java @@ -20,8 +20,8 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.test.fixtures.beans.Employee; import org.springframework.test.context.junit.jupiter.SpringExtension; -import org.springframework.tests.sample.beans.Employee; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-test/src/test/java/org/springframework/test/context/configuration/interfaces/ContextConfigurationTestInterface.java b/spring-test/src/test/java/org/springframework/test/context/configuration/interfaces/ContextConfigurationTestInterface.java index d3f8da40553..2032969f925 100644 --- a/spring-test/src/test/java/org/springframework/test/context/configuration/interfaces/ContextConfigurationTestInterface.java +++ b/spring-test/src/test/java/org/springframework/test/context/configuration/interfaces/ContextConfigurationTestInterface.java @@ -16,10 +16,10 @@ package org.springframework.test.context.configuration.interfaces; +import org.springframework.beans.test.fixtures.beans.Employee; import org.springframework.context.annotation.Bean; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.configuration.interfaces.ContextConfigurationTestInterface.Config; -import org.springframework.tests.sample.beans.Employee; /** * @author Sam Brannen diff --git a/spring-test/src/test/java/org/springframework/test/context/groovy/DefaultScriptDetectionGroovySpringContextTests.java b/spring-test/src/test/java/org/springframework/test/context/groovy/DefaultScriptDetectionGroovySpringContextTests.java index 038dc5200e2..ad183ac27b9 100644 --- a/spring-test/src/test/java/org/springframework/test/context/groovy/DefaultScriptDetectionGroovySpringContextTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/groovy/DefaultScriptDetectionGroovySpringContextTests.java @@ -19,9 +19,9 @@ package org.springframework.test.context.groovy; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.test.fixtures.beans.Employee; +import org.springframework.beans.test.fixtures.beans.Pet; import org.springframework.test.context.junit.jupiter.SpringJUnitConfig; -import org.springframework.tests.sample.beans.Employee; -import org.springframework.tests.sample.beans.Pet; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-test/src/test/java/org/springframework/test/context/groovy/GroovyControlGroupTests.java b/spring-test/src/test/java/org/springframework/test/context/groovy/GroovyControlGroupTests.java index db5995a1d5f..62bc6b646bb 100644 --- a/spring-test/src/test/java/org/springframework/test/context/groovy/GroovyControlGroupTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/groovy/GroovyControlGroupTests.java @@ -18,10 +18,10 @@ package org.springframework.test.context.groovy; import org.junit.jupiter.api.Test; +import org.springframework.beans.test.fixtures.beans.Employee; +import org.springframework.beans.test.fixtures.beans.Pet; import org.springframework.context.ApplicationContext; import org.springframework.context.support.GenericGroovyApplicationContext; -import org.springframework.tests.sample.beans.Employee; -import org.springframework.tests.sample.beans.Pet; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-test/src/test/java/org/springframework/test/context/groovy/GroovySpringContextTests.java b/spring-test/src/test/java/org/springframework/test/context/groovy/GroovySpringContextTests.java index 0bfd5900a90..69b6398b51a 100644 --- a/spring-test/src/test/java/org/springframework/test/context/groovy/GroovySpringContextTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/groovy/GroovySpringContextTests.java @@ -24,11 +24,11 @@ import org.junit.jupiter.api.extension.ExtendWith; import org.springframework.beans.factory.BeanNameAware; import org.springframework.beans.factory.InitializingBean; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.test.fixtures.beans.Employee; +import org.springframework.beans.test.fixtures.beans.Pet; import org.springframework.context.ApplicationContext; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit.jupiter.SpringExtension; -import org.springframework.tests.sample.beans.Employee; -import org.springframework.tests.sample.beans.Pet; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-test/src/test/java/org/springframework/test/context/groovy/MixedXmlAndGroovySpringContextTests.java b/spring-test/src/test/java/org/springframework/test/context/groovy/MixedXmlAndGroovySpringContextTests.java index 7d2ecdfe057..a6f9da71748 100644 --- a/spring-test/src/test/java/org/springframework/test/context/groovy/MixedXmlAndGroovySpringContextTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/groovy/MixedXmlAndGroovySpringContextTests.java @@ -20,10 +20,10 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.test.fixtures.beans.Employee; +import org.springframework.beans.test.fixtures.beans.Pet; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit.jupiter.SpringExtension; -import org.springframework.tests.sample.beans.Employee; -import org.springframework.tests.sample.beans.Pet; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/ConcreteTransactionalJUnit4SpringContextTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/ConcreteTransactionalJUnit4SpringContextTests.java index 1a1df45c172..1c0a5ebec49 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/ConcreteTransactionalJUnit4SpringContextTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/ConcreteTransactionalJUnit4SpringContextTests.java @@ -25,11 +25,11 @@ import org.junit.Test; import org.springframework.beans.factory.BeanNameAware; import org.springframework.beans.factory.InitializingBean; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.test.fixtures.beans.Employee; +import org.springframework.beans.test.fixtures.beans.Pet; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.transaction.AfterTransaction; import org.springframework.test.context.transaction.BeforeTransaction; -import org.springframework.tests.sample.beans.Employee; -import org.springframework.tests.sample.beans.Pet; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/CustomDefaultContextLoaderClassSpringRunnerTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/CustomDefaultContextLoaderClassSpringRunnerTests.java index 34a6bd298c0..44630b7c30a 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/CustomDefaultContextLoaderClassSpringRunnerTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/CustomDefaultContextLoaderClassSpringRunnerTests.java @@ -20,12 +20,12 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.test.fixtures.beans.Pet; import org.springframework.test.context.BootstrapWith; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.ContextLoader; import org.springframework.test.context.support.DefaultTestContextBootstrapper; import org.springframework.test.context.support.GenericPropertiesContextLoader; -import org.springframework.tests.sample.beans.Pet; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/ParameterizedDependencyInjectionTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/ParameterizedDependencyInjectionTests.java index 52465a73590..6bb02c2bb38 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/ParameterizedDependencyInjectionTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/ParameterizedDependencyInjectionTests.java @@ -28,13 +28,13 @@ import org.junit.runners.Parameterized.Parameter; import org.junit.runners.Parameterized.Parameters; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.test.fixtures.beans.Employee; +import org.springframework.beans.test.fixtures.beans.Pet; import org.springframework.context.ApplicationContext; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.TestContextManager; import org.springframework.test.context.TestExecutionListeners; import org.springframework.test.context.support.DependencyInjectionTestExecutionListener; -import org.springframework.tests.sample.beans.Employee; -import org.springframework.tests.sample.beans.Pet; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/PropertiesBasedSpringJUnit4ClassRunnerAppCtxTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/PropertiesBasedSpringJUnit4ClassRunnerAppCtxTests.java index 536f4123b9d..d857b3efba0 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/PropertiesBasedSpringJUnit4ClassRunnerAppCtxTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/PropertiesBasedSpringJUnit4ClassRunnerAppCtxTests.java @@ -22,10 +22,10 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.test.fixtures.beans.Pet; import org.springframework.context.ApplicationContext; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.support.GenericPropertiesContextLoader; -import org.springframework.tests.sample.beans.Pet; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/SpringJUnit4ClassRunnerAppCtxTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/SpringJUnit4ClassRunnerAppCtxTests.java index c5af71596e5..4b9a30782cd 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/SpringJUnit4ClassRunnerAppCtxTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/SpringJUnit4ClassRunnerAppCtxTests.java @@ -28,14 +28,14 @@ import org.springframework.beans.factory.InitializingBean; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.beans.factory.annotation.Value; +import org.springframework.beans.test.fixtures.beans.Employee; +import org.springframework.beans.test.fixtures.beans.Pet; import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContextAware; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.TestExecutionListeners; import org.springframework.test.context.support.DependencyInjectionTestExecutionListener; import org.springframework.test.context.support.GenericXmlContextLoader; -import org.springframework.tests.sample.beans.Employee; -import org.springframework.tests.sample.beans.Pet; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/BeanOverridingDefaultConfigClassesInheritedTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/BeanOverridingDefaultConfigClassesInheritedTests.java index 2c481468524..76e976a4d8e 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/BeanOverridingDefaultConfigClassesInheritedTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/BeanOverridingDefaultConfigClassesInheritedTests.java @@ -18,10 +18,10 @@ package org.springframework.test.context.junit4.annotation; import org.junit.Test; +import org.springframework.beans.test.fixtures.beans.Employee; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.test.context.ContextConfiguration; -import org.springframework.tests.sample.beans.Employee; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/DefaultConfigClassesBaseTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/DefaultConfigClassesBaseTests.java index 364a4b8d898..3379b6dac9d 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/DefaultConfigClassesBaseTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/DefaultConfigClassesBaseTests.java @@ -20,12 +20,12 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.test.fixtures.beans.Employee; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.test.context.support.AnnotationConfigContextLoader; -import org.springframework.tests.sample.beans.Employee; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/DefaultConfigClassesInheritedTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/DefaultConfigClassesInheritedTests.java index 8b04b99baa3..94a39e04271 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/DefaultConfigClassesInheritedTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/DefaultConfigClassesInheritedTests.java @@ -19,10 +19,10 @@ package org.springframework.test.context.junit4.annotation; import org.junit.Test; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.test.fixtures.beans.Pet; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.test.context.ContextConfiguration; -import org.springframework.tests.sample.beans.Pet; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/DefaultLoaderBeanOverridingDefaultConfigClassesInheritedTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/DefaultLoaderBeanOverridingDefaultConfigClassesInheritedTests.java index 70f22f16b66..af2e2fbd4fb 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/DefaultLoaderBeanOverridingDefaultConfigClassesInheritedTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/DefaultLoaderBeanOverridingDefaultConfigClassesInheritedTests.java @@ -18,11 +18,11 @@ package org.springframework.test.context.junit4.annotation; import org.junit.Test; +import org.springframework.beans.test.fixtures.beans.Employee; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.support.DelegatingSmartContextLoader; -import org.springframework.tests.sample.beans.Employee; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/DefaultLoaderDefaultConfigClassesBaseTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/DefaultLoaderDefaultConfigClassesBaseTests.java index 487b23239eb..5a83e9743aa 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/DefaultLoaderDefaultConfigClassesBaseTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/DefaultLoaderDefaultConfigClassesBaseTests.java @@ -20,12 +20,12 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.test.fixtures.beans.Employee; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.test.context.support.DelegatingSmartContextLoader; -import org.springframework.tests.sample.beans.Employee; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/DefaultLoaderDefaultConfigClassesInheritedTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/DefaultLoaderDefaultConfigClassesInheritedTests.java index 9781667959b..6b8ef56dc2c 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/DefaultLoaderDefaultConfigClassesInheritedTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/DefaultLoaderDefaultConfigClassesInheritedTests.java @@ -19,11 +19,11 @@ package org.springframework.test.context.junit4.annotation; import org.junit.Test; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.test.fixtures.beans.Pet; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.support.DelegatingSmartContextLoader; -import org.springframework.tests.sample.beans.Pet; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/DefaultLoaderExplicitConfigClassesBaseTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/DefaultLoaderExplicitConfigClassesBaseTests.java index 551a055ec6d..be882d7fe11 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/DefaultLoaderExplicitConfigClassesBaseTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/DefaultLoaderExplicitConfigClassesBaseTests.java @@ -20,10 +20,10 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.test.fixtures.beans.Employee; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.test.context.support.DelegatingSmartContextLoader; -import org.springframework.tests.sample.beans.Employee; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/DefaultLoaderExplicitConfigClassesInheritedTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/DefaultLoaderExplicitConfigClassesInheritedTests.java index d81e7a9fd7b..1c8534d762e 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/DefaultLoaderExplicitConfigClassesInheritedTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/DefaultLoaderExplicitConfigClassesInheritedTests.java @@ -20,10 +20,10 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.test.fixtures.beans.Pet; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.test.context.support.DelegatingSmartContextLoader; -import org.springframework.tests.sample.beans.Pet; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/ExplicitConfigClassesBaseTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/ExplicitConfigClassesBaseTests.java index 0ebdc22ef9a..fb84053a80c 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/ExplicitConfigClassesBaseTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/ExplicitConfigClassesBaseTests.java @@ -20,10 +20,10 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.test.fixtures.beans.Employee; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.test.context.support.AnnotationConfigContextLoader; -import org.springframework.tests.sample.beans.Employee; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/ExplicitConfigClassesInheritedTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/ExplicitConfigClassesInheritedTests.java index 53397d5ffc9..db8f9dceeeb 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/ExplicitConfigClassesInheritedTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/ExplicitConfigClassesInheritedTests.java @@ -20,10 +20,10 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.test.fixtures.beans.Pet; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.test.context.support.AnnotationConfigContextLoader; -import org.springframework.tests.sample.beans.Pet; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/PojoAndStringConfig.java b/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/PojoAndStringConfig.java index fab6e51dbf4..35f923e33f6 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/PojoAndStringConfig.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/PojoAndStringConfig.java @@ -16,10 +16,10 @@ package org.springframework.test.context.junit4.annotation; +import org.springframework.beans.test.fixtures.beans.Employee; +import org.springframework.beans.test.fixtures.beans.Pet; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; -import org.springframework.tests.sample.beans.Employee; -import org.springframework.tests.sample.beans.Pet; /** * ApplicationContext configuration class for various integration tests. diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/meta/ConfigClassesAndProfilesWithCustomDefaultsMetaConfigWithOverridesTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/meta/ConfigClassesAndProfilesWithCustomDefaultsMetaConfigWithOverridesTests.java index e3cbf9cbeef..2e55003a359 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/meta/ConfigClassesAndProfilesWithCustomDefaultsMetaConfigWithOverridesTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/meta/ConfigClassesAndProfilesWithCustomDefaultsMetaConfigWithOverridesTests.java @@ -20,10 +20,10 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.test.fixtures.beans.Employee; +import org.springframework.beans.test.fixtures.beans.Pet; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.test.context.junit4.annotation.PojoAndStringConfig; -import org.springframework.tests.sample.beans.Employee; -import org.springframework.tests.sample.beans.Pet; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/profile/annotation/DefaultProfileAnnotationConfigTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/profile/annotation/DefaultProfileAnnotationConfigTests.java index e9696e7b921..d55bd479d95 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/profile/annotation/DefaultProfileAnnotationConfigTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/profile/annotation/DefaultProfileAnnotationConfigTests.java @@ -20,11 +20,11 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.test.fixtures.beans.Employee; +import org.springframework.beans.test.fixtures.beans.Pet; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.test.context.support.AnnotationConfigContextLoader; -import org.springframework.tests.sample.beans.Employee; -import org.springframework.tests.sample.beans.Pet; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/profile/annotation/DefaultProfileConfig.java b/spring-test/src/test/java/org/springframework/test/context/junit4/profile/annotation/DefaultProfileConfig.java index 9f23e674e3a..3fc8d23c5b8 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/profile/annotation/DefaultProfileConfig.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/profile/annotation/DefaultProfileConfig.java @@ -16,9 +16,9 @@ package org.springframework.test.context.junit4.profile.annotation; +import org.springframework.beans.test.fixtures.beans.Pet; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; -import org.springframework.tests.sample.beans.Pet; /** * @author Sam Brannen diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/profile/annotation/DevProfileConfig.java b/spring-test/src/test/java/org/springframework/test/context/junit4/profile/annotation/DevProfileConfig.java index d1a3d05aef4..c0a1bcf87b1 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/profile/annotation/DevProfileConfig.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/profile/annotation/DevProfileConfig.java @@ -16,10 +16,10 @@ package org.springframework.test.context.junit4.profile.annotation; +import org.springframework.beans.test.fixtures.beans.Employee; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Profile; -import org.springframework.tests.sample.beans.Employee; /** * @author Sam Brannen diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/profile/importresource/DefaultProfileAnnotationConfigTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/profile/importresource/DefaultProfileAnnotationConfigTests.java index 9260774a976..4492b9edca7 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/profile/importresource/DefaultProfileAnnotationConfigTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/profile/importresource/DefaultProfileAnnotationConfigTests.java @@ -20,10 +20,10 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.test.fixtures.beans.Employee; +import org.springframework.beans.test.fixtures.beans.Pet; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; -import org.springframework.tests.sample.beans.Employee; -import org.springframework.tests.sample.beans.Pet; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/profile/importresource/DefaultProfileConfig.java b/spring-test/src/test/java/org/springframework/test/context/junit4/profile/importresource/DefaultProfileConfig.java index afcfc8722b0..a37a9172a55 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/profile/importresource/DefaultProfileConfig.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/profile/importresource/DefaultProfileConfig.java @@ -16,10 +16,10 @@ package org.springframework.test.context.junit4.profile.importresource; +import org.springframework.beans.test.fixtures.beans.Pet; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.ImportResource; -import org.springframework.tests.sample.beans.Pet; /** * @author Juergen Hoeller diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/profile/xml/DefaultProfileXmlConfigTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/profile/xml/DefaultProfileXmlConfigTests.java index 2e4bde73603..8663a2fb3c5 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/profile/xml/DefaultProfileXmlConfigTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/profile/xml/DefaultProfileXmlConfigTests.java @@ -20,10 +20,10 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.test.fixtures.beans.Employee; +import org.springframework.beans.test.fixtures.beans.Pet; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; -import org.springframework.tests.sample.beans.Employee; -import org.springframework.tests.sample.beans.Pet; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/rules/ParameterizedSpringRuleTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/rules/ParameterizedSpringRuleTests.java index 1a361193f19..0b36a0aaeaf 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/rules/ParameterizedSpringRuleTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/rules/ParameterizedSpringRuleTests.java @@ -29,10 +29,10 @@ import org.junit.runners.Parameterized.Parameter; import org.junit.runners.Parameterized.Parameters; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.test.fixtures.beans.Employee; +import org.springframework.beans.test.fixtures.beans.Pet; import org.springframework.context.ApplicationContext; import org.springframework.test.context.ContextConfiguration; -import org.springframework.tests.sample.beans.Employee; -import org.springframework.tests.sample.beans.Pet; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/spr3896/DefaultLocationsBaseTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/spr3896/DefaultLocationsBaseTests.java index bb7d1830fb5..5d9cc739757 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/spr3896/DefaultLocationsBaseTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/spr3896/DefaultLocationsBaseTests.java @@ -20,9 +20,9 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.test.fixtures.beans.Employee; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; -import org.springframework.tests.sample.beans.Employee; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/spr3896/DefaultLocationsInheritedTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/spr3896/DefaultLocationsInheritedTests.java index 8152d1c52a5..10b0a0f8b31 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/spr3896/DefaultLocationsInheritedTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/spr3896/DefaultLocationsInheritedTests.java @@ -19,8 +19,8 @@ package org.springframework.test.context.junit4.spr3896; import org.junit.Test; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.test.fixtures.beans.Pet; import org.springframework.test.context.ContextConfiguration; -import org.springframework.tests.sample.beans.Pet; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/spr3896/ExplicitLocationsBaseTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/spr3896/ExplicitLocationsBaseTests.java index 3d3e8cc20a5..0ef3e083719 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/spr3896/ExplicitLocationsBaseTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/spr3896/ExplicitLocationsBaseTests.java @@ -20,9 +20,9 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.test.fixtures.beans.Employee; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; -import org.springframework.tests.sample.beans.Employee; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/spr3896/ExplicitLocationsInheritedTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/spr3896/ExplicitLocationsInheritedTests.java index bcef27f2c88..5471e91fea7 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/spr3896/ExplicitLocationsInheritedTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/spr3896/ExplicitLocationsInheritedTests.java @@ -19,8 +19,8 @@ package org.springframework.test.context.junit4.spr3896; import org.junit.Test; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.test.fixtures.beans.Pet; import org.springframework.test.context.ContextConfiguration; -import org.springframework.tests.sample.beans.Pet; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/spr9051/AbstractTransactionalAnnotatedConfigClassTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/spr9051/AbstractTransactionalAnnotatedConfigClassTests.java index 116674b3ed8..6c53bf67946 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/spr9051/AbstractTransactionalAnnotatedConfigClassTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/spr9051/AbstractTransactionalAnnotatedConfigClassTests.java @@ -24,6 +24,7 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.test.fixtures.beans.Employee; import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.jdbc.datasource.DataSourceTransactionManager; import org.springframework.test.annotation.DirtiesContext; @@ -31,7 +32,6 @@ import org.springframework.test.annotation.DirtiesContext.ClassMode; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.test.context.transaction.AfterTransaction; import org.springframework.test.context.transaction.BeforeTransaction; -import org.springframework.tests.sample.beans.Employee; import org.springframework.transaction.annotation.Transactional; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/spr9051/TransactionalAnnotatedConfigClassWithAtConfigurationTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/spr9051/TransactionalAnnotatedConfigClassWithAtConfigurationTests.java index 6ed5f85359e..d549cadee21 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/spr9051/TransactionalAnnotatedConfigClassWithAtConfigurationTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/spr9051/TransactionalAnnotatedConfigClassWithAtConfigurationTests.java @@ -20,12 +20,12 @@ import javax.sql.DataSource; import org.junit.Before; +import org.springframework.beans.test.fixtures.beans.Employee; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.jdbc.datasource.DataSourceTransactionManager; import org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseBuilder; import org.springframework.test.context.ContextConfiguration; -import org.springframework.tests.sample.beans.Employee; import org.springframework.transaction.PlatformTransactionManager; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/spr9051/TransactionalAnnotatedConfigClassesWithoutAtConfigurationTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/spr9051/TransactionalAnnotatedConfigClassesWithoutAtConfigurationTests.java index 2b6b6d575b2..013073531f6 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/spr9051/TransactionalAnnotatedConfigClassesWithoutAtConfigurationTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/spr9051/TransactionalAnnotatedConfigClassesWithoutAtConfigurationTests.java @@ -20,6 +20,7 @@ import javax.sql.DataSource; import org.junit.Before; +import org.springframework.beans.test.fixtures.beans.Employee; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.jdbc.core.JdbcTemplate; @@ -28,7 +29,6 @@ import org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseBuilder; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.transaction.AfterTransaction; import org.springframework.test.context.transaction.TransactionalTestExecutionListener; -import org.springframework.tests.sample.beans.Employee; import org.springframework.transaction.PlatformTransactionManager; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-test/src/test/java/org/springframework/test/context/testng/AnnotationConfigTestNGSpringContextTests.java b/spring-test/src/test/java/org/springframework/test/context/testng/AnnotationConfigTestNGSpringContextTests.java index a8fa8037cbc..5cbbcc10e18 100644 --- a/spring-test/src/test/java/org/springframework/test/context/testng/AnnotationConfigTestNGSpringContextTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/testng/AnnotationConfigTestNGSpringContextTests.java @@ -19,11 +19,11 @@ package org.springframework.test.context.testng; import org.testng.annotations.Test; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.test.fixtures.beans.Employee; +import org.springframework.beans.test.fixtures.beans.Pet; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.test.context.ContextConfiguration; -import org.springframework.tests.sample.beans.Employee; -import org.springframework.tests.sample.beans.Pet; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-test/src/test/java/org/springframework/test/context/testng/AnnotationConfigTransactionalTestNGSpringContextTests.java b/spring-test/src/test/java/org/springframework/test/context/testng/AnnotationConfigTransactionalTestNGSpringContextTests.java index 2b46ec5b879..76b8df9b0aa 100644 --- a/spring-test/src/test/java/org/springframework/test/context/testng/AnnotationConfigTransactionalTestNGSpringContextTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/testng/AnnotationConfigTransactionalTestNGSpringContextTests.java @@ -25,6 +25,8 @@ import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.test.fixtures.beans.Employee; +import org.springframework.beans.test.fixtures.beans.Pet; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.jdbc.datasource.DataSourceTransactionManager; @@ -32,8 +34,6 @@ import org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseBuilder; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.transaction.AfterTransaction; import org.springframework.test.context.transaction.BeforeTransaction; -import org.springframework.tests.sample.beans.Employee; -import org.springframework.tests.sample.beans.Pet; import org.springframework.transaction.PlatformTransactionManager; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; diff --git a/spring-test/src/test/java/org/springframework/test/context/testng/ConcreteTransactionalTestNGSpringContextTests.java b/spring-test/src/test/java/org/springframework/test/context/testng/ConcreteTransactionalTestNGSpringContextTests.java index 512650288a9..d4ec8757dbf 100644 --- a/spring-test/src/test/java/org/springframework/test/context/testng/ConcreteTransactionalTestNGSpringContextTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/testng/ConcreteTransactionalTestNGSpringContextTests.java @@ -27,11 +27,11 @@ import org.testng.annotations.Test; import org.springframework.beans.factory.BeanNameAware; import org.springframework.beans.factory.InitializingBean; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.test.fixtures.beans.Employee; +import org.springframework.beans.test.fixtures.beans.Pet; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.transaction.AfterTransaction; import org.springframework.test.context.transaction.BeforeTransaction; -import org.springframework.tests.sample.beans.Employee; -import org.springframework.tests.sample.beans.Pet; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; diff --git a/spring-test/src/test/java/org/springframework/test/context/web/RequestAndSessionScopedBeansWacTests.java b/spring-test/src/test/java/org/springframework/test/context/web/RequestAndSessionScopedBeansWacTests.java index ea37de37fd8..6ef0062c250 100644 --- a/spring-test/src/test/java/org/springframework/test/context/web/RequestAndSessionScopedBeansWacTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/web/RequestAndSessionScopedBeansWacTests.java @@ -19,10 +19,10 @@ package org.springframework.test.context.web; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.mock.web.MockHttpServletRequest; import org.springframework.mock.web.MockHttpSession; import org.springframework.test.context.junit.jupiter.web.SpringJUnitWebConfig; -import org.springframework.tests.sample.beans.TestBean; import org.springframework.web.context.WebApplicationContext; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-test/src/test/resources/org/springframework/test/context/configuration/ContextConfigurationWithPropertiesExtendingPropertiesAndInheritedLoaderTests-context.properties b/spring-test/src/test/resources/org/springframework/test/context/configuration/ContextConfigurationWithPropertiesExtendingPropertiesAndInheritedLoaderTests-context.properties index 45d36076bba..ffd5b893819 100644 --- a/spring-test/src/test/resources/org/springframework/test/context/configuration/ContextConfigurationWithPropertiesExtendingPropertiesAndInheritedLoaderTests-context.properties +++ b/spring-test/src/test/resources/org/springframework/test/context/configuration/ContextConfigurationWithPropertiesExtendingPropertiesAndInheritedLoaderTests-context.properties @@ -1,4 +1,4 @@ -dog.(class)=org.springframework.tests.sample.beans.Pet +dog.(class)=org.springframework.beans.test.fixtures.beans.Pet dog.$0=Fido testString2.(class)=java.lang.String diff --git a/spring-test/src/test/resources/org/springframework/test/context/configuration/ContextConfigurationWithPropertiesExtendingPropertiesTests-context.properties b/spring-test/src/test/resources/org/springframework/test/context/configuration/ContextConfigurationWithPropertiesExtendingPropertiesTests-context.properties index 45d36076bba..ffd5b893819 100644 --- a/spring-test/src/test/resources/org/springframework/test/context/configuration/ContextConfigurationWithPropertiesExtendingPropertiesTests-context.properties +++ b/spring-test/src/test/resources/org/springframework/test/context/configuration/ContextConfigurationWithPropertiesExtendingPropertiesTests-context.properties @@ -1,4 +1,4 @@ -dog.(class)=org.springframework.tests.sample.beans.Pet +dog.(class)=org.springframework.beans.test.fixtures.beans.Pet dog.$0=Fido testString2.(class)=java.lang.String diff --git a/spring-test/src/test/resources/org/springframework/test/context/groovy/DefaultScriptDetectionGroovySpringContextTestsContext.groovy b/spring-test/src/test/resources/org/springframework/test/context/groovy/DefaultScriptDetectionGroovySpringContextTestsContext.groovy index f8318a7a6fa..a74895df75f 100644 --- a/spring-test/src/test/resources/org/springframework/test/context/groovy/DefaultScriptDetectionGroovySpringContextTestsContext.groovy +++ b/spring-test/src/test/resources/org/springframework/test/context/groovy/DefaultScriptDetectionGroovySpringContextTestsContext.groovy @@ -16,8 +16,8 @@ package org.springframework.test.context.groovy -import org.springframework.tests.sample.beans.Employee -import org.springframework.tests.sample.beans.Pet +import org.springframework.beans.test.fixtures.beans.Employee +import org.springframework.beans.test.fixtures.beans.Pet /** * Groovy script for defining Spring beans for integration tests. diff --git a/spring-test/src/test/resources/org/springframework/test/context/groovy/context.groovy b/spring-test/src/test/resources/org/springframework/test/context/groovy/context.groovy index f8318a7a6fa..a74895df75f 100644 --- a/spring-test/src/test/resources/org/springframework/test/context/groovy/context.groovy +++ b/spring-test/src/test/resources/org/springframework/test/context/groovy/context.groovy @@ -16,8 +16,8 @@ package org.springframework.test.context.groovy -import org.springframework.tests.sample.beans.Employee -import org.springframework.tests.sample.beans.Pet +import org.springframework.beans.test.fixtures.beans.Employee +import org.springframework.beans.test.fixtures.beans.Pet /** * Groovy script for defining Spring beans for integration tests. diff --git a/spring-test/src/test/resources/org/springframework/test/context/groovy/contextB.xml b/spring-test/src/test/resources/org/springframework/test/context/groovy/contextB.xml index 103412b82f5..aedba0f9a28 100644 --- a/spring-test/src/test/resources/org/springframework/test/context/groovy/contextB.xml +++ b/spring-test/src/test/resources/org/springframework/test/context/groovy/contextB.xml @@ -2,13 +2,13 @@ - + - + diff --git a/spring-test/src/test/resources/org/springframework/test/context/junit4/ConcreteTransactionalJUnit4SpringContextTests-context.xml b/spring-test/src/test/resources/org/springframework/test/context/junit4/ConcreteTransactionalJUnit4SpringContextTests-context.xml index 7a130ccbe1c..2fc9fd86f63 100644 --- a/spring-test/src/test/resources/org/springframework/test/context/junit4/ConcreteTransactionalJUnit4SpringContextTests-context.xml +++ b/spring-test/src/test/resources/org/springframework/test/context/junit4/ConcreteTransactionalJUnit4SpringContextTests-context.xml @@ -10,13 +10,13 @@ - + - + diff --git a/spring-test/src/test/resources/org/springframework/test/context/junit4/MultipleResourcesSpringJUnit4ClassRunnerAppCtxTests-context1.xml b/spring-test/src/test/resources/org/springframework/test/context/junit4/MultipleResourcesSpringJUnit4ClassRunnerAppCtxTests-context1.xml index f7ade734d14..ab039802a10 100644 --- a/spring-test/src/test/resources/org/springframework/test/context/junit4/MultipleResourcesSpringJUnit4ClassRunnerAppCtxTests-context1.xml +++ b/spring-test/src/test/resources/org/springframework/test/context/junit4/MultipleResourcesSpringJUnit4ClassRunnerAppCtxTests-context1.xml @@ -2,7 +2,7 @@ - + diff --git a/spring-test/src/test/resources/org/springframework/test/context/junit4/MultipleResourcesSpringJUnit4ClassRunnerAppCtxTests-context2.xml b/spring-test/src/test/resources/org/springframework/test/context/junit4/MultipleResourcesSpringJUnit4ClassRunnerAppCtxTests-context2.xml index 949d90c1867..9a6cc4f6ffe 100644 --- a/spring-test/src/test/resources/org/springframework/test/context/junit4/MultipleResourcesSpringJUnit4ClassRunnerAppCtxTests-context2.xml +++ b/spring-test/src/test/resources/org/springframework/test/context/junit4/MultipleResourcesSpringJUnit4ClassRunnerAppCtxTests-context2.xml @@ -2,7 +2,7 @@ - + diff --git a/spring-test/src/test/resources/org/springframework/test/context/junit4/ParameterizedDependencyInjectionTests-context.xml b/spring-test/src/test/resources/org/springframework/test/context/junit4/ParameterizedDependencyInjectionTests-context.xml index 6df0e293688..8f84022054d 100644 --- a/spring-test/src/test/resources/org/springframework/test/context/junit4/ParameterizedDependencyInjectionTests-context.xml +++ b/spring-test/src/test/resources/org/springframework/test/context/junit4/ParameterizedDependencyInjectionTests-context.xml @@ -2,19 +2,19 @@ - + - + - + diff --git a/spring-test/src/test/resources/org/springframework/test/context/junit4/PropertiesBasedSpringJUnit4ClassRunnerAppCtxTests-context.properties b/spring-test/src/test/resources/org/springframework/test/context/junit4/PropertiesBasedSpringJUnit4ClassRunnerAppCtxTests-context.properties index 6df81585fb4..064e834d125 100644 --- a/spring-test/src/test/resources/org/springframework/test/context/junit4/PropertiesBasedSpringJUnit4ClassRunnerAppCtxTests-context.properties +++ b/spring-test/src/test/resources/org/springframework/test/context/junit4/PropertiesBasedSpringJUnit4ClassRunnerAppCtxTests-context.properties @@ -1,4 +1,4 @@ -cat.(class)=org.springframework.tests.sample.beans.Pet +cat.(class)=org.springframework.beans.test.fixtures.beans.Pet cat.$0=Garfield testString.(class)=java.lang.String diff --git a/spring-test/src/test/resources/org/springframework/test/context/junit4/SpringJUnit4ClassRunnerAppCtxTests-context.xml b/spring-test/src/test/resources/org/springframework/test/context/junit4/SpringJUnit4ClassRunnerAppCtxTests-context.xml index 27d136cda9a..79c06576176 100644 --- a/spring-test/src/test/resources/org/springframework/test/context/junit4/SpringJUnit4ClassRunnerAppCtxTests-context.xml +++ b/spring-test/src/test/resources/org/springframework/test/context/junit4/SpringJUnit4ClassRunnerAppCtxTests-context.xml @@ -2,13 +2,13 @@ - + - + diff --git a/spring-test/src/test/resources/org/springframework/test/context/junit4/profile/importresource/import.xml b/spring-test/src/test/resources/org/springframework/test/context/junit4/profile/importresource/import.xml index c57db6e1fa4..76ae2046a3b 100644 --- a/spring-test/src/test/resources/org/springframework/test/context/junit4/profile/importresource/import.xml +++ b/spring-test/src/test/resources/org/springframework/test/context/junit4/profile/importresource/import.xml @@ -3,7 +3,7 @@ xsi:schemaLocation="http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans-3.1.xsd"> - + diff --git a/spring-test/src/test/resources/org/springframework/test/context/junit4/profile/xml/DefaultProfileXmlConfigTests-context.xml b/spring-test/src/test/resources/org/springframework/test/context/junit4/profile/xml/DefaultProfileXmlConfigTests-context.xml index 872e9434e4b..c1d81ead011 100644 --- a/spring-test/src/test/resources/org/springframework/test/context/junit4/profile/xml/DefaultProfileXmlConfigTests-context.xml +++ b/spring-test/src/test/resources/org/springframework/test/context/junit4/profile/xml/DefaultProfileXmlConfigTests-context.xml @@ -2,12 +2,12 @@ - + - + diff --git a/spring-test/src/test/resources/org/springframework/test/context/junit4/spr3896/BeanOverridingDefaultLocationsInheritedTests-context.xml b/spring-test/src/test/resources/org/springframework/test/context/junit4/spr3896/BeanOverridingDefaultLocationsInheritedTests-context.xml index 960a6cd0db2..dcbba34d81b 100644 --- a/spring-test/src/test/resources/org/springframework/test/context/junit4/spr3896/BeanOverridingDefaultLocationsInheritedTests-context.xml +++ b/spring-test/src/test/resources/org/springframework/test/context/junit4/spr3896/BeanOverridingDefaultLocationsInheritedTests-context.xml @@ -2,7 +2,7 @@ - + diff --git a/spring-test/src/test/resources/org/springframework/test/context/junit4/spr3896/DefaultLocationsBaseTests-context.xml b/spring-test/src/test/resources/org/springframework/test/context/junit4/spr3896/DefaultLocationsBaseTests-context.xml index f7ade734d14..ab039802a10 100644 --- a/spring-test/src/test/resources/org/springframework/test/context/junit4/spr3896/DefaultLocationsBaseTests-context.xml +++ b/spring-test/src/test/resources/org/springframework/test/context/junit4/spr3896/DefaultLocationsBaseTests-context.xml @@ -2,7 +2,7 @@ - + diff --git a/spring-test/src/test/resources/org/springframework/test/context/junit4/spr3896/DefaultLocationsInheritedTests-context.xml b/spring-test/src/test/resources/org/springframework/test/context/junit4/spr3896/DefaultLocationsInheritedTests-context.xml index 949d90c1867..9a6cc4f6ffe 100644 --- a/spring-test/src/test/resources/org/springframework/test/context/junit4/spr3896/DefaultLocationsInheritedTests-context.xml +++ b/spring-test/src/test/resources/org/springframework/test/context/junit4/spr3896/DefaultLocationsInheritedTests-context.xml @@ -2,7 +2,7 @@ - + diff --git a/spring-test/src/test/resources/org/springframework/test/context/testng/ConcreteTransactionalTestNGSpringContextTests-context.xml b/spring-test/src/test/resources/org/springframework/test/context/testng/ConcreteTransactionalTestNGSpringContextTests-context.xml index 7bb8f2cd02a..6888e059d76 100644 --- a/spring-test/src/test/resources/org/springframework/test/context/testng/ConcreteTransactionalTestNGSpringContextTests-context.xml +++ b/spring-test/src/test/resources/org/springframework/test/context/testng/ConcreteTransactionalTestNGSpringContextTests-context.xml @@ -5,10 +5,10 @@ xsi:schemaLocation="http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/jdbc https://www.springframework.org/schema/jdbc/spring-jdbc.xsd"> - - + diff --git a/spring-test/src/test/resources/org/springframework/test/context/web/RequestAndSessionScopedBeansWacTests-context.xml b/spring-test/src/test/resources/org/springframework/test/context/web/RequestAndSessionScopedBeansWacTests-context.xml index a8412fa9308..73ba0a7094d 100644 --- a/spring-test/src/test/resources/org/springframework/test/context/web/RequestAndSessionScopedBeansWacTests-context.xml +++ b/spring-test/src/test/resources/org/springframework/test/context/web/RequestAndSessionScopedBeansWacTests-context.xml @@ -2,10 +2,10 @@ - + - + diff --git a/spring-tx/spring-tx.gradle b/spring-tx/spring-tx.gradle index c026fb2991b..99c82989264 100644 --- a/spring-tx/spring-tx.gradle +++ b/spring-tx/spring-tx.gradle @@ -19,6 +19,8 @@ dependencies { optional("org.jetbrains.kotlin:kotlin-stdlib") optional("org.jetbrains.kotlinx:kotlinx-coroutines-core") optional("org.jetbrains.kotlinx:kotlinx-coroutines-reactor") + testCompile(testFixtures(project(":spring-beans"))) + testCompile(testFixtures(project(":spring-context"))) testCompile(testFixtures(project(":spring-core"))) testCompile("org.aspectj:aspectjweaver") testCompile("org.codehaus.groovy:groovy") diff --git a/spring-tx/src/test/java/org/springframework/transaction/JndiJtaTransactionManagerTests.java b/spring-tx/src/test/java/org/springframework/transaction/JndiJtaTransactionManagerTests.java index 4d83607cbcf..fe6bc1d2456 100644 --- a/spring-tx/src/test/java/org/springframework/transaction/JndiJtaTransactionManagerTests.java +++ b/spring-tx/src/test/java/org/springframework/transaction/JndiJtaTransactionManagerTests.java @@ -23,7 +23,7 @@ import javax.transaction.UserTransaction; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.Test; -import org.springframework.tests.mock.jndi.ExpectedLookupTemplate; +import org.springframework.context.test.fixtures.jndi.ExpectedLookupTemplate; import org.springframework.transaction.jta.JtaTransactionManager; import org.springframework.transaction.jta.UserTransactionAdapter; import org.springframework.transaction.support.TransactionCallbackWithoutResult; diff --git a/spring-tx/src/test/java/org/springframework/transaction/TxNamespaceHandlerEventTests.java b/spring-tx/src/test/java/org/springframework/transaction/TxNamespaceHandlerEventTests.java index 84eefc1d4b2..5dab797e05a 100644 --- a/spring-tx/src/test/java/org/springframework/transaction/TxNamespaceHandlerEventTests.java +++ b/spring-tx/src/test/java/org/springframework/transaction/TxNamespaceHandlerEventTests.java @@ -23,8 +23,8 @@ import org.springframework.beans.factory.parsing.BeanComponentDefinition; import org.springframework.beans.factory.parsing.ComponentDefinition; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; +import org.springframework.beans.test.fixtures.beans.CollectingReaderEventListener; import org.springframework.core.io.ClassPathResource; -import org.springframework.tests.beans.CollectingReaderEventListener; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-tx/src/test/java/org/springframework/transaction/TxNamespaceHandlerTests.java b/spring-tx/src/test/java/org/springframework/transaction/TxNamespaceHandlerTests.java index ac6b14e3b43..e2eb6431db8 100644 --- a/spring-tx/src/test/java/org/springframework/transaction/TxNamespaceHandlerTests.java +++ b/spring-tx/src/test/java/org/springframework/transaction/TxNamespaceHandlerTests.java @@ -22,9 +22,9 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.springframework.aop.support.AopUtils; +import org.springframework.beans.test.fixtures.beans.ITestBean; import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; -import org.springframework.tests.sample.beans.ITestBean; import org.springframework.tests.transaction.CallCountingTransactionManager; import org.springframework.transaction.interceptor.TransactionAttribute; import org.springframework.transaction.interceptor.TransactionAttributeSource; diff --git a/spring-tx/src/test/java/org/springframework/transaction/interceptor/AbstractTransactionAspectTests.java b/spring-tx/src/test/java/org/springframework/transaction/interceptor/AbstractTransactionAspectTests.java index 0db21fcde07..33394fa04b7 100644 --- a/spring-tx/src/test/java/org/springframework/transaction/interceptor/AbstractTransactionAspectTests.java +++ b/spring-tx/src/test/java/org/springframework/transaction/interceptor/AbstractTransactionAspectTests.java @@ -21,9 +21,9 @@ import java.lang.reflect.Method; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; +import org.springframework.beans.test.fixtures.beans.ITestBean; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.dao.OptimisticLockingFailureException; -import org.springframework.tests.sample.beans.ITestBean; -import org.springframework.tests.sample.beans.TestBean; import org.springframework.transaction.CannotCreateTransactionException; import org.springframework.transaction.MockCallbackPreferringTransactionManager; import org.springframework.transaction.NoTransactionException; diff --git a/spring-tx/src/test/java/org/springframework/transaction/interceptor/BeanFactoryTransactionTests.java b/spring-tx/src/test/java/org/springframework/transaction/interceptor/BeanFactoryTransactionTests.java index e47efb55f8f..bbb8a99b5f5 100644 --- a/spring-tx/src/test/java/org/springframework/transaction/interceptor/BeanFactoryTransactionTests.java +++ b/spring-tx/src/test/java/org/springframework/transaction/interceptor/BeanFactoryTransactionTests.java @@ -31,11 +31,11 @@ import org.springframework.aop.target.HotSwappableTargetSource; import org.springframework.beans.FatalBeanException; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; +import org.springframework.beans.test.fixtures.beans.DerivedTestBean; +import org.springframework.beans.test.fixtures.beans.ITestBean; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.core.io.ClassPathResource; import org.springframework.lang.Nullable; -import org.springframework.tests.sample.beans.DerivedTestBean; -import org.springframework.tests.sample.beans.ITestBean; -import org.springframework.tests.sample.beans.TestBean; import org.springframework.tests.transaction.CallCountingTransactionManager; import org.springframework.transaction.PlatformTransactionManager; import org.springframework.transaction.TransactionDefinition; diff --git a/spring-tx/src/test/java/org/springframework/transaction/interceptor/ImplementsNoInterfaces.java b/spring-tx/src/test/java/org/springframework/transaction/interceptor/ImplementsNoInterfaces.java index fa6ddb98a15..d36b8d93526 100644 --- a/spring-tx/src/test/java/org/springframework/transaction/interceptor/ImplementsNoInterfaces.java +++ b/spring-tx/src/test/java/org/springframework/transaction/interceptor/ImplementsNoInterfaces.java @@ -16,7 +16,7 @@ package org.springframework.transaction.interceptor; -import org.springframework.tests.sample.beans.TestBean; +import org.springframework.beans.test.fixtures.beans.TestBean; /** * Test for CGLIB proxying that implements no interfaces diff --git a/spring-tx/src/test/java/org/springframework/transaction/jta/WebSphereUowTransactionManagerTests.java b/spring-tx/src/test/java/org/springframework/transaction/jta/WebSphereUowTransactionManagerTests.java index 54d263b1829..bc0599b7f96 100644 --- a/spring-tx/src/test/java/org/springframework/transaction/jta/WebSphereUowTransactionManagerTests.java +++ b/spring-tx/src/test/java/org/springframework/transaction/jta/WebSphereUowTransactionManagerTests.java @@ -25,8 +25,8 @@ import com.ibm.wsspi.uow.UOWException; import com.ibm.wsspi.uow.UOWManager; import org.junit.jupiter.api.Test; +import org.springframework.context.test.fixtures.jndi.ExpectedLookupTemplate; import org.springframework.dao.OptimisticLockingFailureException; -import org.springframework.tests.mock.jndi.ExpectedLookupTemplate; import org.springframework.transaction.IllegalTransactionStateException; import org.springframework.transaction.NestedTransactionNotSupportedException; import org.springframework.transaction.TransactionDefinition; diff --git a/spring-tx/src/test/java/org/springframework/transaction/support/JtaTransactionManagerSerializationTests.java b/spring-tx/src/test/java/org/springframework/transaction/support/JtaTransactionManagerSerializationTests.java index 6e63dbbde83..5b07c460bd6 100644 --- a/spring-tx/src/test/java/org/springframework/transaction/support/JtaTransactionManagerSerializationTests.java +++ b/spring-tx/src/test/java/org/springframework/transaction/support/JtaTransactionManagerSerializationTests.java @@ -21,8 +21,8 @@ import javax.transaction.UserTransaction; import org.junit.jupiter.api.Test; +import org.springframework.context.test.fixtures.jndi.SimpleNamingContextBuilder; import org.springframework.core.test.fixtures.io.SerializationTestUtils; -import org.springframework.tests.mock.jndi.SimpleNamingContextBuilder; import org.springframework.transaction.jta.JtaTransactionManager; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-tx/src/test/java/org/springframework/transaction/support/SimpleTransactionScopeTests.java b/spring-tx/src/test/java/org/springframework/transaction/support/SimpleTransactionScopeTests.java index bab321b2454..7b28446f7ad 100644 --- a/spring-tx/src/test/java/org/springframework/transaction/support/SimpleTransactionScopeTests.java +++ b/spring-tx/src/test/java/org/springframework/transaction/support/SimpleTransactionScopeTests.java @@ -23,9 +23,9 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.factory.BeanCreationException; import org.springframework.beans.factory.support.GenericBeanDefinition; +import org.springframework.beans.test.fixtures.beans.DerivedTestBean; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.context.support.GenericApplicationContext; -import org.springframework.tests.sample.beans.DerivedTestBean; -import org.springframework.tests.sample.beans.TestBean; import org.springframework.tests.transaction.CallCountingTransactionManager; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-tx/src/test/resources/org/springframework/transaction/interceptor/noTransactionAttributeSource.xml b/spring-tx/src/test/resources/org/springframework/transaction/interceptor/noTransactionAttributeSource.xml index 7c10400577d..7be655a7962 100644 --- a/spring-tx/src/test/resources/org/springframework/transaction/interceptor/noTransactionAttributeSource.xml +++ b/spring-tx/src/test/resources/org/springframework/transaction/interceptor/noTransactionAttributeSource.xml @@ -4,7 +4,7 @@ - + custom 666 diff --git a/spring-tx/src/test/resources/org/springframework/transaction/interceptor/transactionalBeanFactory.xml b/spring-tx/src/test/resources/org/springframework/transaction/interceptor/transactionalBeanFactory.xml index 336045ef7a4..d932173756f 100644 --- a/spring-tx/src/test/resources/org/springframework/transaction/interceptor/transactionalBeanFactory.xml +++ b/spring-tx/src/test/resources/org/springframework/transaction/interceptor/transactionalBeanFactory.xml @@ -3,12 +3,12 @@ - + dependency - + custom 666 @@ -22,16 +22,16 @@ - org.springframework.tests.sample.beans.ITestBean.s*=PROPAGATION_MANDATORY - org.springframework.tests.sample.beans.AgeHolder.setAg*=PROPAGATION_REQUIRED - org.springframework.tests.sample.beans.ITestBean.set*= PROPAGATION_SUPPORTS , readOnly + org.springframework.beans.test.fixtures.beans.ITestBean.s*=PROPAGATION_MANDATORY + org.springframework.beans.test.fixtures.beans.AgeHolder.setAg*=PROPAGATION_REQUIRED + org.springframework.beans.test.fixtures.beans.ITestBean.set*= PROPAGATION_SUPPORTS , readOnly - org.springframework.tests.sample.beans.ITestBean + org.springframework.beans.test.fixtures.beans.ITestBean diff --git a/spring-tx/src/test/resources/org/springframework/transaction/txNamespaceHandlerTests.xml b/spring-tx/src/test/resources/org/springframework/transaction/txNamespaceHandlerTests.xml index 2a2f922039a..414adf58af5 100644 --- a/spring-tx/src/test/resources/org/springframework/transaction/txNamespaceHandlerTests.xml +++ b/spring-tx/src/test/resources/org/springframework/transaction/txNamespaceHandlerTests.xml @@ -28,6 +28,6 @@ - + diff --git a/spring-web/spring-web.gradle b/spring-web/spring-web.gradle index d8ee7176679..bb86f10cc51 100644 --- a/spring-web/spring-web.gradle +++ b/spring-web/spring-web.gradle @@ -54,6 +54,8 @@ dependencies { optional("org.codehaus.groovy:groovy") optional("org.jetbrains.kotlin:kotlin-reflect") optional("org.jetbrains.kotlin:kotlin-stdlib") + testCompile(testFixtures(project(":spring-beans"))) + testCompile(testFixtures(project(":spring-context"))) testCompile(testFixtures(project(":spring-core"))) testCompile("io.projectreactor:reactor-test") testCompile("org.apache.taglibs:taglibs-standard-jstlel") diff --git a/spring-web/src/test/java/org/springframework/remoting/caucho/CauchoRemotingTests.java b/spring-web/src/test/java/org/springframework/remoting/caucho/CauchoRemotingTests.java index 5eafdf98ed2..6d1291e4335 100644 --- a/spring-web/src/test/java/org/springframework/remoting/caucho/CauchoRemotingTests.java +++ b/spring-web/src/test/java/org/springframework/remoting/caucho/CauchoRemotingTests.java @@ -24,9 +24,9 @@ import com.sun.net.httpserver.HttpServer; import org.junit.jupiter.api.Test; import org.springframework.aop.framework.ProxyFactory; +import org.springframework.beans.test.fixtures.beans.ITestBean; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.remoting.RemoteAccessException; -import org.springframework.tests.sample.beans.ITestBean; -import org.springframework.tests.sample.beans.TestBean; import org.springframework.util.SocketUtils; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-web/src/test/java/org/springframework/remoting/httpinvoker/HttpInvokerTests.java b/spring-web/src/test/java/org/springframework/remoting/httpinvoker/HttpInvokerTests.java index 4de848f0560..39625545d80 100644 --- a/spring-web/src/test/java/org/springframework/remoting/httpinvoker/HttpInvokerTests.java +++ b/spring-web/src/test/java/org/springframework/remoting/httpinvoker/HttpInvokerTests.java @@ -37,6 +37,8 @@ import org.aopalliance.intercept.MethodInvocation; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.BeanClassLoaderAware; +import org.springframework.beans.test.fixtures.beans.ITestBean; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.mock.web.test.MockHttpServletResponse; import org.springframework.remoting.RemoteAccessException; @@ -44,8 +46,6 @@ import org.springframework.remoting.support.DefaultRemoteInvocationExecutor; import org.springframework.remoting.support.RemoteInvocation; import org.springframework.remoting.support.RemoteInvocationFactory; import org.springframework.remoting.support.RemoteInvocationResult; -import org.springframework.tests.sample.beans.ITestBean; -import org.springframework.tests.sample.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; diff --git a/spring-web/src/test/java/org/springframework/web/bind/EscapedErrorsTests.java b/spring-web/src/test/java/org/springframework/web/bind/EscapedErrorsTests.java index d5d39bf0bb1..91926d3f161 100644 --- a/spring-web/src/test/java/org/springframework/web/bind/EscapedErrorsTests.java +++ b/spring-web/src/test/java/org/springframework/web/bind/EscapedErrorsTests.java @@ -18,7 +18,7 @@ package org.springframework.web.bind; import org.junit.jupiter.api.Test; -import org.springframework.tests.sample.beans.TestBean; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.validation.BindException; import org.springframework.validation.Errors; import org.springframework.validation.FieldError; diff --git a/spring-web/src/test/java/org/springframework/web/bind/ServletRequestDataBinderTests.java b/spring-web/src/test/java/org/springframework/web/bind/ServletRequestDataBinderTests.java index 72779020932..b3cbcd011df 100644 --- a/spring-web/src/test/java/org/springframework/web/bind/ServletRequestDataBinderTests.java +++ b/spring-web/src/test/java/org/springframework/web/bind/ServletRequestDataBinderTests.java @@ -25,9 +25,9 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.PropertyValue; import org.springframework.beans.PropertyValues; +import org.springframework.beans.test.fixtures.beans.ITestBean; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.mock.web.test.MockHttpServletRequest; -import org.springframework.tests.sample.beans.ITestBean; -import org.springframework.tests.sample.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-web/src/test/java/org/springframework/web/bind/support/WebExchangeDataBinderTests.java b/spring-web/src/test/java/org/springframework/web/bind/support/WebExchangeDataBinderTests.java index 1c60a62ab0d..276696053f6 100644 --- a/spring-web/src/test/java/org/springframework/web/bind/support/WebExchangeDataBinderTests.java +++ b/spring-web/src/test/java/org/springframework/web/bind/support/WebExchangeDataBinderTests.java @@ -26,6 +26,8 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; +import org.springframework.beans.test.fixtures.beans.ITestBean; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.core.io.ClassPathResource; import org.springframework.http.HttpMethod; import org.springframework.http.MediaType; @@ -35,8 +37,6 @@ import org.springframework.http.codec.multipart.MultipartHttpMessageWriter; import org.springframework.mock.http.client.reactive.test.MockClientHttpRequest; import org.springframework.mock.http.server.reactive.test.MockServerHttpRequest; import org.springframework.mock.web.test.server.MockServerWebExchange; -import org.springframework.tests.sample.beans.ITestBean; -import org.springframework.tests.sample.beans.TestBean; import org.springframework.util.LinkedMultiValueMap; import org.springframework.util.MultiValueMap; import org.springframework.web.server.ServerWebExchange; diff --git a/spring-web/src/test/java/org/springframework/web/bind/support/WebRequestDataBinderTests.java b/spring-web/src/test/java/org/springframework/web/bind/support/WebRequestDataBinderTests.java index de2efa993d2..74b53448980 100644 --- a/spring-web/src/test/java/org/springframework/web/bind/support/WebRequestDataBinderTests.java +++ b/spring-web/src/test/java/org/springframework/web/bind/support/WebRequestDataBinderTests.java @@ -27,11 +27,11 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.PropertyValue; import org.springframework.beans.PropertyValues; +import org.springframework.beans.test.fixtures.beans.ITestBean; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.mock.web.test.MockMultipartFile; import org.springframework.mock.web.test.MockMultipartHttpServletRequest; -import org.springframework.tests.sample.beans.ITestBean; -import org.springframework.tests.sample.beans.TestBean; import org.springframework.web.bind.ServletRequestParameterPropertyValues; import org.springframework.web.context.request.ServletWebRequest; import org.springframework.web.multipart.support.StringMultipartFileEditor; diff --git a/spring-web/src/test/java/org/springframework/web/context/request/RequestAndSessionScopedBeanTests.java b/spring-web/src/test/java/org/springframework/web/context/request/RequestAndSessionScopedBeanTests.java index c3d0178a969..182f152de29 100644 --- a/spring-web/src/test/java/org/springframework/web/context/request/RequestAndSessionScopedBeanTests.java +++ b/spring-web/src/test/java/org/springframework/web/context/request/RequestAndSessionScopedBeanTests.java @@ -22,8 +22,8 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.factory.BeanCreationException; import org.springframework.beans.factory.support.RootBeanDefinition; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.mock.web.test.MockHttpServletRequest; -import org.springframework.tests.sample.beans.TestBean; import org.springframework.web.context.WebApplicationContext; import org.springframework.web.context.support.StaticWebApplicationContext; diff --git a/spring-web/src/test/java/org/springframework/web/context/request/RequestScopeTests.java b/spring-web/src/test/java/org/springframework/web/context/request/RequestScopeTests.java index 902475d381d..ac6227ce96f 100644 --- a/spring-web/src/test/java/org/springframework/web/context/request/RequestScopeTests.java +++ b/spring-web/src/test/java/org/springframework/web/context/request/RequestScopeTests.java @@ -25,11 +25,11 @@ import org.springframework.beans.factory.BeanCurrentlyInCreationException; import org.springframework.beans.factory.FactoryBean; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; +import org.springframework.beans.test.fixtures.beans.DerivedTestBean; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.context.expression.StandardBeanExpressionResolver; import org.springframework.core.io.ClassPathResource; import org.springframework.mock.web.test.MockHttpServletRequest; -import org.springframework.tests.sample.beans.DerivedTestBean; -import org.springframework.tests.sample.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; diff --git a/spring-web/src/test/java/org/springframework/web/context/request/RequestScopedProxyTests.java b/spring-web/src/test/java/org/springframework/web/context/request/RequestScopedProxyTests.java index f021e0be4c0..970064bc0bb 100644 --- a/spring-web/src/test/java/org/springframework/web/context/request/RequestScopedProxyTests.java +++ b/spring-web/src/test/java/org/springframework/web/context/request/RequestScopedProxyTests.java @@ -24,12 +24,12 @@ import org.springframework.beans.factory.config.BeanDefinition; import org.springframework.beans.factory.config.BeanDefinitionHolder; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; +import org.springframework.beans.test.fixtures.beans.DerivedTestBean; +import org.springframework.beans.test.fixtures.beans.ITestBean; +import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.test.fixtures.beans.factory.DummyFactory; import org.springframework.core.io.ClassPathResource; import org.springframework.mock.web.test.MockHttpServletRequest; -import org.springframework.tests.sample.beans.DerivedTestBean; -import org.springframework.tests.sample.beans.ITestBean; -import org.springframework.tests.sample.beans.TestBean; -import org.springframework.tests.sample.beans.factory.DummyFactory; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-web/src/test/java/org/springframework/web/context/request/SessionScopeTests.java b/spring-web/src/test/java/org/springframework/web/context/request/SessionScopeTests.java index 25c0898ed87..a767bbd8d46 100644 --- a/spring-web/src/test/java/org/springframework/web/context/request/SessionScopeTests.java +++ b/spring-web/src/test/java/org/springframework/web/context/request/SessionScopeTests.java @@ -28,12 +28,12 @@ import org.springframework.beans.factory.BeanNameAware; import org.springframework.beans.factory.config.DestructionAwareBeanPostProcessor; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; +import org.springframework.beans.test.fixtures.beans.DerivedTestBean; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.core.io.ClassPathResource; import org.springframework.core.test.fixtures.io.SerializationTestUtils; import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.mock.web.test.MockHttpSession; -import org.springframework.tests.sample.beans.DerivedTestBean; -import org.springframework.tests.sample.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-web/src/test/java/org/springframework/web/context/request/WebApplicationContextScopeTests.java b/spring-web/src/test/java/org/springframework/web/context/request/WebApplicationContextScopeTests.java index 255889c4526..28bd6d1a2c0 100644 --- a/spring-web/src/test/java/org/springframework/web/context/request/WebApplicationContextScopeTests.java +++ b/spring-web/src/test/java/org/springframework/web/context/request/WebApplicationContextScopeTests.java @@ -21,9 +21,9 @@ import javax.servlet.ServletContextEvent; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.support.GenericBeanDefinition; +import org.springframework.beans.test.fixtures.beans.DerivedTestBean; import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.mock.web.test.MockServletContext; -import org.springframework.tests.sample.beans.DerivedTestBean; import org.springframework.web.context.ContextCleanupListener; import org.springframework.web.context.WebApplicationContext; import org.springframework.web.context.support.GenericWebApplicationContext; diff --git a/spring-web/src/test/java/org/springframework/web/context/support/SpringBeanAutowiringSupportTests.java b/spring-web/src/test/java/org/springframework/web/context/support/SpringBeanAutowiringSupportTests.java index 1ba05f1dd06..05be6033aa5 100644 --- a/spring-web/src/test/java/org/springframework/web/context/support/SpringBeanAutowiringSupportTests.java +++ b/spring-web/src/test/java/org/springframework/web/context/support/SpringBeanAutowiringSupportTests.java @@ -21,10 +21,10 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.MutablePropertyValues; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; +import org.springframework.beans.test.fixtures.beans.ITestBean; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.context.annotation.AnnotationConfigUtils; import org.springframework.mock.web.test.MockServletContext; -import org.springframework.tests.sample.beans.ITestBean; -import org.springframework.tests.sample.beans.TestBean; import org.springframework.web.context.WebApplicationContext; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-web/src/test/java/org/springframework/web/context/support/StandardServletEnvironmentTests.java b/spring-web/src/test/java/org/springframework/web/context/support/StandardServletEnvironmentTests.java index 6b25e4aeb8a..750cbf55817 100644 --- a/spring-web/src/test/java/org/springframework/web/context/support/StandardServletEnvironmentTests.java +++ b/spring-web/src/test/java/org/springframework/web/context/support/StandardServletEnvironmentTests.java @@ -18,11 +18,11 @@ package org.springframework.web.context.support; import org.junit.jupiter.api.Test; +import org.springframework.context.test.fixtures.jndi.SimpleNamingContextBuilder; import org.springframework.core.env.ConfigurableEnvironment; import org.springframework.core.env.MutablePropertySources; import org.springframework.core.env.PropertySource; import org.springframework.core.env.StandardEnvironment; -import org.springframework.tests.mock.jndi.SimpleNamingContextBuilder; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-web/src/test/java/org/springframework/web/method/annotation/ModelAttributeMethodProcessorTests.java b/spring-web/src/test/java/org/springframework/web/method/annotation/ModelAttributeMethodProcessorTests.java index f536e8538d0..446eb39f12b 100644 --- a/spring-web/src/test/java/org/springframework/web/method/annotation/ModelAttributeMethodProcessorTests.java +++ b/spring-web/src/test/java/org/springframework/web/method/annotation/ModelAttributeMethodProcessorTests.java @@ -23,10 +23,10 @@ import java.lang.reflect.Method; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.core.MethodParameter; import org.springframework.core.annotation.SynthesizingMethodParameter; import org.springframework.mock.web.test.MockHttpServletRequest; -import org.springframework.tests.sample.beans.TestBean; import org.springframework.validation.BindException; import org.springframework.validation.BindingResult; import org.springframework.validation.Errors; diff --git a/spring-web/src/test/java/org/springframework/web/method/annotation/SessionAttributesHandlerTests.java b/spring-web/src/test/java/org/springframework/web/method/annotation/SessionAttributesHandlerTests.java index 0c980da38f5..8a81bf01757 100644 --- a/spring-web/src/test/java/org/springframework/web/method/annotation/SessionAttributesHandlerTests.java +++ b/spring-web/src/test/java/org/springframework/web/method/annotation/SessionAttributesHandlerTests.java @@ -21,8 +21,8 @@ import java.util.HashSet; import org.junit.jupiter.api.Test; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.mock.web.test.MockHttpServletRequest; -import org.springframework.tests.sample.beans.TestBean; import org.springframework.ui.ModelMap; import org.springframework.web.bind.annotation.SessionAttributes; import org.springframework.web.bind.support.DefaultSessionAttributeStore; diff --git a/spring-web/src/test/resources/org/springframework/web/context/request/requestScopeTests.xml b/spring-web/src/test/resources/org/springframework/web/context/request/requestScopeTests.xml index 1b9769e7d1c..cbc20b6107f 100644 --- a/spring-web/src/test/resources/org/springframework/web/context/request/requestScopeTests.xml +++ b/spring-web/src/test/resources/org/springframework/web/context/request/requestScopeTests.xml @@ -4,35 +4,35 @@ xsi:schemaLocation="http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans-2.0.xsd"> - + - + - + - + - + - + - + - + - + diff --git a/spring-web/src/test/resources/org/springframework/web/context/request/requestScopedProxyTests.xml b/spring-web/src/test/resources/org/springframework/web/context/request/requestScopedProxyTests.xml index d357806bddf..e766b1f6f5b 100644 --- a/spring-web/src/test/resources/org/springframework/web/context/request/requestScopedProxyTests.xml +++ b/spring-web/src/test/resources/org/springframework/web/context/request/requestScopedProxyTests.xml @@ -5,47 +5,47 @@ xsi:schemaLocation="http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://www.springframework.org/schema/aop https://www.springframework.org/schema/aop/spring-aop-2.0.xsd"> - + - + - + - + - + - + - + - + - + - + diff --git a/spring-web/src/test/resources/org/springframework/web/context/request/sessionScopeTests.xml b/spring-web/src/test/resources/org/springframework/web/context/request/sessionScopeTests.xml index a371316fd7a..45f87fa263c 100644 --- a/spring-web/src/test/resources/org/springframework/web/context/request/sessionScopeTests.xml +++ b/spring-web/src/test/resources/org/springframework/web/context/request/sessionScopeTests.xml @@ -3,8 +3,8 @@ - + - + diff --git a/spring-webflux/spring-webflux.gradle b/spring-webflux/spring-webflux.gradle index 900d53484b4..3a3fe9487cb 100644 --- a/spring-webflux/spring-webflux.gradle +++ b/spring-webflux/spring-webflux.gradle @@ -31,6 +31,7 @@ dependencies { optional("org.jetbrains.kotlinx:kotlinx-coroutines-core") optional("org.jetbrains.kotlinx:kotlinx-coroutines-reactor") testCompile(project(":kotlin-coroutines")) + testCompile(testFixtures(project(":spring-beans"))) testCompile(testFixtures(project(":spring-core"))) testCompile("javax.xml.bind:jaxb-api") testCompile("com.fasterxml:aalto-xml") diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/SessionAttributesHandlerTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/SessionAttributesHandlerTests.java index 3bfdb2bafbe..13e3c3c4d9a 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/SessionAttributesHandlerTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/SessionAttributesHandlerTests.java @@ -21,8 +21,8 @@ import java.util.HashSet; import org.junit.jupiter.api.Test; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.mock.web.test.server.MockWebSession; -import org.springframework.tests.sample.beans.TestBean; import org.springframework.ui.ModelMap; import org.springframework.web.bind.annotation.SessionAttributes; import org.springframework.web.server.WebSession; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/view/AbstractViewTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/view/AbstractViewTests.java index a2b413bd30a..0e3c1fe78d0 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/view/AbstractViewTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/view/AbstractViewTests.java @@ -28,11 +28,11 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; import reactor.test.StepVerifier; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.http.MediaType; import org.springframework.lang.Nullable; import org.springframework.mock.http.server.reactive.test.MockServerHttpRequest; import org.springframework.mock.web.test.server.MockServerWebExchange; -import org.springframework.tests.sample.beans.TestBean; import org.springframework.validation.BindingResult; import org.springframework.web.reactive.BindingContext; import org.springframework.web.server.ServerWebExchange; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/view/freemarker/FreeMarkerMacroTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/view/freemarker/FreeMarkerMacroTests.java index 02caeb09668..ce6ae915171 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/view/freemarker/FreeMarkerMacroTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/view/freemarker/FreeMarkerMacroTests.java @@ -29,13 +29,13 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.context.support.GenericApplicationContext; import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.FileSystemResource; import org.springframework.http.MediaType; import org.springframework.mock.http.server.reactive.test.MockServerHttpRequest; import org.springframework.mock.web.test.server.MockServerWebExchange; -import org.springframework.tests.sample.beans.TestBean; import org.springframework.ui.ExtendedModelMap; import org.springframework.ui.ModelMap; import org.springframework.util.FileCopyUtils; diff --git a/spring-webmvc/spring-webmvc.gradle b/spring-webmvc/spring-webmvc.gradle index f118436eb7d..09870708616 100644 --- a/spring-webmvc/spring-webmvc.gradle +++ b/spring-webmvc/spring-webmvc.gradle @@ -35,7 +35,9 @@ dependencies { optional("org.jetbrains.kotlin:kotlin-reflect") optional("org.jetbrains.kotlin:kotlin-stdlib") optional("org.reactivestreams:reactive-streams") + testCompile(testFixtures(project(":spring-beans"))) testCompile(testFixtures(project(":spring-core"))) + testCompile(testFixtures(project(":spring-context"))) testCompile("javax.servlet:javax.servlet-api") testCompile("org.eclipse.jetty:jetty-servlet") { exclude group: "javax.servlet", module: "javax.servlet" diff --git a/spring-webmvc/src/test/java/org/springframework/context/BeanThatListens.java b/spring-webmvc/src/test/java/org/springframework/context/BeanThatListens.java deleted file mode 100644 index 84a74936bb4..00000000000 --- a/spring-webmvc/src/test/java/org/springframework/context/BeanThatListens.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright 2002-2018 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. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.context; - -import java.util.Map; - -/** - * A stub {@link ApplicationListener}. - * - * @author Thomas Risberg - * @author Juergen Hoeller - */ -public class BeanThatListens implements ApplicationListener { - - private BeanThatBroadcasts beanThatBroadcasts; - - private int eventCount; - - - public BeanThatListens() { - } - - public BeanThatListens(BeanThatBroadcasts beanThatBroadcasts) { - this.beanThatBroadcasts = beanThatBroadcasts; - Map beans = beanThatBroadcasts.applicationContext.getBeansOfType(BeanThatListens.class); - if (!beans.isEmpty()) { - throw new IllegalStateException("Shouldn't have found any BeanThatListens instances"); - } - } - - - @Override - public void onApplicationEvent(ApplicationEvent event) { - eventCount++; - if (beanThatBroadcasts != null) { - beanThatBroadcasts.receivedCount++; - } - } - - public int getEventCount() { - return eventCount; - } - - public void zero() { - eventCount = 0; - } - -} diff --git a/spring-webmvc/src/test/java/org/springframework/context/LifecycleContextBean.java b/spring-webmvc/src/test/java/org/springframework/context/LifecycleContextBean.java index 904100a3691..c6e1fe0b194 100644 --- a/spring-webmvc/src/test/java/org/springframework/context/LifecycleContextBean.java +++ b/spring-webmvc/src/test/java/org/springframework/context/LifecycleContextBean.java @@ -16,10 +16,9 @@ package org.springframework.context; - import org.springframework.beans.BeansException; import org.springframework.beans.factory.BeanFactory; -import org.springframework.tests.sample.beans.LifecycleBean; +import org.springframework.beans.test.fixtures.beans.LifecycleBean; /** * Simple bean to test ApplicationContext lifecycle methods for beans diff --git a/spring-webmvc/src/test/java/org/springframework/web/context/ContextLoaderTests.java b/spring-webmvc/src/test/java/org/springframework/web/context/ContextLoaderTests.java index 40add7d57b7..c9f96dfdd3e 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/context/ContextLoaderTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/context/ContextLoaderTests.java @@ -29,6 +29,8 @@ import org.springframework.beans.BeansException; import org.springframework.beans.factory.BeanCreationException; import org.springframework.beans.factory.BeanDefinitionStoreException; import org.springframework.beans.factory.support.DefaultListableBeanFactory; +import org.springframework.beans.test.fixtures.beans.LifecycleBean; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContextException; import org.springframework.context.ApplicationContextInitializer; @@ -38,8 +40,6 @@ import org.springframework.core.env.ConfigurableEnvironment; import org.springframework.core.env.PropertySource; import org.springframework.mock.web.test.MockServletConfig; import org.springframework.mock.web.test.MockServletContext; -import org.springframework.tests.sample.beans.LifecycleBean; -import org.springframework.tests.sample.beans.TestBean; import org.springframework.util.StringUtils; import org.springframework.web.context.support.WebApplicationContextUtils; import org.springframework.web.context.support.XmlWebApplicationContext; diff --git a/spring-webmvc/src/test/java/org/springframework/web/context/XmlWebApplicationContextTests.java b/spring-webmvc/src/test/java/org/springframework/web/context/XmlWebApplicationContextTests.java index c893300e1ba..52d9278ec21 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/context/XmlWebApplicationContextTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/context/XmlWebApplicationContextTests.java @@ -28,12 +28,12 @@ import org.springframework.beans.factory.InitializingBean; import org.springframework.beans.factory.config.BeanFactoryPostProcessor; import org.springframework.beans.factory.config.BeanPostProcessor; import org.springframework.beans.factory.config.ConfigurableListableBeanFactory; -import org.springframework.context.AbstractApplicationContextTests; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.context.ConfigurableApplicationContext; import org.springframework.context.NoSuchMessageException; -import org.springframework.context.TestListener; +import org.springframework.context.test.fixtures.AbstractApplicationContextTests; +import org.springframework.context.test.fixtures.beans.TestApplicationListener; import org.springframework.mock.web.test.MockServletContext; -import org.springframework.tests.sample.beans.TestBean; import org.springframework.util.Assert; import org.springframework.web.context.support.XmlWebApplicationContext; @@ -96,13 +96,13 @@ public class XmlWebApplicationContextTests extends AbstractApplicationContextTes /** * Overridden as we can't trust superclass method - * @see org.springframework.context.AbstractApplicationContextTests#testEvents() + * @see org.springframework.context.test.fixtures.AbstractApplicationContextTests#testEvents() */ @Override - protected void doTestEvents(TestListener listener, TestListener parentListener, + protected void doTestEvents(TestApplicationListener listener, TestApplicationListener parentListener, MyEvent event) { - TestListener listenerBean = (TestListener) this.applicationContext.getBean("testListener"); - TestListener parentListenerBean = (TestListener) this.applicationContext.getParent().getBean("parentListener"); + TestApplicationListener listenerBean = (TestApplicationListener) this.applicationContext.getBean("testListener"); + TestApplicationListener parentListenerBean = (TestApplicationListener) this.applicationContext.getParent().getBean("parentListener"); super.doTestEvents(listenerBean, parentListenerBean, event); } diff --git a/spring-webmvc/src/test/java/org/springframework/web/context/support/ServletContextSupportTests.java b/spring-webmvc/src/test/java/org/springframework/web/context/support/ServletContextSupportTests.java index 5f4c3346200..4fffbccb8a7 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/context/support/ServletContextSupportTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/context/support/ServletContextSupportTests.java @@ -27,9 +27,9 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.MutablePropertyValues; import org.springframework.beans.factory.BeanCreationException; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.core.io.Resource; import org.springframework.mock.web.test.MockServletContext; -import org.springframework.tests.sample.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/DispatcherServletTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/DispatcherServletTests.java index 22486a37426..713e6541e2b 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/DispatcherServletTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/DispatcherServletTests.java @@ -32,6 +32,7 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.MutablePropertyValues; import org.springframework.beans.PropertyValue; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.context.ApplicationContextInitializer; import org.springframework.context.ConfigurableApplicationContext; import org.springframework.core.env.ConfigurableEnvironment; @@ -40,7 +41,6 @@ import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.mock.web.test.MockHttpServletResponse; import org.springframework.mock.web.test.MockServletConfig; import org.springframework.mock.web.test.MockServletContext; -import org.springframework.tests.sample.beans.TestBean; import org.springframework.web.context.ConfigurableWebApplicationContext; import org.springframework.web.context.ConfigurableWebEnvironment; import org.springframework.web.context.ContextLoader; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/config/annotation/WebMvcConfigurationSupportExtensionTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/config/annotation/WebMvcConfigurationSupportExtensionTests.java index c533c3aaa94..d03a02418a0 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/config/annotation/WebMvcConfigurationSupportExtensionTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/config/annotation/WebMvcConfigurationSupportExtensionTests.java @@ -27,6 +27,7 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.springframework.beans.DirectFieldAccessor; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.core.Ordered; import org.springframework.core.convert.converter.Converter; import org.springframework.core.io.FileSystemResourceLoader; @@ -41,7 +42,6 @@ import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.mock.web.test.MockServletContext; import org.springframework.scheduling.concurrent.ConcurrentTaskExecutor; import org.springframework.stereotype.Controller; -import org.springframework.tests.sample.beans.TestBean; import org.springframework.util.AntPathMatcher; import org.springframework.validation.BeanPropertyBindingResult; import org.springframework.validation.DefaultMessageCodesResolver; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/annotation/ResponseStatusExceptionResolverTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/annotation/ResponseStatusExceptionResolverTests.java index 833aaf1c86a..cc7a89378df 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/annotation/ResponseStatusExceptionResolverTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/annotation/ResponseStatusExceptionResolverTests.java @@ -24,13 +24,13 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.springframework.beans.TypeMismatchException; +import org.springframework.beans.test.fixtures.beans.ITestBean; import org.springframework.context.i18n.LocaleContextHolder; import org.springframework.context.support.StaticMessageSource; import org.springframework.core.annotation.AliasFor; import org.springframework.http.HttpStatus; import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.mock.web.test.MockHttpServletResponse; -import org.springframework.tests.sample.beans.ITestBean; import org.springframework.web.bind.annotation.ResponseStatus; import org.springframework.web.server.ResponseStatusException; import org.springframework.web.servlet.ModelAndView; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ExtendedServletRequestDataBinderTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ExtendedServletRequestDataBinderTests.java index f8b6a364a6d..23baef13309 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ExtendedServletRequestDataBinderTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ExtendedServletRequestDataBinderTests.java @@ -22,8 +22,8 @@ import java.util.Map; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.mock.web.test.MockHttpServletRequest; -import org.springframework.tests.sample.beans.TestBean; import org.springframework.web.bind.ServletRequestDataBinder; import org.springframework.web.bind.WebDataBinder; import org.springframework.web.servlet.HandlerMapping; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ModelAndViewResolverMethodReturnValueHandlerTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ModelAndViewResolverMethodReturnValueHandlerTests.java index 5961552fe4f..86e85f82efe 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ModelAndViewResolverMethodReturnValueHandlerTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ModelAndViewResolverMethodReturnValueHandlerTests.java @@ -23,9 +23,9 @@ import java.util.List; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.core.MethodParameter; import org.springframework.mock.web.test.MockHttpServletRequest; -import org.springframework.tests.sample.beans.TestBean; import org.springframework.ui.ExtendedModelMap; import org.springframework.web.context.request.NativeWebRequest; import org.springframework.web.context.request.ServletWebRequest; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/RequestMappingHandlerAdapterIntegrationTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/RequestMappingHandlerAdapterIntegrationTests.java index aa119040291..a4f5e0a2479 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/RequestMappingHandlerAdapterIntegrationTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/RequestMappingHandlerAdapterIntegrationTests.java @@ -41,6 +41,7 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.propertyeditors.CustomDateEditor; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.core.MethodParameter; import org.springframework.http.CacheControl; import org.springframework.http.HttpEntity; @@ -51,7 +52,6 @@ import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.mock.web.test.MockHttpServletResponse; import org.springframework.mock.web.test.MockMultipartFile; import org.springframework.mock.web.test.MockMultipartHttpServletRequest; -import org.springframework.tests.sample.beans.TestBean; import org.springframework.ui.Model; import org.springframework.ui.ModelMap; import org.springframework.validation.BindingResult; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ServletAnnotationControllerHandlerMethodTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ServletAnnotationControllerHandlerMethodTests.java index bbcd9379f55..093f1eda916 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ServletAnnotationControllerHandlerMethodTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ServletAnnotationControllerHandlerMethodTests.java @@ -70,6 +70,10 @@ import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.config.BeanDefinition; import org.springframework.beans.factory.support.RootBeanDefinition; import org.springframework.beans.propertyeditors.CustomDateEditor; +import org.springframework.beans.test.fixtures.beans.DerivedTestBean; +import org.springframework.beans.test.fixtures.beans.GenericBean; +import org.springframework.beans.test.fixtures.beans.ITestBean; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.context.annotation.AnnotationConfigUtils; import org.springframework.context.support.PropertySourcesPlaceholderConfigurer; import org.springframework.core.MethodParameter; @@ -102,10 +106,6 @@ import org.springframework.mock.web.test.MockServletConfig; import org.springframework.mock.web.test.MockServletContext; import org.springframework.oxm.jaxb.Jaxb2Marshaller; import org.springframework.stereotype.Controller; -import org.springframework.tests.sample.beans.DerivedTestBean; -import org.springframework.tests.sample.beans.GenericBean; -import org.springframework.tests.sample.beans.ITestBean; -import org.springframework.tests.sample.beans.TestBean; import org.springframework.ui.ExtendedModelMap; import org.springframework.ui.Model; import org.springframework.ui.ModelMap; @@ -288,7 +288,7 @@ public class ServletAnnotationControllerHandlerMethodTests extends AbstractServl request.addParameter("testBeanSet", "1", "2"); MockHttpServletResponse response = new MockHttpServletResponse(); getServlet().service(request, response); - assertThat(response.getContentAsString()).isEqualTo("[1, 2]-org.springframework.tests.sample.beans.TestBean"); + assertThat(response.getContentAsString()).isEqualTo("[1, 2]-org.springframework.beans.test.fixtures.beans.TestBean"); } @Test // SPR-12903 diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ServletModelAttributeMethodProcessorTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ServletModelAttributeMethodProcessorTests.java index 57389379190..125bdeaad65 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ServletModelAttributeMethodProcessorTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ServletModelAttributeMethodProcessorTests.java @@ -24,10 +24,10 @@ import java.util.Optional; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.core.MethodParameter; import org.springframework.core.convert.support.DefaultConversionService; import org.springframework.mock.web.test.MockHttpServletRequest; -import org.springframework.tests.sample.beans.TestBean; import org.springframework.web.bind.annotation.ModelAttribute; import org.springframework.web.bind.support.ConfigurableWebBindingInitializer; import org.springframework.web.bind.support.WebDataBinderFactory; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/support/DefaultHandlerExceptionResolverTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/support/DefaultHandlerExceptionResolverTests.java index ff903342fce..2ff58d4947b 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/support/DefaultHandlerExceptionResolverTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/support/DefaultHandlerExceptionResolverTests.java @@ -24,6 +24,7 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.ConversionNotSupportedException; import org.springframework.beans.TypeMismatchException; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.core.MethodParameter; import org.springframework.http.MediaType; import org.springframework.http.converter.HttpMessageNotReadableException; @@ -31,7 +32,6 @@ import org.springframework.http.converter.HttpMessageNotWritableException; import org.springframework.http.server.ServletServerHttpRequest; import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.mock.web.test.MockHttpServletResponse; -import org.springframework.tests.sample.beans.TestBean; import org.springframework.validation.BeanPropertyBindingResult; import org.springframework.validation.BindException; import org.springframework.web.HttpMediaTypeNotSupportedException; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/support/RedirectAttributesModelMapTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/support/RedirectAttributesModelMapTests.java index a76a5c88ffd..f0c932b0dfb 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/support/RedirectAttributesModelMapTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/support/RedirectAttributesModelMapTests.java @@ -23,10 +23,10 @@ import java.util.Map; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.core.convert.converter.Converter; import org.springframework.format.support.DefaultFormattingConversionService; import org.springframework.format.support.FormattingConversionService; -import org.springframework.tests.sample.beans.TestBean; import org.springframework.validation.DataBinder; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/BindTagTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/BindTagTests.java index 1f302ac1c13..aa45d57d2c0 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/BindTagTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/BindTagTests.java @@ -30,9 +30,9 @@ import javax.servlet.jsp.tagext.Tag; import org.junit.jupiter.api.Test; import org.springframework.beans.propertyeditors.CustomDateEditor; -import org.springframework.tests.sample.beans.IndexedTestBean; -import org.springframework.tests.sample.beans.NestedTestBean; -import org.springframework.tests.sample.beans.TestBean; +import org.springframework.beans.test.fixtures.beans.IndexedTestBean; +import org.springframework.beans.test.fixtures.beans.NestedTestBean; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.validation.BindException; import org.springframework.validation.BindingResult; import org.springframework.validation.DataBinder; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/AbstractFormTagTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/AbstractFormTagTests.java index e80ced5c11f..96d8e54b199 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/AbstractFormTagTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/AbstractFormTagTests.java @@ -18,9 +18,9 @@ package org.springframework.web.servlet.tags.form; import javax.servlet.jsp.JspException; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.mock.web.test.MockPageContext; -import org.springframework.tests.sample.beans.TestBean; /** * @author Rob Harrop diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/ButtonTagTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/ButtonTagTests.java index b87bda01f9b..261f8888895 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/ButtonTagTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/ButtonTagTests.java @@ -22,7 +22,7 @@ import javax.servlet.jsp.tagext.Tag; import org.junit.jupiter.api.Test; -import org.springframework.tests.sample.beans.TestBean; +import org.springframework.beans.test.fixtures.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/CheckboxTagTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/CheckboxTagTests.java index 8ff196b720c..7a793ed9577 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/CheckboxTagTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/CheckboxTagTests.java @@ -34,9 +34,9 @@ import org.dom4j.io.SAXReader; import org.junit.jupiter.api.Test; import org.springframework.beans.propertyeditors.StringTrimmerEditor; -import org.springframework.tests.sample.beans.Colour; -import org.springframework.tests.sample.beans.Pet; -import org.springframework.tests.sample.beans.TestBean; +import org.springframework.beans.test.fixtures.beans.Colour; +import org.springframework.beans.test.fixtures.beans.Pet; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.validation.BeanPropertyBindingResult; import org.springframework.validation.BindingResult; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/CheckboxesTagTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/CheckboxesTagTests.java index 96e4757c581..3d7b5ee82fa 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/CheckboxesTagTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/CheckboxesTagTests.java @@ -38,11 +38,11 @@ import org.dom4j.io.SAXReader; import org.junit.jupiter.api.Test; import org.springframework.beans.propertyeditors.StringTrimmerEditor; +import org.springframework.beans.test.fixtures.beans.Colour; +import org.springframework.beans.test.fixtures.beans.Pet; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.format.Formatter; import org.springframework.format.support.FormattingConversionService; -import org.springframework.tests.sample.beans.Colour; -import org.springframework.tests.sample.beans.Pet; -import org.springframework.tests.sample.beans.TestBean; import org.springframework.util.ObjectUtils; import org.springframework.validation.BeanPropertyBindingResult; import org.springframework.validation.BindingResult; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/ErrorsTagTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/ErrorsTagTests.java index 4df506a289a..37083841dff 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/ErrorsTagTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/ErrorsTagTests.java @@ -28,9 +28,9 @@ import javax.servlet.jsp.tagext.Tag; import org.junit.jupiter.api.Test; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.mock.web.test.MockBodyContent; import org.springframework.mock.web.test.MockPageContext; -import org.springframework.tests.sample.beans.TestBean; import org.springframework.validation.BeanPropertyBindingResult; import org.springframework.validation.BindingResult; import org.springframework.validation.Errors; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/HiddenInputTagTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/HiddenInputTagTests.java index a304e8c1987..2e26d9c1a7d 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/HiddenInputTagTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/HiddenInputTagTests.java @@ -21,7 +21,7 @@ import javax.servlet.jsp.tagext.Tag; import org.junit.jupiter.api.Test; -import org.springframework.tests.sample.beans.TestBean; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.validation.BeanPropertyBindingResult; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/InputTagTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/InputTagTests.java index 18a11bc391e..4ccbd0da443 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/InputTagTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/InputTagTests.java @@ -23,7 +23,7 @@ import javax.servlet.jsp.tagext.Tag; import org.junit.jupiter.api.Test; -import org.springframework.tests.sample.beans.TestBean; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.validation.BeanPropertyBindingResult; import org.springframework.web.servlet.support.BindStatus; import org.springframework.web.servlet.tags.BindTag; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/LabelTagTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/LabelTagTests.java index 019f732201f..ed99587c23e 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/LabelTagTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/LabelTagTests.java @@ -21,8 +21,8 @@ import javax.servlet.jsp.tagext.Tag; import org.junit.jupiter.api.Test; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.mock.web.test.MockPageContext; -import org.springframework.tests.sample.beans.TestBean; import org.springframework.web.servlet.tags.NestedPathTag; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/OptionTagEnumTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/OptionTagEnumTests.java index ddbb46a0493..128d99cb98d 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/OptionTagEnumTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/OptionTagEnumTests.java @@ -21,8 +21,8 @@ import javax.servlet.jsp.tagext.Tag; import org.junit.jupiter.api.Test; -import org.springframework.tests.sample.beans.CustomEnum; -import org.springframework.tests.sample.beans.GenericBean; +import org.springframework.beans.test.fixtures.beans.CustomEnum; +import org.springframework.beans.test.fixtures.beans.GenericBean; import org.springframework.web.servlet.support.BindStatus; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/OptionTagTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/OptionTagTests.java index 97dc9c3a1b2..0cb39f93e37 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/OptionTagTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/OptionTagTests.java @@ -28,10 +28,10 @@ import javax.servlet.jsp.tagext.Tag; import org.junit.jupiter.api.Test; import org.springframework.beans.propertyeditors.StringArrayPropertyEditor; +import org.springframework.beans.test.fixtures.beans.Colour; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.mock.web.test.MockBodyContent; import org.springframework.mock.web.test.MockHttpServletRequest; -import org.springframework.tests.sample.beans.Colour; -import org.springframework.tests.sample.beans.TestBean; import org.springframework.util.StringUtils; import org.springframework.validation.BeanPropertyBindingResult; import org.springframework.web.servlet.support.BindStatus; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/OptionsTagTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/OptionsTagTests.java index e9dd1ec59ff..8150e9980c8 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/OptionsTagTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/OptionsTagTests.java @@ -34,9 +34,9 @@ import org.dom4j.Node; import org.dom4j.io.SAXReader; import org.junit.jupiter.api.Test; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.mock.web.test.MockPageContext; -import org.springframework.tests.sample.beans.TestBean; import org.springframework.validation.BeanPropertyBindingResult; import org.springframework.validation.BindingResult; import org.springframework.validation.Errors; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/RadioButtonTagTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/RadioButtonTagTests.java index 465d710851f..4c0141ec900 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/RadioButtonTagTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/RadioButtonTagTests.java @@ -28,8 +28,8 @@ import org.dom4j.Element; import org.dom4j.io.SAXReader; import org.junit.jupiter.api.Test; -import org.springframework.tests.sample.beans.Pet; -import org.springframework.tests.sample.beans.TestBean; +import org.springframework.beans.test.fixtures.beans.Pet; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.validation.BeanPropertyBindingResult; import org.springframework.validation.BindingResult; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/RadioButtonsTagTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/RadioButtonsTagTests.java index f915db0605d..550afd614f3 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/RadioButtonsTagTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/RadioButtonsTagTests.java @@ -37,9 +37,9 @@ import org.dom4j.io.SAXReader; import org.junit.jupiter.api.Test; import org.springframework.beans.propertyeditors.StringTrimmerEditor; -import org.springframework.tests.sample.beans.Colour; -import org.springframework.tests.sample.beans.Pet; -import org.springframework.tests.sample.beans.TestBean; +import org.springframework.beans.test.fixtures.beans.Colour; +import org.springframework.beans.test.fixtures.beans.Pet; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.validation.BeanPropertyBindingResult; import org.springframework.validation.BindingResult; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/SelectTagTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/SelectTagTests.java index 57183ae4c84..c2b8f6e8372 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/SelectTagTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/SelectTagTests.java @@ -41,9 +41,9 @@ import org.dom4j.io.SAXReader; import org.junit.jupiter.api.Test; import org.springframework.beans.propertyeditors.CustomCollectionEditor; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.format.Formatter; import org.springframework.format.support.FormattingConversionService; -import org.springframework.tests.sample.beans.TestBean; import org.springframework.validation.BeanPropertyBindingResult; import org.springframework.validation.BindingResult; import org.springframework.web.servlet.support.BindStatus; @@ -351,7 +351,7 @@ public class SelectTagTests extends AbstractFormTagTests { assertThatExceptionOfType(JspException.class).as("use a non-Collection typed value as the value of 'items'").isThrownBy( this.tag::doStartTag) .withMessageContaining("items") - .withMessageContaining("org.springframework.tests.sample.beans.TestBean"); + .withMessageContaining("org.springframework.beans.test.fixtures.beans.TestBean"); } @Test diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/TestBeanWithRealCountry.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/TestBeanWithRealCountry.java index 2f37d5b05cc..b6e19fee69e 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/TestBeanWithRealCountry.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/TestBeanWithRealCountry.java @@ -16,7 +16,7 @@ package org.springframework.web.servlet.tags.form; -import org.springframework.tests.sample.beans.TestBean; +import org.springframework.beans.test.fixtures.beans.TestBean; /** * @author Juergen Hoeller diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/TextareaTagTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/TextareaTagTests.java index 0defa4d37ba..4887d25c5af 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/TextareaTagTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/TextareaTagTests.java @@ -20,7 +20,7 @@ import javax.servlet.jsp.tagext.Tag; import org.junit.jupiter.api.Test; -import org.springframework.tests.sample.beans.TestBean; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.validation.BeanPropertyBindingResult; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/view/RedirectViewTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/view/RedirectViewTests.java index 07c50fede29..42e3a52c90d 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/view/RedirectViewTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/view/RedirectViewTests.java @@ -26,11 +26,11 @@ import java.util.Map; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.http.HttpStatus; import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.mock.web.test.MockHttpServletResponse; import org.springframework.mock.web.test.MockServletContext; -import org.springframework.tests.sample.beans.TestBean; import org.springframework.ui.ModelMap; import org.springframework.web.context.ContextLoader; import org.springframework.web.context.support.StaticWebApplicationContext; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/view/ViewResolverTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/view/ViewResolverTests.java index 3e7c1836210..6ba42c614b8 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/view/ViewResolverTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/view/ViewResolverTests.java @@ -36,13 +36,13 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.MutablePropertyValues; import org.springframework.beans.PropertyValue; import org.springframework.beans.factory.BeanDefinitionStoreException; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.Resource; import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.mock.web.test.MockHttpServletResponse; import org.springframework.mock.web.test.MockRequestDispatcher; import org.springframework.mock.web.test.MockServletContext; -import org.springframework.tests.sample.beans.TestBean; import org.springframework.web.context.support.ServletContextResource; import org.springframework.web.context.support.StaticWebApplicationContext; import org.springframework.web.servlet.DispatcherServlet; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/view/freemarker/FreeMarkerMacroTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/view/freemarker/FreeMarkerMacroTests.java index 688f8686a44..d57b19d5e86 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/view/freemarker/FreeMarkerMacroTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/view/freemarker/FreeMarkerMacroTests.java @@ -32,12 +32,12 @@ import freemarker.template.TemplateException; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; +import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.FileSystemResource; import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.mock.web.test.MockHttpServletResponse; import org.springframework.mock.web.test.MockServletContext; -import org.springframework.tests.sample.beans.TestBean; import org.springframework.util.FileCopyUtils; import org.springframework.util.StringUtils; import org.springframework.web.context.support.StaticWebApplicationContext; diff --git a/spring-webmvc/src/test/resources/org/springframework/web/context/WEB-INF/ContextLoaderTests-acc-context.xml b/spring-webmvc/src/test/resources/org/springframework/web/context/WEB-INF/ContextLoaderTests-acc-context.xml index 32b583bedaf..40deeea4b15 100644 --- a/spring-webmvc/src/test/resources/org/springframework/web/context/WEB-INF/ContextLoaderTests-acc-context.xml +++ b/spring-webmvc/src/test/resources/org/springframework/web/context/WEB-INF/ContextLoaderTests-acc-context.xml @@ -3,7 +3,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd"> - + diff --git a/spring-webmvc/src/test/resources/org/springframework/web/context/WEB-INF/applicationContext.xml b/spring-webmvc/src/test/resources/org/springframework/web/context/WEB-INF/applicationContext.xml index 9a023f5da25..2bf1093f519 100644 --- a/spring-webmvc/src/test/resources/org/springframework/web/context/WEB-INF/applicationContext.xml +++ b/spring-webmvc/src/test/resources/org/springframework/web/context/WEB-INF/applicationContext.xml @@ -9,7 +9,7 @@ - + - + - + - + dummy @@ -45,7 +45,7 @@ Tests of lifecycle callbacks --> + class="org.springframework.beans.test.fixtures.beans.MustBeInitialized"> - + - + - + Roderick 31 - + - + Kerry 34 - + typeMismatch 34x @@ -31,20 +31,20 @@ + class="org.springframework.beans.test.fixtures.beans.factory.DummyFactory"> + class="org.springframework.beans.test.fixtures.beans.factory.DummyFactory"> false - + listenerVeto 66 - + diff --git a/spring-webmvc/src/test/resources/org/springframework/web/context/WEB-INF/contextInclude.xml b/spring-webmvc/src/test/resources/org/springframework/web/context/WEB-INF/contextInclude.xml index 5f178d50ebb..5d3eb6c8c9f 100644 --- a/spring-webmvc/src/test/resources/org/springframework/web/context/WEB-INF/contextInclude.xml +++ b/spring-webmvc/src/test/resources/org/springframework/web/context/WEB-INF/contextInclude.xml @@ -1,6 +1,6 @@ - + yetanotherdummy diff --git a/spring-webmvc/src/test/resources/org/springframework/web/context/WEB-INF/sessionContext.xml b/spring-webmvc/src/test/resources/org/springframework/web/context/WEB-INF/sessionContext.xml index 2bdd84592c3..8d2db6fb21a 100644 --- a/spring-webmvc/src/test/resources/org/springframework/web/context/WEB-INF/sessionContext.xml +++ b/spring-webmvc/src/test/resources/org/springframework/web/context/WEB-INF/sessionContext.xml @@ -3,12 +3,12 @@ - + - + diff --git a/spring-webmvc/src/test/resources/org/springframework/web/context/WEB-INF/test-servlet.xml b/spring-webmvc/src/test/resources/org/springframework/web/context/WEB-INF/test-servlet.xml index 47f7e89925e..4f444b9176b 100644 --- a/spring-webmvc/src/test/resources/org/springframework/web/context/WEB-INF/test-servlet.xml +++ b/spring-webmvc/src/test/resources/org/springframework/web/context/WEB-INF/test-servlet.xml @@ -11,49 +11,49 @@ org/springframework/web/context/WEB-INF/test- - + - + - + Rod 31 - + Roderick 31 - + - + Kerry 34 - + typeMismatch 34x - + - + false - + listenerVeto 66 - + diff --git a/spring-webmvc/src/test/resources/org/springframework/web/context/WEB-INF/testNamespace.xml b/spring-webmvc/src/test/resources/org/springframework/web/context/WEB-INF/testNamespace.xml index 2983c5360bb..519b5d89821 100644 --- a/spring-webmvc/src/test/resources/org/springframework/web/context/WEB-INF/testNamespace.xml +++ b/spring-webmvc/src/test/resources/org/springframework/web/context/WEB-INF/testNamespace.xml @@ -3,12 +3,12 @@ - + Rod 31 - + Kerry 34 From 0335db23c91aef59130534598cbf2b2c4560b398 Mon Sep 17 00:00:00 2001 From: Sam Brannen Date: Sun, 29 Dec 2019 15:43:15 +0100 Subject: [PATCH 03/13] Use Gradle test fixture support for spring-context-support See gh-23550 --- .../build/testsources/TestSourcesPlugin.java | 10 ++++++++-- spring-aspects/spring-aspects.gradle | 1 + .../cache/aspectj/JCacheAspectJJavaConfigTests.java | 2 +- .../aspectj/JCacheAspectJNamespaceConfigTests.java | 2 +- .../cache/config/AnnotatedJCacheableService.java | 6 +++--- spring-context-support/spring-context-support.gradle | 3 +++ .../jcache/config/JCacheCustomInterceptorTests.java | 1 + .../cache/jcache/config/JCacheJavaConfigTests.java | 2 ++ .../jcache/config/JCacheNamespaceDrivenTests.java | 1 + .../jcache/config/JCacheStandaloneConfigTests.java | 1 + .../jcache/interceptor/AnnotatedJCacheableService.java | 6 +++--- .../AnnotationCacheOperationSourceTests.java | 6 +++--- .../testfixture/cache}/TestableCacheKeyGenerator.java | 2 +- .../testfixture/cache}/TestableCacheResolver.java | 2 +- .../cache}/TestableCacheResolverFactory.java | 2 +- .../jcache}/AbstractJCacheAnnotationTests.java | 2 +- .../testfixture/jcache}/JCacheableService.java | 2 +- 17 files changed, 33 insertions(+), 18 deletions(-) rename spring-context-support/src/{test/java/org/springframework/cache/jcache/support => testFixtures/java/org/springframework/contextsupport/testfixture/cache}/TestableCacheKeyGenerator.java (96%) rename spring-context-support/src/{test/java/org/springframework/cache/jcache/support => testFixtures/java/org/springframework/contextsupport/testfixture/cache}/TestableCacheResolver.java (95%) rename spring-context-support/src/{test/java/org/springframework/cache/jcache/support => testFixtures/java/org/springframework/contextsupport/testfixture/cache}/TestableCacheResolverFactory.java (95%) rename spring-context-support/src/{test/java/org/springframework/cache/jcache/config => testFixtures/java/org/springframework/contextsupport/testfixture/jcache}/AbstractJCacheAnnotationTests.java (99%) rename spring-context-support/src/{test/java/org/springframework/cache/jcache/config => testFixtures/java/org/springframework/contextsupport/testfixture/jcache}/JCacheableService.java (96%) diff --git a/buildSrc/src/main/java/org/springframework/build/testsources/TestSourcesPlugin.java b/buildSrc/src/main/java/org/springframework/build/testsources/TestSourcesPlugin.java index db5a10a7683..afe853b2845 100644 --- a/buildSrc/src/main/java/org/springframework/build/testsources/TestSourcesPlugin.java +++ b/buildSrc/src/main/java/org/springframework/build/testsources/TestSourcesPlugin.java @@ -59,7 +59,13 @@ public class TestSourcesPlugin implements Plugin { * Projects which will not be automatically added as a test dependency. *

This is used to assist with the migration to Gradle test fixtures. */ - private static final List excludedProjects = Arrays.asList("spring-beans", "spring-core", "spring-context"); + private static final List excludedProjects = Arrays.asList( + "spring-beans", + "spring-context", + "spring-context-indexer", + "spring-context-support", + "spring-core" + ); @Override @@ -97,7 +103,7 @@ public class TestSourcesPlugin implements Plugin { dependencyProject.getPlugins().withType(JavaPlugin.class, plugin -> { JavaPluginConvention javaPlugin = dependencyProject.getConvention().getPlugin(JavaPluginConvention.class); SourceSetOutput test = javaPlugin.getSourceSets().findByName(SourceSet.TEST_SOURCE_SET_NAME).getOutput(); - // System.err.println(String.format("Adding test source dependencies from %s to %s", currentProject.getName(), dependencyProject.getName())); + System.err.println(String.format("Adding test source dependencies from %s to %s", currentProject.getName(), dependencyProject.getName())); currentProject.getDependencies().add(JavaPlugin.TEST_COMPILE_CONFIGURATION_NAME, test); }); } diff --git a/spring-aspects/spring-aspects.gradle b/spring-aspects/spring-aspects.gradle index 202014e728c..26bd68f8821 100644 --- a/spring-aspects/spring-aspects.gradle +++ b/spring-aspects/spring-aspects.gradle @@ -25,6 +25,7 @@ dependencies { testCompile(project(":spring-core")) // for CodeStyleAspect testCompile(project(":spring-test")) testCompile(testFixtures(project(":spring-context"))) + testCompile(testFixtures(project(":spring-context-support"))) testCompile(testFixtures(project(":spring-core"))) testCompile("javax.mail:javax.mail-api") testCompileOnly("org.aspectj:aspectjrt") diff --git a/spring-aspects/src/test/java/org/springframework/cache/aspectj/JCacheAspectJJavaConfigTests.java b/spring-aspects/src/test/java/org/springframework/cache/aspectj/JCacheAspectJJavaConfigTests.java index c48ad735e6a..dc278365d72 100644 --- a/spring-aspects/src/test/java/org/springframework/cache/aspectj/JCacheAspectJJavaConfigTests.java +++ b/spring-aspects/src/test/java/org/springframework/cache/aspectj/JCacheAspectJJavaConfigTests.java @@ -23,13 +23,13 @@ import org.springframework.cache.CacheManager; import org.springframework.cache.annotation.EnableCaching; import org.springframework.cache.concurrent.ConcurrentMapCache; import org.springframework.cache.config.AnnotatedJCacheableService; -import org.springframework.cache.jcache.config.AbstractJCacheAnnotationTests; import org.springframework.cache.support.SimpleCacheManager; import org.springframework.context.ApplicationContext; import org.springframework.context.annotation.AdviceMode; import org.springframework.context.annotation.AnnotationConfigApplicationContext; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; +import org.springframework.contextsupport.testfixture.jcache.AbstractJCacheAnnotationTests; /** * @author Stephane Nicoll diff --git a/spring-aspects/src/test/java/org/springframework/cache/aspectj/JCacheAspectJNamespaceConfigTests.java b/spring-aspects/src/test/java/org/springframework/cache/aspectj/JCacheAspectJNamespaceConfigTests.java index a3e924e3550..81ba6d0faff 100644 --- a/spring-aspects/src/test/java/org/springframework/cache/aspectj/JCacheAspectJNamespaceConfigTests.java +++ b/spring-aspects/src/test/java/org/springframework/cache/aspectj/JCacheAspectJNamespaceConfigTests.java @@ -16,9 +16,9 @@ package org.springframework.cache.aspectj; -import org.springframework.cache.jcache.config.AbstractJCacheAnnotationTests; import org.springframework.context.ApplicationContext; import org.springframework.context.support.GenericXmlApplicationContext; +import org.springframework.contextsupport.testfixture.jcache.AbstractJCacheAnnotationTests; /** * @author Stephane Nicoll diff --git a/spring-aspects/src/test/java/org/springframework/cache/config/AnnotatedJCacheableService.java b/spring-aspects/src/test/java/org/springframework/cache/config/AnnotatedJCacheableService.java index 299f76bf8f6..0b004f46b91 100644 --- a/spring-aspects/src/test/java/org/springframework/cache/config/AnnotatedJCacheableService.java +++ b/spring-aspects/src/test/java/org/springframework/cache/config/AnnotatedJCacheableService.java @@ -30,9 +30,9 @@ import javax.cache.annotation.CacheValue; import org.springframework.cache.Cache; import org.springframework.cache.interceptor.SimpleKeyGenerator; -import org.springframework.cache.jcache.config.JCacheableService; -import org.springframework.cache.jcache.support.TestableCacheKeyGenerator; -import org.springframework.cache.jcache.support.TestableCacheResolverFactory; +import org.springframework.contextsupport.testfixture.cache.TestableCacheKeyGenerator; +import org.springframework.contextsupport.testfixture.cache.TestableCacheResolverFactory; +import org.springframework.contextsupport.testfixture.jcache.JCacheableService; /** * Repository sample with a @CacheDefaults annotation diff --git a/spring-context-support/spring-context-support.gradle b/spring-context-support/spring-context-support.gradle index be8fb24dfeb..47ad91ccfad 100644 --- a/spring-context-support/spring-context-support.gradle +++ b/spring-context-support/spring-context-support.gradle @@ -25,4 +25,7 @@ dependencies { testRuntime("org.ehcache:ehcache") testRuntime("org.glassfish:javax.el") testRuntime("com.sun.mail:javax.mail") + testFixturesApi("org.junit.jupiter:junit-jupiter-api") + testFixturesImplementation("org.assertj:assertj-core") + testFixturesImplementation("org.mockito:mockito-core") } diff --git a/spring-context-support/src/test/java/org/springframework/cache/jcache/config/JCacheCustomInterceptorTests.java b/spring-context-support/src/test/java/org/springframework/cache/jcache/config/JCacheCustomInterceptorTests.java index 8ac2f4a3e6b..6d5714d0957 100644 --- a/spring-context-support/src/test/java/org/springframework/cache/jcache/config/JCacheCustomInterceptorTests.java +++ b/spring-context-support/src/test/java/org/springframework/cache/jcache/config/JCacheCustomInterceptorTests.java @@ -37,6 +37,7 @@ import org.springframework.context.ConfigurableApplicationContext; import org.springframework.context.annotation.AnnotationConfigApplicationContext; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; +import org.springframework.contextsupport.testfixture.jcache.JCacheableService; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; diff --git a/spring-context-support/src/test/java/org/springframework/cache/jcache/config/JCacheJavaConfigTests.java b/spring-context-support/src/test/java/org/springframework/cache/jcache/config/JCacheJavaConfigTests.java index b7f3007dd78..e8c4275823f 100644 --- a/spring-context-support/src/test/java/org/springframework/cache/jcache/config/JCacheJavaConfigTests.java +++ b/spring-context-support/src/test/java/org/springframework/cache/jcache/config/JCacheJavaConfigTests.java @@ -43,6 +43,8 @@ import org.springframework.context.annotation.AnnotationConfigApplicationContext import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.test.fixtures.cache.SomeKeyGenerator; +import org.springframework.contextsupport.testfixture.jcache.AbstractJCacheAnnotationTests; +import org.springframework.contextsupport.testfixture.jcache.JCacheableService; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatIllegalStateException; diff --git a/spring-context-support/src/test/java/org/springframework/cache/jcache/config/JCacheNamespaceDrivenTests.java b/spring-context-support/src/test/java/org/springframework/cache/jcache/config/JCacheNamespaceDrivenTests.java index 28f7c513c76..262689f83ad 100644 --- a/spring-context-support/src/test/java/org/springframework/cache/jcache/config/JCacheNamespaceDrivenTests.java +++ b/spring-context-support/src/test/java/org/springframework/cache/jcache/config/JCacheNamespaceDrivenTests.java @@ -24,6 +24,7 @@ import org.springframework.cache.jcache.interceptor.JCacheInterceptor; import org.springframework.context.ApplicationContext; import org.springframework.context.ConfigurableApplicationContext; import org.springframework.context.support.GenericXmlApplicationContext; +import org.springframework.contextsupport.testfixture.jcache.AbstractJCacheAnnotationTests; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-context-support/src/test/java/org/springframework/cache/jcache/config/JCacheStandaloneConfigTests.java b/spring-context-support/src/test/java/org/springframework/cache/jcache/config/JCacheStandaloneConfigTests.java index c57d7ecc213..f07e5214850 100644 --- a/spring-context-support/src/test/java/org/springframework/cache/jcache/config/JCacheStandaloneConfigTests.java +++ b/spring-context-support/src/test/java/org/springframework/cache/jcache/config/JCacheStandaloneConfigTests.java @@ -18,6 +18,7 @@ package org.springframework.cache.jcache.config; import org.springframework.context.ApplicationContext; import org.springframework.context.support.GenericXmlApplicationContext; +import org.springframework.contextsupport.testfixture.jcache.AbstractJCacheAnnotationTests; /** * @author Stephane Nicoll diff --git a/spring-context-support/src/test/java/org/springframework/cache/jcache/interceptor/AnnotatedJCacheableService.java b/spring-context-support/src/test/java/org/springframework/cache/jcache/interceptor/AnnotatedJCacheableService.java index 1e44ab251d0..e5cfb12b64e 100644 --- a/spring-context-support/src/test/java/org/springframework/cache/jcache/interceptor/AnnotatedJCacheableService.java +++ b/spring-context-support/src/test/java/org/springframework/cache/jcache/interceptor/AnnotatedJCacheableService.java @@ -30,9 +30,9 @@ import javax.cache.annotation.CacheValue; import org.springframework.cache.Cache; import org.springframework.cache.interceptor.SimpleKeyGenerator; -import org.springframework.cache.jcache.config.JCacheableService; -import org.springframework.cache.jcache.support.TestableCacheKeyGenerator; -import org.springframework.cache.jcache.support.TestableCacheResolverFactory; +import org.springframework.contextsupport.testfixture.cache.TestableCacheKeyGenerator; +import org.springframework.contextsupport.testfixture.cache.TestableCacheResolverFactory; +import org.springframework.contextsupport.testfixture.jcache.JCacheableService; /** * Repository sample with a @CacheDefaults annotation diff --git a/spring-context-support/src/test/java/org/springframework/cache/jcache/interceptor/AnnotationCacheOperationSourceTests.java b/spring-context-support/src/test/java/org/springframework/cache/jcache/interceptor/AnnotationCacheOperationSourceTests.java index 6a2e6d756b0..bcc9276243b 100644 --- a/spring-context-support/src/test/java/org/springframework/cache/jcache/interceptor/AnnotationCacheOperationSourceTests.java +++ b/spring-context-support/src/test/java/org/springframework/cache/jcache/interceptor/AnnotationCacheOperationSourceTests.java @@ -32,9 +32,9 @@ import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.cache.interceptor.CacheResolver; import org.springframework.cache.interceptor.KeyGenerator; import org.springframework.cache.jcache.AbstractJCacheTests; -import org.springframework.cache.jcache.support.TestableCacheKeyGenerator; -import org.springframework.cache.jcache.support.TestableCacheResolver; -import org.springframework.cache.jcache.support.TestableCacheResolverFactory; +import org.springframework.contextsupport.testfixture.cache.TestableCacheKeyGenerator; +import org.springframework.contextsupport.testfixture.cache.TestableCacheResolver; +import org.springframework.contextsupport.testfixture.cache.TestableCacheResolverFactory; import org.springframework.util.Assert; import org.springframework.util.ReflectionUtils; diff --git a/spring-context-support/src/test/java/org/springframework/cache/jcache/support/TestableCacheKeyGenerator.java b/spring-context-support/src/testFixtures/java/org/springframework/contextsupport/testfixture/cache/TestableCacheKeyGenerator.java similarity index 96% rename from spring-context-support/src/test/java/org/springframework/cache/jcache/support/TestableCacheKeyGenerator.java rename to spring-context-support/src/testFixtures/java/org/springframework/contextsupport/testfixture/cache/TestableCacheKeyGenerator.java index 3e881dd519e..9bb225ba80f 100644 --- a/spring-context-support/src/test/java/org/springframework/cache/jcache/support/TestableCacheKeyGenerator.java +++ b/spring-context-support/src/testFixtures/java/org/springframework/contextsupport/testfixture/cache/TestableCacheKeyGenerator.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.cache.jcache.support; +package org.springframework.contextsupport.testfixture.cache; import java.lang.annotation.Annotation; diff --git a/spring-context-support/src/test/java/org/springframework/cache/jcache/support/TestableCacheResolver.java b/spring-context-support/src/testFixtures/java/org/springframework/contextsupport/testfixture/cache/TestableCacheResolver.java similarity index 95% rename from spring-context-support/src/test/java/org/springframework/cache/jcache/support/TestableCacheResolver.java rename to spring-context-support/src/testFixtures/java/org/springframework/contextsupport/testfixture/cache/TestableCacheResolver.java index 519ba73422d..04567b1a845 100644 --- a/spring-context-support/src/test/java/org/springframework/cache/jcache/support/TestableCacheResolver.java +++ b/spring-context-support/src/testFixtures/java/org/springframework/contextsupport/testfixture/cache/TestableCacheResolver.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.cache.jcache.support; +package org.springframework.contextsupport.testfixture.cache; import java.lang.annotation.Annotation; diff --git a/spring-context-support/src/test/java/org/springframework/cache/jcache/support/TestableCacheResolverFactory.java b/spring-context-support/src/testFixtures/java/org/springframework/contextsupport/testfixture/cache/TestableCacheResolverFactory.java similarity index 95% rename from spring-context-support/src/test/java/org/springframework/cache/jcache/support/TestableCacheResolverFactory.java rename to spring-context-support/src/testFixtures/java/org/springframework/contextsupport/testfixture/cache/TestableCacheResolverFactory.java index c544dde8bbe..5849090acd1 100644 --- a/spring-context-support/src/test/java/org/springframework/cache/jcache/support/TestableCacheResolverFactory.java +++ b/spring-context-support/src/testFixtures/java/org/springframework/contextsupport/testfixture/cache/TestableCacheResolverFactory.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.cache.jcache.support; +package org.springframework.contextsupport.testfixture.cache; import java.lang.annotation.Annotation; diff --git a/spring-context-support/src/test/java/org/springframework/cache/jcache/config/AbstractJCacheAnnotationTests.java b/spring-context-support/src/testFixtures/java/org/springframework/contextsupport/testfixture/jcache/AbstractJCacheAnnotationTests.java similarity index 99% rename from spring-context-support/src/test/java/org/springframework/cache/jcache/config/AbstractJCacheAnnotationTests.java rename to spring-context-support/src/testFixtures/java/org/springframework/contextsupport/testfixture/jcache/AbstractJCacheAnnotationTests.java index aa6478acec6..db5bb038e94 100644 --- a/spring-context-support/src/test/java/org/springframework/cache/jcache/config/AbstractJCacheAnnotationTests.java +++ b/spring-context-support/src/testFixtures/java/org/springframework/contextsupport/testfixture/jcache/AbstractJCacheAnnotationTests.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.cache.jcache.config; +package org.springframework.contextsupport.testfixture.jcache; import java.io.IOException; import java.util.concurrent.ConcurrentHashMap; diff --git a/spring-context-support/src/test/java/org/springframework/cache/jcache/config/JCacheableService.java b/spring-context-support/src/testFixtures/java/org/springframework/contextsupport/testfixture/jcache/JCacheableService.java similarity index 96% rename from spring-context-support/src/test/java/org/springframework/cache/jcache/config/JCacheableService.java rename to spring-context-support/src/testFixtures/java/org/springframework/contextsupport/testfixture/jcache/JCacheableService.java index 1c43cfbea2e..db36d110320 100644 --- a/spring-context-support/src/test/java/org/springframework/cache/jcache/config/JCacheableService.java +++ b/spring-context-support/src/testFixtures/java/org/springframework/contextsupport/testfixture/jcache/JCacheableService.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.cache.jcache.config; +package org.springframework.contextsupport.testfixture.jcache; import java.io.IOException; From 4260c34b476862a3d026e58d7e6295591cdda50a Mon Sep 17 00:00:00 2001 From: Sam Brannen Date: Sun, 29 Dec 2019 16:03:25 +0100 Subject: [PATCH 04/13] Rename test fixture package in spring-core See gh-23550 --- .../AopNamespaceHandlerScopeIntegrationTests.java | 2 +- ...uledAndTransactionalAnnotationIntegrationTests.java | 4 ++-- .../aspectj/annotation/AspectProxyFactoryTests.java | 2 +- .../aop/config/AopNamespaceHandlerEventTests.java | 2 +- .../config/AopNamespaceHandlerPointcutErrorTests.java | 2 +- .../aop/config/TopLevelAopTagTests.java | 2 +- .../aop/framework/PrototypeTargetTests.java | 2 +- .../aop/framework/ProxyFactoryTests.java | 2 +- .../ConcurrencyThrottleInterceptorTests.java | 2 +- .../interceptor/ExposeInvocationInterceptorTests.java | 2 +- .../aop/scope/ScopedProxyAutowireTests.java | 2 +- .../aop/support/AbstractRegexpMethodPointcutTests.java | 2 +- .../org/springframework/aop/support/AopUtilsTests.java | 2 +- .../DelegatingIntroductionInterceptorTests.java | 4 ++-- .../aop/support/MethodMatchersTests.java | 2 +- .../aop/support/NameMatchMethodPointcutTests.java | 2 +- .../RegexpMethodPointcutAdvisorIntegrationTests.java | 4 ++-- .../aop/target/CommonsPool2TargetSourceProxyTests.java | 2 +- .../aop/target/HotSwappableTargetSourceTests.java | 4 ++-- .../aop/target/LazyInitTargetSourceTests.java | 2 +- .../aop/target/PrototypeBasedTargetSourceTests.java | 2 +- .../aop/target/PrototypeTargetSourceTests.java | 2 +- .../aop/target/ThreadLocalTargetSourceTests.java | 2 +- .../target/dynamic/RefreshableTargetSourceTests.java | 4 ++-- .../interceptor/TimestampIntroductionInterceptor.java | 2 +- .../aspectj/AnnotationAsyncExecutionAspectTests.java | 4 ++-- .../beans/AbstractPropertyAccessorTests.java | 6 +++--- .../beans/factory/BeanFactoryUtilsTests.java | 2 +- .../beans/factory/ConcurrentBeanFactoryTests.java | 6 +++--- .../beans/factory/DefaultListableBeanFactoryTests.java | 8 ++++---- .../beans/factory/FactoryBeanTests.java | 4 ++-- .../AutowiredAnnotationBeanPostProcessorTests.java | 2 +- .../annotation/CustomAutowireConfigurerTests.java | 2 +- .../InjectAnnotationBeanPostProcessorTests.java | 2 +- .../config/FieldRetrievingFactoryBeanTests.java | 2 +- .../config/ObjectFactoryCreatingFactoryBeanTests.java | 4 ++-- .../factory/config/PropertiesFactoryBeanTests.java | 2 +- .../factory/config/PropertyPathFactoryBeanTests.java | 2 +- .../config/PropertyResourceConfigurerTests.java | 2 +- .../beans/factory/config/SimpleScopeTests.java | 2 +- .../factory/parsing/CustomProblemReporterTests.java | 2 +- .../factory/support/BeanFactoryGenericsTests.java | 4 ++-- .../cache/ehcache/EhCacheCacheTests.java | 4 ++-- .../scheduling/quartz/QuartzSupportTests.java | 4 ++-- .../beanvalidation2/SpringValidatorAdapterTests.java | 2 +- .../autoproxy/AspectJAutoProxyCreatorTests.java | 6 +++--- .../aop/framework/AbstractAopProxyTests.java | 10 +++++----- .../aop/framework/ProxyFactoryBeanTests.java | 4 ++-- .../autoproxy/BeanNameAutoProxyCreatorTests.java | 2 +- .../springframework/aop/scope/ScopedProxyTests.java | 2 +- .../aop/target/CommonsPool2TargetSourceTests.java | 2 +- .../beans/factory/xml/XmlBeanFactoryTests.java | 2 +- .../AnnotationProcessorPerformanceTests.java | 6 +++--- .../CommonAnnotationBeanPostProcessorTests.java | 2 +- .../ComponentScanAnnotationIntegrationTests.java | 2 +- .../ComponentScanParserScopedProxyTests.java | 2 +- .../expression/ApplicationContextExpressionTests.java | 8 ++++---- .../EnvironmentAccessorIntegrationTests.java | 2 +- .../support/DefaultLifecycleProcessorTests.java | 4 ++-- .../EnvironmentSecurityManagerIntegrationTests.java | 2 +- .../PropertySourcesPlaceholderConfigurerTests.java | 2 +- .../org/springframework/mock/env/MockEnvironment.java | 4 ++-- .../scheduling/annotation/EnableSchedulingTests.java | 4 ++-- .../concurrent/ScheduledExecutorFactoryBeanTests.java | 4 ++-- .../support/ScriptFactoryPostProcessorTests.java | 4 ++-- .../beanvalidation/SpringValidatorAdapterTests.java | 2 +- .../context/support/BeanDefinitionDslTests.kt | 2 +- .../java/example/type/AspectJTypeFilterTestsTypes.java | 2 +- .../core/annotation/AnnotatedElementUtilsTests.java | 4 ++-- .../core/annotation/AnnotationUtilsTests.java | 4 ++-- .../core/annotation/MergedAnnotationsTests.java | 6 +++--- .../core/codec/ByteArrayDecoderTests.java | 2 +- .../core/codec/ByteArrayEncoderTests.java | 2 +- .../core/codec/ByteBufferDecoderTests.java | 2 +- .../core/codec/ByteBufferEncoderTests.java | 2 +- .../core/codec/CharSequenceEncoderTests.java | 2 +- .../core/codec/DataBufferDecoderTests.java | 2 +- .../core/codec/DataBufferEncoderTests.java | 2 +- .../core/codec/ResourceDecoderTests.java | 2 +- .../core/codec/ResourceEncoderTests.java | 2 +- .../core/codec/ResourceRegionEncoderTests.java | 4 ++-- .../springframework/core/codec/StringDecoderTests.java | 2 +- .../converter/DefaultConversionServiceTests.java | 4 ++-- .../convert/support/GenericConversionServiceTests.java | 4 ++-- .../core/env/MutablePropertySourcesTests.java | 2 +- .../core/env/PropertySourcesPropertyResolverTests.java | 2 +- .../core/env/StandardEnvironmentTests.java | 4 ++-- .../core/io/buffer/DataBufferTests.java | 2 +- .../core/io/buffer/DataBufferUtilsTests.java | 4 ++-- .../io/buffer/LeakAwareDataBufferFactoryTests.java | 2 +- .../io/buffer/support/DataBufferTestUtilsTests.java | 4 ++-- .../TestGroupParsingTests.java | 2 +- .../{test/fixtures => testfixture}/TestGroupTests.java | 6 +++--- .../core/type/AnnotationMetadataTests.java | 2 +- .../core/type/AnnotationTypeFilterTests.java | 2 +- .../core/type/AspectJTypeFilterTests.java | 6 +++--- .../core/type/CachingMetadataReaderLeakTests.java | 4 ++-- .../springframework/util/AutoPopulatingListTests.java | 2 +- .../org/springframework/util/ReflectionUtilsTests.java | 4 ++-- .../util/xml/AbstractStaxHandlerTests.java | 2 +- .../util/xml/DomContentHandlerTests.java | 2 +- .../util/xml/ListBasedXMLEventReaderTests.java | 2 +- .../org/springframework/util/xml/StaxResultTests.java | 2 +- .../org/springframework/util/xml/StaxSourceTests.java | 2 +- .../util/xml/XMLEventStreamReaderTests.java | 2 +- .../util/xml/XMLEventStreamWriterTests.java | 2 +- .../core/{test/fixtures => testfixture}/Assume.java | 2 +- .../fixtures => testfixture}/EnabledForTestGroups.java | 2 +- .../core/{test/fixtures => testfixture}/TestGroup.java | 2 +- .../fixtures => testfixture}/TestGroupsCondition.java | 2 +- .../{test/fixtures => testfixture}/TimeStamped.java | 2 +- .../codec/AbstractDecoderTests.java | 4 ++-- .../codec/AbstractEncoderTests.java | 4 ++-- .../env/EnvironmentTestUtils.java | 2 +- .../env/MockPropertySource.java | 2 +- .../fixtures => testfixture}/io/ResourceTestUtils.java | 2 +- .../io/SerializationTestUtils.java | 2 +- .../io/buffer/AbstractDataBufferAllocatingTests.java | 4 ++-- .../io/buffer/AbstractLeakCheckingTests.java | 2 +- .../io/buffer/DataBufferTestUtils.java | 2 +- .../io/buffer/LeakAwareDataBuffer.java | 2 +- .../io/buffer/LeakAwareDataBufferFactory.java | 2 +- .../fixtures => testfixture}/stereotype/Component.java | 2 +- .../fixtures => testfixture}/stereotype/Indexed.java | 2 +- .../{test/fixtures => testfixture}/xml/XmlContent.java | 2 +- .../fixtures => testfixture}/xml/XmlContentAssert.java | 2 +- .../expression/spel/MapAccessTests.java | 4 ++-- .../expression/spel/PerformanceTests.java | 4 ++-- .../jdbc/config/JdbcNamespaceIntegrationTests.java | 4 ++-- .../datasource/DataSourceTransactionManagerTests.java | 4 ++-- .../springframework/messaging/MessageHeadersTests.java | 2 +- .../converter/MarshallingMessageConverterTests.java | 2 +- .../reactive/TestEncoderMethodReturnValueHandler.java | 2 +- .../rsocket/LeakAwareNettyDataBufferFactory.java | 2 +- .../messaging/rsocket/MetadataEncoderTests.java | 2 +- .../messaging/rsocket/PayloadUtilsTests.java | 2 +- .../messaging/support/MessageHeaderAccessorTests.java | 2 +- ...tContainerEntityManagerFactoryIntegrationTests.java | 2 +- .../LocalContainerEntityManagerFactoryBeanTests.java | 2 +- .../orm/jpa/support/PersistenceInjectionTests.java | 2 +- .../springframework/oxm/AbstractMarshallerTests.java | 2 +- .../springframework/oxm/jaxb/Jaxb2MarshallerTests.java | 2 +- .../springframework/oxm/jibx/JibxMarshallerTests.java | 2 +- .../oxm/xstream/XStreamMarshallerTests.java | 2 +- .../concurrency/SpringJUnit4ConcurrencyTests.java | 2 +- .../web/reactive/server/HttpHandlerConnectorTests.java | 2 +- .../servlet/htmlunit/DelegatingWebConnectionTests.java | 4 ++-- .../servlet/htmlunit/MockMvcWebClientBuilderTests.java | 2 +- .../webdriver/MockMvcHtmlUnitDriverBuilderTests.java | 2 +- .../AnnotationTransactionAttributeSourceTests.java | 2 +- .../transaction/config/AnnotationDrivenTests.java | 2 +- .../TransactionAttributeSourceAdvisorTests.java | 2 +- .../interceptor/TransactionInterceptorTests.java | 2 +- .../JtaTransactionManagerSerializationTests.java | 2 +- .../http/codec/CancelWithoutDemandCodecTests.java | 2 +- .../http/codec/FormHttpMessageReaderTests.java | 2 +- .../http/codec/FormHttpMessageWriterTests.java | 4 ++-- .../codec/ServerSentEventHttpMessageReaderTests.java | 2 +- .../codec/ServerSentEventHttpMessageWriterTests.java | 4 ++-- .../http/codec/cbor/Jackson2CborDecoderTests.java | 2 +- .../http/codec/cbor/Jackson2CborEncoderTests.java | 4 ++-- .../http/codec/json/Jackson2JsonDecoderTests.java | 2 +- .../http/codec/json/Jackson2JsonEncoderTests.java | 2 +- .../http/codec/json/Jackson2SmileDecoderTests.java | 2 +- .../http/codec/json/Jackson2SmileEncoderTests.java | 4 ++-- .../http/codec/json/Jackson2TokenizerTests.java | 2 +- .../multipart/MultipartHttpMessageWriterTests.java | 2 +- .../SynchronossPartHttpMessageReaderTests.java | 4 ++-- .../http/codec/protobuf/ProtobufDecoderTests.java | 2 +- .../http/codec/protobuf/ProtobufEncoderTests.java | 2 +- .../http/codec/xml/Jaxb2XmlDecoderTests.java | 2 +- .../http/codec/xml/Jaxb2XmlEncoderTests.java | 4 ++-- .../http/codec/xml/XmlEventDecoderTests.java | 2 +- .../feed/AtomFeedHttpMessageConverterTests.java | 2 +- .../feed/RssChannelHttpMessageConverterTests.java | 2 +- .../xml/Jaxb2RootElementHttpMessageConverterTests.java | 2 +- .../converter/xml/SourceHttpMessageConverterTests.java | 2 +- .../http/server/reactive/ChannelSendOperatorTests.java | 2 +- .../reactive/HttpHeadResponseDecoratorTests.java | 2 +- .../web/bind/ServletRequestUtilsTests.java | 4 ++-- .../web/context/request/SessionScopeTests.java | 2 +- .../reactive/config/ResourceHandlerRegistryTests.java | 2 +- .../web/reactive/function/BodyInsertersTests.java | 2 +- .../function/client/ExchangeFilterFunctionsTests.java | 2 +- .../client/WebClientDataBufferAllocatingTests.java | 2 +- .../web/reactive/resource/ResourceWebHandlerTests.java | 2 +- .../annotation/MessageWriterResultHandlerTests.java | 2 +- .../RequestPartMethodArgumentResolverTests.java | 2 +- .../annotation/ResponseEntityResultHandlerTests.java | 2 +- .../result/view/HttpMessageWriterViewTests.java | 2 +- .../result/view/ViewResolutionResultHandlerTests.java | 2 +- .../web/reactive/result/view/ZeroDemandResponse.java | 2 +- .../ServletAnnotationControllerHandlerMethodTests.java | 2 +- .../web/servlet/view/feed/AtomFeedViewTests.java | 2 +- .../web/servlet/view/feed/RssFeedViewTests.java | 2 +- .../sockjs/client/AbstractSockJsIntegrationTests.java | 4 ++-- 196 files changed, 263 insertions(+), 263 deletions(-) rename spring-core/src/test/java/org/springframework/core/{test/fixtures => testfixture}/TestGroupParsingTests.java (98%) rename spring-core/src/test/java/org/springframework/core/{test/fixtures => testfixture}/TestGroupTests.java (95%) rename spring-core/src/testFixtures/java/org/springframework/core/{test/fixtures => testfixture}/Assume.java (96%) rename spring-core/src/testFixtures/java/org/springframework/core/{test/fixtures => testfixture}/EnabledForTestGroups.java (96%) rename spring-core/src/testFixtures/java/org/springframework/core/{test/fixtures => testfixture}/TestGroup.java (98%) rename spring-core/src/testFixtures/java/org/springframework/core/{test/fixtures => testfixture}/TestGroupsCondition.java (97%) rename spring-core/src/testFixtures/java/org/springframework/core/{test/fixtures => testfixture}/TimeStamped.java (95%) rename spring-core/src/testFixtures/java/org/springframework/core/{test/fixtures => testfixture}/codec/AbstractDecoderTests.java (99%) rename spring-core/src/testFixtures/java/org/springframework/core/{test/fixtures => testfixture}/codec/AbstractEncoderTests.java (98%) rename spring-core/src/testFixtures/java/org/springframework/core/{test/fixtures => testfixture}/env/EnvironmentTestUtils.java (98%) rename spring-core/src/testFixtures/java/org/springframework/core/{test/fixtures => testfixture}/env/MockPropertySource.java (98%) rename spring-core/src/testFixtures/java/org/springframework/core/{test/fixtures => testfixture}/io/ResourceTestUtils.java (96%) rename spring-core/src/testFixtures/java/org/springframework/core/{test/fixtures => testfixture}/io/SerializationTestUtils.java (97%) rename spring-core/src/testFixtures/java/org/springframework/core/{test/fixtures => testfixture}/io/buffer/AbstractDataBufferAllocatingTests.java (97%) rename spring-core/src/testFixtures/java/org/springframework/core/{test/fixtures => testfixture}/io/buffer/AbstractLeakCheckingTests.java (96%) rename spring-core/src/testFixtures/java/org/springframework/core/{test/fixtures => testfixture}/io/buffer/DataBufferTestUtils.java (97%) rename spring-core/src/testFixtures/java/org/springframework/core/{test/fixtures => testfixture}/io/buffer/LeakAwareDataBuffer.java (98%) rename spring-core/src/testFixtures/java/org/springframework/core/{test/fixtures => testfixture}/io/buffer/LeakAwareDataBufferFactory.java (98%) rename spring-core/src/testFixtures/java/org/springframework/core/{test/fixtures => testfixture}/stereotype/Component.java (95%) rename spring-core/src/testFixtures/java/org/springframework/core/{test/fixtures => testfixture}/stereotype/Indexed.java (94%) rename spring-core/src/testFixtures/java/org/springframework/core/{test/fixtures => testfixture}/xml/XmlContent.java (96%) rename spring-core/src/testFixtures/java/org/springframework/core/{test/fixtures => testfixture}/xml/XmlContentAssert.java (97%) diff --git a/integration-tests/src/test/java/org/springframework/aop/config/AopNamespaceHandlerScopeIntegrationTests.java b/integration-tests/src/test/java/org/springframework/aop/config/AopNamespaceHandlerScopeIntegrationTests.java index c2a265443ab..b20012250c7 100644 --- a/integration-tests/src/test/java/org/springframework/aop/config/AopNamespaceHandlerScopeIntegrationTests.java +++ b/integration-tests/src/test/java/org/springframework/aop/config/AopNamespaceHandlerScopeIntegrationTests.java @@ -23,7 +23,7 @@ import org.springframework.aop.support.AopUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.test.fixtures.beans.ITestBean; import org.springframework.beans.test.fixtures.beans.TestBean; -import org.springframework.core.test.fixtures.io.SerializationTestUtils; +import org.springframework.core.testfixture.io.SerializationTestUtils; import org.springframework.mock.web.MockHttpServletRequest; import org.springframework.mock.web.MockHttpSession; import org.springframework.test.context.junit.jupiter.web.SpringJUnitWebConfig; diff --git a/integration-tests/src/test/java/org/springframework/scheduling/annotation/ScheduledAndTransactionalAnnotationIntegrationTests.java b/integration-tests/src/test/java/org/springframework/scheduling/annotation/ScheduledAndTransactionalAnnotationIntegrationTests.java index 77f1145de82..af771522f82 100644 --- a/integration-tests/src/test/java/org/springframework/scheduling/annotation/ScheduledAndTransactionalAnnotationIntegrationTests.java +++ b/integration-tests/src/test/java/org/springframework/scheduling/annotation/ScheduledAndTransactionalAnnotationIntegrationTests.java @@ -28,7 +28,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.AnnotationConfigApplicationContext; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; -import org.springframework.core.test.fixtures.EnabledForTestGroups; +import org.springframework.core.testfixture.EnabledForTestGroups; import org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor; import org.springframework.dao.support.PersistenceExceptionTranslator; import org.springframework.stereotype.Repository; @@ -40,7 +40,7 @@ import org.springframework.transaction.annotation.Transactional; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; import static org.mockito.Mockito.mock; -import static org.springframework.core.test.fixtures.TestGroup.PERFORMANCE; +import static org.springframework.core.testfixture.TestGroup.PERFORMANCE; /** * Integration tests cornering bug SPR-8651, which revealed that @Scheduled methods may diff --git a/spring-aop/src/test/java/org/springframework/aop/aspectj/annotation/AspectProxyFactoryTests.java b/spring-aop/src/test/java/org/springframework/aop/aspectj/annotation/AspectProxyFactoryTests.java index e445598dd28..d048e6e0d18 100644 --- a/spring-aop/src/test/java/org/springframework/aop/aspectj/annotation/AspectProxyFactoryTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/aspectj/annotation/AspectProxyFactoryTests.java @@ -26,7 +26,7 @@ import org.aspectj.lang.annotation.Aspect; import org.junit.jupiter.api.Test; import test.aop.PerThisAspect; -import org.springframework.core.test.fixtures.io.SerializationTestUtils; +import org.springframework.core.testfixture.io.SerializationTestUtils; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException; diff --git a/spring-aop/src/test/java/org/springframework/aop/config/AopNamespaceHandlerEventTests.java b/spring-aop/src/test/java/org/springframework/aop/config/AopNamespaceHandlerEventTests.java index 2896114e7bb..c9d752c1699 100644 --- a/spring-aop/src/test/java/org/springframework/aop/config/AopNamespaceHandlerEventTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/config/AopNamespaceHandlerEventTests.java @@ -33,7 +33,7 @@ import org.springframework.beans.test.fixtures.beans.CollectingReaderEventListen import org.springframework.core.io.Resource; import static org.assertj.core.api.Assertions.assertThat; -import static org.springframework.core.test.fixtures.io.ResourceTestUtils.qualifiedResource; +import static org.springframework.core.testfixture.io.ResourceTestUtils.qualifiedResource; /** * @author Rob Harrop diff --git a/spring-aop/src/test/java/org/springframework/aop/config/AopNamespaceHandlerPointcutErrorTests.java b/spring-aop/src/test/java/org/springframework/aop/config/AopNamespaceHandlerPointcutErrorTests.java index 67cc99823d7..6a01b03ad7b 100644 --- a/spring-aop/src/test/java/org/springframework/aop/config/AopNamespaceHandlerPointcutErrorTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/config/AopNamespaceHandlerPointcutErrorTests.java @@ -24,7 +24,7 @@ import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; -import static org.springframework.core.test.fixtures.io.ResourceTestUtils.qualifiedResource; +import static org.springframework.core.testfixture.io.ResourceTestUtils.qualifiedResource; /** * @author Mark Fisher diff --git a/spring-aop/src/test/java/org/springframework/aop/config/TopLevelAopTagTests.java b/spring-aop/src/test/java/org/springframework/aop/config/TopLevelAopTagTests.java index c8e21cb8c40..f1ab7f273db 100644 --- a/spring-aop/src/test/java/org/springframework/aop/config/TopLevelAopTagTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/config/TopLevelAopTagTests.java @@ -22,7 +22,7 @@ import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; import static org.assertj.core.api.Assertions.assertThat; -import static org.springframework.core.test.fixtures.io.ResourceTestUtils.qualifiedResource; +import static org.springframework.core.testfixture.io.ResourceTestUtils.qualifiedResource; /** * Tests that the <aop:config/> element can be used as a top level element. diff --git a/spring-aop/src/test/java/org/springframework/aop/framework/PrototypeTargetTests.java b/spring-aop/src/test/java/org/springframework/aop/framework/PrototypeTargetTests.java index dd99d98d647..d58a9b594a1 100644 --- a/spring-aop/src/test/java/org/springframework/aop/framework/PrototypeTargetTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/framework/PrototypeTargetTests.java @@ -25,7 +25,7 @@ import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; import org.springframework.core.io.Resource; import static org.assertj.core.api.Assertions.assertThat; -import static org.springframework.core.test.fixtures.io.ResourceTestUtils.qualifiedResource; +import static org.springframework.core.testfixture.io.ResourceTestUtils.qualifiedResource; /** * @author Juergen Hoeller diff --git a/spring-aop/src/test/java/org/springframework/aop/framework/ProxyFactoryTests.java b/spring-aop/src/test/java/org/springframework/aop/framework/ProxyFactoryTests.java index 9ba9c837dd5..39b93fe473c 100644 --- a/spring-aop/src/test/java/org/springframework/aop/framework/ProxyFactoryTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/framework/ProxyFactoryTests.java @@ -39,7 +39,7 @@ import org.springframework.beans.test.fixtures.beans.ITestBean; import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.core.annotation.AnnotationAwareOrderComparator; import org.springframework.core.annotation.Order; -import org.springframework.core.test.fixtures.TimeStamped; +import org.springframework.core.testfixture.TimeStamped; import org.springframework.tests.aop.advice.CountingBeforeAdvice; import org.springframework.tests.aop.interceptor.NopInterceptor; diff --git a/spring-aop/src/test/java/org/springframework/aop/interceptor/ConcurrencyThrottleInterceptorTests.java b/spring-aop/src/test/java/org/springframework/aop/interceptor/ConcurrencyThrottleInterceptorTests.java index e50ebf8dc2e..f06491d000b 100644 --- a/spring-aop/src/test/java/org/springframework/aop/interceptor/ConcurrencyThrottleInterceptorTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/interceptor/ConcurrencyThrottleInterceptorTests.java @@ -25,7 +25,7 @@ import org.springframework.aop.framework.ProxyFactory; import org.springframework.beans.test.fixtures.beans.DerivedTestBean; import org.springframework.beans.test.fixtures.beans.ITestBean; import org.springframework.beans.test.fixtures.beans.TestBean; -import org.springframework.core.test.fixtures.io.SerializationTestUtils; +import org.springframework.core.testfixture.io.SerializationTestUtils; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-aop/src/test/java/org/springframework/aop/interceptor/ExposeInvocationInterceptorTests.java b/spring-aop/src/test/java/org/springframework/aop/interceptor/ExposeInvocationInterceptorTests.java index 2c0d1f1e379..e9f6a3f0cb8 100644 --- a/spring-aop/src/test/java/org/springframework/aop/interceptor/ExposeInvocationInterceptorTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/interceptor/ExposeInvocationInterceptorTests.java @@ -25,7 +25,7 @@ import org.springframework.beans.test.fixtures.beans.ITestBean; import org.springframework.beans.test.fixtures.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; -import static org.springframework.core.test.fixtures.io.ResourceTestUtils.qualifiedResource; +import static org.springframework.core.testfixture.io.ResourceTestUtils.qualifiedResource; /** * Non-XML tests are in AbstractAopProxyTests diff --git a/spring-aop/src/test/java/org/springframework/aop/scope/ScopedProxyAutowireTests.java b/spring-aop/src/test/java/org/springframework/aop/scope/ScopedProxyAutowireTests.java index 7c09bbb7c5a..a746532495b 100644 --- a/spring-aop/src/test/java/org/springframework/aop/scope/ScopedProxyAutowireTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/scope/ScopedProxyAutowireTests.java @@ -24,7 +24,7 @@ import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; import static org.assertj.core.api.Assertions.assertThat; -import static org.springframework.core.test.fixtures.io.ResourceTestUtils.qualifiedResource; +import static org.springframework.core.testfixture.io.ResourceTestUtils.qualifiedResource; /** * @author Mark Fisher diff --git a/spring-aop/src/test/java/org/springframework/aop/support/AbstractRegexpMethodPointcutTests.java b/spring-aop/src/test/java/org/springframework/aop/support/AbstractRegexpMethodPointcutTests.java index e4358b3883b..880757dcbf9 100644 --- a/spring-aop/src/test/java/org/springframework/aop/support/AbstractRegexpMethodPointcutTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/support/AbstractRegexpMethodPointcutTests.java @@ -22,7 +22,7 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.springframework.beans.test.fixtures.beans.TestBean; -import org.springframework.core.test.fixtures.io.SerializationTestUtils; +import org.springframework.core.testfixture.io.SerializationTestUtils; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-aop/src/test/java/org/springframework/aop/support/AopUtilsTests.java b/spring-aop/src/test/java/org/springframework/aop/support/AopUtilsTests.java index bf98f8ac491..cf1e22c356b 100644 --- a/spring-aop/src/test/java/org/springframework/aop/support/AopUtilsTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/support/AopUtilsTests.java @@ -26,7 +26,7 @@ import org.springframework.aop.Pointcut; import org.springframework.aop.interceptor.ExposeInvocationInterceptor; import org.springframework.aop.target.EmptyTargetSource; import org.springframework.beans.test.fixtures.beans.TestBean; -import org.springframework.core.test.fixtures.io.SerializationTestUtils; +import org.springframework.core.testfixture.io.SerializationTestUtils; import org.springframework.lang.Nullable; import org.springframework.tests.aop.interceptor.NopInterceptor; diff --git a/spring-aop/src/test/java/org/springframework/aop/support/DelegatingIntroductionInterceptorTests.java b/spring-aop/src/test/java/org/springframework/aop/support/DelegatingIntroductionInterceptorTests.java index 21f0b04e05a..9cb1a04934b 100644 --- a/spring-aop/src/test/java/org/springframework/aop/support/DelegatingIntroductionInterceptorTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/support/DelegatingIntroductionInterceptorTests.java @@ -30,8 +30,8 @@ import org.springframework.beans.test.fixtures.beans.NestedTestBean; import org.springframework.beans.test.fixtures.beans.Person; import org.springframework.beans.test.fixtures.beans.SerializablePerson; import org.springframework.beans.test.fixtures.beans.TestBean; -import org.springframework.core.test.fixtures.TimeStamped; -import org.springframework.core.test.fixtures.io.SerializationTestUtils; +import org.springframework.core.testfixture.TimeStamped; +import org.springframework.core.testfixture.io.SerializationTestUtils; import org.springframework.tests.aop.interceptor.SerializableNopInterceptor; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-aop/src/test/java/org/springframework/aop/support/MethodMatchersTests.java b/spring-aop/src/test/java/org/springframework/aop/support/MethodMatchersTests.java index 206a2e87118..df7b67dfaf2 100644 --- a/spring-aop/src/test/java/org/springframework/aop/support/MethodMatchersTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/support/MethodMatchersTests.java @@ -24,7 +24,7 @@ import org.springframework.aop.MethodMatcher; import org.springframework.beans.test.fixtures.beans.IOther; import org.springframework.beans.test.fixtures.beans.ITestBean; import org.springframework.beans.test.fixtures.beans.TestBean; -import org.springframework.core.test.fixtures.io.SerializationTestUtils; +import org.springframework.core.testfixture.io.SerializationTestUtils; import org.springframework.lang.Nullable; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-aop/src/test/java/org/springframework/aop/support/NameMatchMethodPointcutTests.java b/spring-aop/src/test/java/org/springframework/aop/support/NameMatchMethodPointcutTests.java index 0e921e05862..8a9f1ec1e3e 100644 --- a/spring-aop/src/test/java/org/springframework/aop/support/NameMatchMethodPointcutTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/support/NameMatchMethodPointcutTests.java @@ -23,7 +23,7 @@ import org.springframework.aop.framework.Advised; import org.springframework.aop.framework.ProxyFactory; import org.springframework.beans.test.fixtures.beans.Person; import org.springframework.beans.test.fixtures.beans.SerializablePerson; -import org.springframework.core.test.fixtures.io.SerializationTestUtils; +import org.springframework.core.testfixture.io.SerializationTestUtils; import org.springframework.tests.aop.interceptor.NopInterceptor; import org.springframework.tests.aop.interceptor.SerializableNopInterceptor; diff --git a/spring-aop/src/test/java/org/springframework/aop/support/RegexpMethodPointcutAdvisorIntegrationTests.java b/spring-aop/src/test/java/org/springframework/aop/support/RegexpMethodPointcutAdvisorIntegrationTests.java index 62d1d1e5a87..1782124f278 100644 --- a/spring-aop/src/test/java/org/springframework/aop/support/RegexpMethodPointcutAdvisorIntegrationTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/support/RegexpMethodPointcutAdvisorIntegrationTests.java @@ -25,12 +25,12 @@ import org.springframework.beans.test.fixtures.beans.ITestBean; import org.springframework.beans.test.fixtures.beans.Person; import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.core.io.Resource; -import org.springframework.core.test.fixtures.io.SerializationTestUtils; +import org.springframework.core.testfixture.io.SerializationTestUtils; import org.springframework.tests.aop.interceptor.NopInterceptor; import org.springframework.tests.aop.interceptor.SerializableNopInterceptor; import static org.assertj.core.api.Assertions.assertThat; -import static org.springframework.core.test.fixtures.io.ResourceTestUtils.qualifiedResource; +import static org.springframework.core.testfixture.io.ResourceTestUtils.qualifiedResource; /** * @author Rod Johnson diff --git a/spring-aop/src/test/java/org/springframework/aop/target/CommonsPool2TargetSourceProxyTests.java b/spring-aop/src/test/java/org/springframework/aop/target/CommonsPool2TargetSourceProxyTests.java index 9ddd2a53e07..609f159a9da 100644 --- a/spring-aop/src/test/java/org/springframework/aop/target/CommonsPool2TargetSourceProxyTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/target/CommonsPool2TargetSourceProxyTests.java @@ -25,7 +25,7 @@ import org.springframework.beans.test.fixtures.beans.ITestBean; import org.springframework.core.io.Resource; import static org.assertj.core.api.Assertions.assertThat; -import static org.springframework.core.test.fixtures.io.ResourceTestUtils.qualifiedResource; +import static org.springframework.core.testfixture.io.ResourceTestUtils.qualifiedResource; /** * @author Stephane Nicoll diff --git a/spring-aop/src/test/java/org/springframework/aop/target/HotSwappableTargetSourceTests.java b/spring-aop/src/test/java/org/springframework/aop/target/HotSwappableTargetSourceTests.java index 85396507092..d48d213f8d2 100644 --- a/spring-aop/src/test/java/org/springframework/aop/target/HotSwappableTargetSourceTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/target/HotSwappableTargetSourceTests.java @@ -28,12 +28,12 @@ import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; import org.springframework.beans.test.fixtures.beans.Person; import org.springframework.beans.test.fixtures.beans.SerializablePerson; import org.springframework.beans.test.fixtures.beans.SideEffectBean; -import org.springframework.core.test.fixtures.io.SerializationTestUtils; +import org.springframework.core.testfixture.io.SerializationTestUtils; import org.springframework.tests.aop.interceptor.SerializableNopInterceptor; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException; -import static org.springframework.core.test.fixtures.io.ResourceTestUtils.qualifiedResource; +import static org.springframework.core.testfixture.io.ResourceTestUtils.qualifiedResource; /** * @author Rod Johnson diff --git a/spring-aop/src/test/java/org/springframework/aop/target/LazyInitTargetSourceTests.java b/spring-aop/src/test/java/org/springframework/aop/target/LazyInitTargetSourceTests.java index 8f1ffc90be8..3a727692181 100644 --- a/spring-aop/src/test/java/org/springframework/aop/target/LazyInitTargetSourceTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/target/LazyInitTargetSourceTests.java @@ -26,7 +26,7 @@ import org.springframework.beans.test.fixtures.beans.ITestBean; import org.springframework.core.io.Resource; import static org.assertj.core.api.Assertions.assertThat; -import static org.springframework.core.test.fixtures.io.ResourceTestUtils.qualifiedResource; +import static org.springframework.core.testfixture.io.ResourceTestUtils.qualifiedResource; /** * @author Juergen Hoeller diff --git a/spring-aop/src/test/java/org/springframework/aop/target/PrototypeBasedTargetSourceTests.java b/spring-aop/src/test/java/org/springframework/aop/target/PrototypeBasedTargetSourceTests.java index c1eaa77ea39..dc3da8eff31 100644 --- a/spring-aop/src/test/java/org/springframework/aop/target/PrototypeBasedTargetSourceTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/target/PrototypeBasedTargetSourceTests.java @@ -25,7 +25,7 @@ import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.support.RootBeanDefinition; import org.springframework.beans.test.fixtures.beans.SerializablePerson; import org.springframework.beans.test.fixtures.beans.TestBean; -import org.springframework.core.test.fixtures.io.SerializationTestUtils; +import org.springframework.core.testfixture.io.SerializationTestUtils; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-aop/src/test/java/org/springframework/aop/target/PrototypeTargetSourceTests.java b/spring-aop/src/test/java/org/springframework/aop/target/PrototypeTargetSourceTests.java index 04a3c695f6e..4be4d16b5a3 100644 --- a/spring-aop/src/test/java/org/springframework/aop/target/PrototypeTargetSourceTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/target/PrototypeTargetSourceTests.java @@ -24,7 +24,7 @@ import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; import org.springframework.beans.test.fixtures.beans.SideEffectBean; import static org.assertj.core.api.Assertions.assertThat; -import static org.springframework.core.test.fixtures.io.ResourceTestUtils.qualifiedResource; +import static org.springframework.core.testfixture.io.ResourceTestUtils.qualifiedResource; /** * @author Rod Johnson diff --git a/spring-aop/src/test/java/org/springframework/aop/target/ThreadLocalTargetSourceTests.java b/spring-aop/src/test/java/org/springframework/aop/target/ThreadLocalTargetSourceTests.java index 4170e6402f3..9cfa6d4848b 100644 --- a/spring-aop/src/test/java/org/springframework/aop/target/ThreadLocalTargetSourceTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/target/ThreadLocalTargetSourceTests.java @@ -25,7 +25,7 @@ import org.springframework.beans.test.fixtures.beans.ITestBean; import org.springframework.beans.test.fixtures.beans.SideEffectBean; import static org.assertj.core.api.Assertions.assertThat; -import static org.springframework.core.test.fixtures.io.ResourceTestUtils.qualifiedResource; +import static org.springframework.core.testfixture.io.ResourceTestUtils.qualifiedResource; /** * @author Rod Johnson diff --git a/spring-aop/src/test/java/org/springframework/aop/target/dynamic/RefreshableTargetSourceTests.java b/spring-aop/src/test/java/org/springframework/aop/target/dynamic/RefreshableTargetSourceTests.java index 23c1c56f048..ac33fd950ad 100644 --- a/spring-aop/src/test/java/org/springframework/aop/target/dynamic/RefreshableTargetSourceTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/target/dynamic/RefreshableTargetSourceTests.java @@ -18,10 +18,10 @@ package org.springframework.aop.target.dynamic; import org.junit.jupiter.api.Test; -import org.springframework.core.test.fixtures.EnabledForTestGroups; +import org.springframework.core.testfixture.EnabledForTestGroups; import static org.assertj.core.api.Assertions.assertThat; -import static org.springframework.core.test.fixtures.TestGroup.PERFORMANCE; +import static org.springframework.core.testfixture.TestGroup.PERFORMANCE; /** * @author Rob Harrop diff --git a/spring-aop/src/test/java/org/springframework/tests/aop/interceptor/TimestampIntroductionInterceptor.java b/spring-aop/src/test/java/org/springframework/tests/aop/interceptor/TimestampIntroductionInterceptor.java index 41e79f3e5c9..dc04a9fba9d 100644 --- a/spring-aop/src/test/java/org/springframework/tests/aop/interceptor/TimestampIntroductionInterceptor.java +++ b/spring-aop/src/test/java/org/springframework/tests/aop/interceptor/TimestampIntroductionInterceptor.java @@ -17,7 +17,7 @@ package org.springframework.tests.aop.interceptor; import org.springframework.aop.support.DelegatingIntroductionInterceptor; -import org.springframework.core.test.fixtures.TimeStamped; +import org.springframework.core.testfixture.TimeStamped; @SuppressWarnings("serial") public class TimestampIntroductionInterceptor extends DelegatingIntroductionInterceptor diff --git a/spring-aspects/src/test/java/org/springframework/scheduling/aspectj/AnnotationAsyncExecutionAspectTests.java b/spring-aspects/src/test/java/org/springframework/scheduling/aspectj/AnnotationAsyncExecutionAspectTests.java index 940c3e044b2..2f7ad0f5b6f 100644 --- a/spring-aspects/src/test/java/org/springframework/scheduling/aspectj/AnnotationAsyncExecutionAspectTests.java +++ b/spring-aspects/src/test/java/org/springframework/scheduling/aspectj/AnnotationAsyncExecutionAspectTests.java @@ -30,7 +30,7 @@ import org.springframework.aop.interceptor.SimpleAsyncUncaughtExceptionHandler; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.support.RootBeanDefinition; import org.springframework.core.task.SimpleAsyncTaskExecutor; -import org.springframework.core.test.fixtures.EnabledForTestGroups; +import org.springframework.core.testfixture.EnabledForTestGroups; import org.springframework.scheduling.annotation.Async; import org.springframework.scheduling.annotation.AsyncResult; import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; @@ -38,7 +38,7 @@ import org.springframework.util.ReflectionUtils; import org.springframework.util.concurrent.ListenableFuture; import static org.assertj.core.api.Assertions.assertThat; -import static org.springframework.core.test.fixtures.TestGroup.PERFORMANCE; +import static org.springframework.core.testfixture.TestGroup.PERFORMANCE; /** * Unit tests for {@link AnnotationAsyncExecutionAspect}. diff --git a/spring-beans/src/test/java/org/springframework/beans/AbstractPropertyAccessorTests.java b/spring-beans/src/test/java/org/springframework/beans/AbstractPropertyAccessorTests.java index 156df6d2802..0b41d64982e 100644 --- a/spring-beans/src/test/java/org/springframework/beans/AbstractPropertyAccessorTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/AbstractPropertyAccessorTests.java @@ -52,8 +52,8 @@ import org.springframework.core.convert.ConversionFailedException; import org.springframework.core.convert.TypeDescriptor; import org.springframework.core.convert.support.DefaultConversionService; import org.springframework.core.convert.support.GenericConversionService; -import org.springframework.core.test.fixtures.Assume; -import org.springframework.core.test.fixtures.EnabledForTestGroups; +import org.springframework.core.testfixture.Assume; +import org.springframework.core.testfixture.EnabledForTestGroups; import org.springframework.lang.Nullable; import org.springframework.util.StopWatch; import org.springframework.util.StringUtils; @@ -62,7 +62,7 @@ import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException; import static org.assertj.core.api.Assertions.within; -import static org.springframework.core.test.fixtures.TestGroup.PERFORMANCE; +import static org.springframework.core.testfixture.TestGroup.PERFORMANCE; /** * Shared tests for property accessors. diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/BeanFactoryUtilsTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/BeanFactoryUtilsTests.java index 2fc77072a28..dc214a2a425 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/BeanFactoryUtilsTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/BeanFactoryUtilsTests.java @@ -37,7 +37,7 @@ import org.springframework.core.io.Resource; import org.springframework.util.ObjectUtils; import static org.assertj.core.api.Assertions.assertThat; -import static org.springframework.core.test.fixtures.io.ResourceTestUtils.qualifiedResource; +import static org.springframework.core.testfixture.io.ResourceTestUtils.qualifiedResource; /** * @author Rod Johnson diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/ConcurrentBeanFactoryTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/ConcurrentBeanFactoryTests.java index 2587d05e4e6..2e4857b4ccd 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/ConcurrentBeanFactoryTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/ConcurrentBeanFactoryTests.java @@ -33,11 +33,11 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; import org.springframework.beans.propertyeditors.CustomDateEditor; -import org.springframework.core.test.fixtures.EnabledForTestGroups; -import org.springframework.core.test.fixtures.TestGroup; +import org.springframework.core.testfixture.EnabledForTestGroups; +import org.springframework.core.testfixture.TestGroup; import static org.assertj.core.api.Assertions.assertThat; -import static org.springframework.core.test.fixtures.io.ResourceTestUtils.qualifiedResource; +import static org.springframework.core.testfixture.io.ResourceTestUtils.qualifiedResource; /** * @author Guillaume Poirier diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/DefaultListableBeanFactoryTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/DefaultListableBeanFactoryTests.java index 6d50c6e1df6..da710e31a58 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/DefaultListableBeanFactoryTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/DefaultListableBeanFactoryTests.java @@ -94,10 +94,10 @@ import org.springframework.core.convert.support.DefaultConversionService; import org.springframework.core.convert.support.GenericConversionService; import org.springframework.core.io.Resource; import org.springframework.core.io.UrlResource; -import org.springframework.core.test.fixtures.Assume; -import org.springframework.core.test.fixtures.EnabledForTestGroups; -import org.springframework.core.test.fixtures.TestGroup; -import org.springframework.core.test.fixtures.io.SerializationTestUtils; +import org.springframework.core.testfixture.Assume; +import org.springframework.core.testfixture.EnabledForTestGroups; +import org.springframework.core.testfixture.TestGroup; +import org.springframework.core.testfixture.io.SerializationTestUtils; import org.springframework.lang.Nullable; import org.springframework.util.StopWatch; import org.springframework.util.StringValueResolver; diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/FactoryBeanTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/FactoryBeanTests.java index 427161efb3b..1e466c6da35 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/FactoryBeanTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/FactoryBeanTests.java @@ -27,11 +27,11 @@ import org.springframework.beans.factory.config.BeanPostProcessor; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; import org.springframework.core.io.Resource; -import org.springframework.core.test.fixtures.stereotype.Component; +import org.springframework.core.testfixture.stereotype.Component; import org.springframework.util.Assert; import static org.assertj.core.api.Assertions.assertThat; -import static org.springframework.core.test.fixtures.io.ResourceTestUtils.qualifiedResource; +import static org.springframework.core.testfixture.io.ResourceTestUtils.qualifiedResource; /** * @author Rob Harrop diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/annotation/AutowiredAnnotationBeanPostProcessorTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/annotation/AutowiredAnnotationBeanPostProcessorTests.java index e7e79b6b3e5..87dcbe72d31 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/annotation/AutowiredAnnotationBeanPostProcessorTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/annotation/AutowiredAnnotationBeanPostProcessorTests.java @@ -72,7 +72,7 @@ import org.springframework.core.Ordered; import org.springframework.core.ResolvableType; import org.springframework.core.annotation.AnnotationAwareOrderComparator; import org.springframework.core.annotation.Order; -import org.springframework.core.test.fixtures.io.SerializationTestUtils; +import org.springframework.core.testfixture.io.SerializationTestUtils; import org.springframework.util.ReflectionUtils; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/annotation/CustomAutowireConfigurerTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/annotation/CustomAutowireConfigurerTests.java index 259132d5ff9..02a87f6c0d4 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/annotation/CustomAutowireConfigurerTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/annotation/CustomAutowireConfigurerTests.java @@ -25,7 +25,7 @@ import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; import static org.assertj.core.api.Assertions.assertThat; -import static org.springframework.core.test.fixtures.io.ResourceTestUtils.qualifiedResource; +import static org.springframework.core.testfixture.io.ResourceTestUtils.qualifiedResource; /** * Unit tests for {@link CustomAutowireConfigurer}. diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/annotation/InjectAnnotationBeanPostProcessorTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/annotation/InjectAnnotationBeanPostProcessorTests.java index d6cd527c74e..a90d044209a 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/annotation/InjectAnnotationBeanPostProcessorTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/annotation/InjectAnnotationBeanPostProcessorTests.java @@ -44,7 +44,7 @@ import org.springframework.beans.test.fixtures.beans.ITestBean; import org.springframework.beans.test.fixtures.beans.IndexedTestBean; import org.springframework.beans.test.fixtures.beans.NestedTestBean; import org.springframework.beans.test.fixtures.beans.TestBean; -import org.springframework.core.test.fixtures.io.SerializationTestUtils; +import org.springframework.core.testfixture.io.SerializationTestUtils; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/config/FieldRetrievingFactoryBeanTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/config/FieldRetrievingFactoryBeanTests.java index e9241a8353b..38ad12dc7eb 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/config/FieldRetrievingFactoryBeanTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/config/FieldRetrievingFactoryBeanTests.java @@ -25,7 +25,7 @@ import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; import org.springframework.beans.test.fixtures.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; -import static org.springframework.core.test.fixtures.io.ResourceTestUtils.qualifiedResource; +import static org.springframework.core.testfixture.io.ResourceTestUtils.qualifiedResource; /** * Unit tests for {@link FieldRetrievingFactoryBean}. diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/config/ObjectFactoryCreatingFactoryBeanTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/config/ObjectFactoryCreatingFactoryBeanTests.java index d045f1d9619..97805143da8 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/config/ObjectFactoryCreatingFactoryBeanTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/config/ObjectFactoryCreatingFactoryBeanTests.java @@ -28,13 +28,13 @@ import org.springframework.beans.factory.BeanFactory; import org.springframework.beans.factory.ObjectFactory; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; -import org.springframework.core.test.fixtures.io.SerializationTestUtils; +import org.springframework.core.testfixture.io.SerializationTestUtils; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException; import static org.mockito.BDDMockito.given; import static org.mockito.Mockito.mock; -import static org.springframework.core.test.fixtures.io.ResourceTestUtils.qualifiedResource; +import static org.springframework.core.testfixture.io.ResourceTestUtils.qualifiedResource; /** * @author Colin Sampaleanu diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/config/PropertiesFactoryBeanTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/config/PropertiesFactoryBeanTests.java index cdd9778c134..27a00cb5c47 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/config/PropertiesFactoryBeanTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/config/PropertiesFactoryBeanTests.java @@ -23,7 +23,7 @@ import org.junit.jupiter.api.Test; import org.springframework.core.io.Resource; import static org.assertj.core.api.Assertions.assertThat; -import static org.springframework.core.test.fixtures.io.ResourceTestUtils.qualifiedResource; +import static org.springframework.core.testfixture.io.ResourceTestUtils.qualifiedResource; /** * Unit tests for {@link PropertiesFactoryBean}. diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/config/PropertyPathFactoryBeanTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/config/PropertyPathFactoryBeanTests.java index 1dc74c7115a..dd256ece36a 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/config/PropertyPathFactoryBeanTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/config/PropertyPathFactoryBeanTests.java @@ -25,7 +25,7 @@ import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.core.io.Resource; import static org.assertj.core.api.Assertions.assertThat; -import static org.springframework.core.test.fixtures.io.ResourceTestUtils.qualifiedResource; +import static org.springframework.core.testfixture.io.ResourceTestUtils.qualifiedResource; /** * Unit tests for {@link PropertyPathFactoryBean}. diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/config/PropertyResourceConfigurerTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/config/PropertyResourceConfigurerTests.java index f48ec3470c2..c85944480a1 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/config/PropertyResourceConfigurerTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/config/PropertyResourceConfigurerTests.java @@ -47,7 +47,7 @@ import org.springframework.util.StringUtils; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; import static org.springframework.beans.factory.support.BeanDefinitionBuilder.genericBeanDefinition; -import static org.springframework.core.test.fixtures.io.ResourceTestUtils.qualifiedResource; +import static org.springframework.core.testfixture.io.ResourceTestUtils.qualifiedResource; /** * Unit tests for various {@link PropertyResourceConfigurer} implementations including: diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/config/SimpleScopeTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/config/SimpleScopeTests.java index 6bfc37ad922..a123a5721b8 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/config/SimpleScopeTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/config/SimpleScopeTests.java @@ -28,7 +28,7 @@ import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; import org.springframework.beans.test.fixtures.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; -import static org.springframework.core.test.fixtures.io.ResourceTestUtils.qualifiedResource; +import static org.springframework.core.testfixture.io.ResourceTestUtils.qualifiedResource; /** * Simple test to illustrate and verify scope usage. diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/parsing/CustomProblemReporterTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/parsing/CustomProblemReporterTests.java index 40b07c0b628..feb10d03633 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/parsing/CustomProblemReporterTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/parsing/CustomProblemReporterTests.java @@ -27,7 +27,7 @@ import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; import org.springframework.beans.test.fixtures.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; -import static org.springframework.core.test.fixtures.io.ResourceTestUtils.qualifiedResource; +import static org.springframework.core.testfixture.io.ResourceTestUtils.qualifiedResource; /** * @author Rob Harrop diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/support/BeanFactoryGenericsTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/support/BeanFactoryGenericsTests.java index 311b8708890..de938f38b74 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/support/BeanFactoryGenericsTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/support/BeanFactoryGenericsTests.java @@ -53,11 +53,11 @@ import org.springframework.core.annotation.AnnotationAwareOrderComparator; import org.springframework.core.annotation.Order; import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.UrlResource; -import org.springframework.core.test.fixtures.EnabledForTestGroups; +import org.springframework.core.testfixture.EnabledForTestGroups; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; -import static org.springframework.core.test.fixtures.TestGroup.LONG_RUNNING; +import static org.springframework.core.testfixture.TestGroup.LONG_RUNNING; /** * @author Juergen Hoeller diff --git a/spring-context-support/src/test/java/org/springframework/cache/ehcache/EhCacheCacheTests.java b/spring-context-support/src/test/java/org/springframework/cache/ehcache/EhCacheCacheTests.java index e5a548cacd2..eff54703337 100644 --- a/spring-context-support/src/test/java/org/springframework/cache/ehcache/EhCacheCacheTests.java +++ b/spring-context-support/src/test/java/org/springframework/cache/ehcache/EhCacheCacheTests.java @@ -26,10 +26,10 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.springframework.context.test.fixtures.cache.AbstractCacheTests; -import org.springframework.core.test.fixtures.EnabledForTestGroups; +import org.springframework.core.testfixture.EnabledForTestGroups; import static org.assertj.core.api.Assertions.assertThat; -import static org.springframework.core.test.fixtures.TestGroup.LONG_RUNNING; +import static org.springframework.core.testfixture.TestGroup.LONG_RUNNING; /** * @author Costin Leau diff --git a/spring-context-support/src/test/java/org/springframework/scheduling/quartz/QuartzSupportTests.java b/spring-context-support/src/test/java/org/springframework/scheduling/quartz/QuartzSupportTests.java index c6b4efeff83..d8e4506c516 100644 --- a/spring-context-support/src/test/java/org/springframework/scheduling/quartz/QuartzSupportTests.java +++ b/spring-context-support/src/test/java/org/springframework/scheduling/quartz/QuartzSupportTests.java @@ -38,7 +38,7 @@ import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.context.support.ClassPathXmlApplicationContext; import org.springframework.context.support.StaticApplicationContext; import org.springframework.core.task.TaskExecutor; -import org.springframework.core.test.fixtures.EnabledForTestGroups; +import org.springframework.core.testfixture.EnabledForTestGroups; import org.springframework.jdbc.core.JdbcTemplate; import static org.assertj.core.api.Assertions.assertThat; @@ -46,7 +46,7 @@ import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException import static org.mockito.BDDMockito.given; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; -import static org.springframework.core.test.fixtures.TestGroup.PERFORMANCE; +import static org.springframework.core.testfixture.TestGroup.PERFORMANCE; /** * @author Juergen Hoeller diff --git a/spring-context-support/src/test/java/org/springframework/validation/beanvalidation2/SpringValidatorAdapterTests.java b/spring-context-support/src/test/java/org/springframework/validation/beanvalidation2/SpringValidatorAdapterTests.java index deb14733357..99f9d412910 100644 --- a/spring-context-support/src/test/java/org/springframework/validation/beanvalidation2/SpringValidatorAdapterTests.java +++ b/spring-context-support/src/test/java/org/springframework/validation/beanvalidation2/SpringValidatorAdapterTests.java @@ -52,7 +52,7 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.BeanWrapper; import org.springframework.beans.BeanWrapperImpl; import org.springframework.context.support.StaticMessageSource; -import org.springframework.core.test.fixtures.io.SerializationTestUtils; +import org.springframework.core.testfixture.io.SerializationTestUtils; import org.springframework.util.ObjectUtils; import org.springframework.validation.BeanPropertyBindingResult; import org.springframework.validation.FieldError; diff --git a/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests.java b/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests.java index fee1f223aeb..b93e6448046 100644 --- a/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests.java +++ b/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests.java @@ -54,9 +54,9 @@ import org.springframework.core.NestedRuntimeException; import org.springframework.core.Ordered; import org.springframework.core.annotation.Order; import org.springframework.core.io.ClassPathResource; -import org.springframework.core.test.fixtures.Assume; -import org.springframework.core.test.fixtures.EnabledForTestGroups; -import org.springframework.core.test.fixtures.TestGroup; +import org.springframework.core.testfixture.Assume; +import org.springframework.core.testfixture.EnabledForTestGroups; +import org.springframework.core.testfixture.TestGroup; import org.springframework.lang.Nullable; import org.springframework.util.StopWatch; diff --git a/spring-context/src/test/java/org/springframework/aop/framework/AbstractAopProxyTests.java b/spring-context/src/test/java/org/springframework/aop/framework/AbstractAopProxyTests.java index 3876a78a33d..94b08b3ff02 100644 --- a/spring-context/src/test/java/org/springframework/aop/framework/AbstractAopProxyTests.java +++ b/spring-context/src/test/java/org/springframework/aop/framework/AbstractAopProxyTests.java @@ -62,10 +62,10 @@ import org.springframework.beans.test.fixtures.beans.ITestBean; import org.springframework.beans.test.fixtures.beans.Person; import org.springframework.beans.test.fixtures.beans.SerializablePerson; import org.springframework.beans.test.fixtures.beans.TestBean; -import org.springframework.core.test.fixtures.EnabledForTestGroups; -import org.springframework.core.test.fixtures.TestGroup; -import org.springframework.core.test.fixtures.TimeStamped; -import org.springframework.core.test.fixtures.io.SerializationTestUtils; +import org.springframework.core.testfixture.EnabledForTestGroups; +import org.springframework.core.testfixture.TestGroup; +import org.springframework.core.testfixture.TimeStamped; +import org.springframework.core.testfixture.io.SerializationTestUtils; import org.springframework.lang.Nullable; import org.springframework.tests.aop.advice.CountingAfterReturningAdvice; import org.springframework.tests.aop.advice.CountingBeforeAdvice; @@ -765,7 +765,7 @@ public abstract class AbstractAopProxyTests { @SuppressWarnings("serial") class MyDi extends DelegatingIntroductionInterceptor implements TimeStamped { /** - * @see org.springframework.core.test.fixtures.util.TimeStamped#getTimeStamp() + * @see org.springframework.core.testfixture.util.TimeStamped#getTimeStamp() */ @Override public long getTimeStamp() { diff --git a/spring-context/src/test/java/org/springframework/aop/framework/ProxyFactoryBeanTests.java b/spring-context/src/test/java/org/springframework/aop/framework/ProxyFactoryBeanTests.java index 22ca040e517..040687e30ad 100644 --- a/spring-context/src/test/java/org/springframework/aop/framework/ProxyFactoryBeanTests.java +++ b/spring-context/src/test/java/org/springframework/aop/framework/ProxyFactoryBeanTests.java @@ -52,8 +52,8 @@ import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.context.ApplicationListener; import org.springframework.context.test.fixtures.beans.TestApplicationListener; import org.springframework.core.io.ClassPathResource; -import org.springframework.core.test.fixtures.TimeStamped; -import org.springframework.core.test.fixtures.io.SerializationTestUtils; +import org.springframework.core.testfixture.TimeStamped; +import org.springframework.core.testfixture.io.SerializationTestUtils; import org.springframework.lang.Nullable; import org.springframework.tests.aop.advice.CountingBeforeAdvice; import org.springframework.tests.aop.advice.MyThrowsHandler; diff --git a/spring-context/src/test/java/org/springframework/aop/framework/autoproxy/BeanNameAutoProxyCreatorTests.java b/spring-context/src/test/java/org/springframework/aop/framework/autoproxy/BeanNameAutoProxyCreatorTests.java index e60395ef6f8..cbd7ba5aff7 100644 --- a/spring-context/src/test/java/org/springframework/aop/framework/autoproxy/BeanNameAutoProxyCreatorTests.java +++ b/spring-context/src/test/java/org/springframework/aop/framework/autoproxy/BeanNameAutoProxyCreatorTests.java @@ -28,7 +28,7 @@ import org.springframework.beans.factory.FactoryBean; import org.springframework.beans.test.fixtures.beans.ITestBean; import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.context.support.ClassPathXmlApplicationContext; -import org.springframework.core.test.fixtures.TimeStamped; +import org.springframework.core.testfixture.TimeStamped; import org.springframework.tests.aop.advice.CountingBeforeAdvice; import org.springframework.tests.aop.interceptor.NopInterceptor; diff --git a/spring-context/src/test/java/org/springframework/aop/scope/ScopedProxyTests.java b/spring-context/src/test/java/org/springframework/aop/scope/ScopedProxyTests.java index 3a2bf91f916..246863726d3 100644 --- a/spring-context/src/test/java/org/springframework/aop/scope/ScopedProxyTests.java +++ b/spring-context/src/test/java/org/springframework/aop/scope/ScopedProxyTests.java @@ -30,7 +30,7 @@ import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.context.support.GenericApplicationContext; import org.springframework.context.test.fixtures.SimpleMapScope; import org.springframework.core.io.ClassPathResource; -import org.springframework.core.test.fixtures.io.SerializationTestUtils; +import org.springframework.core.testfixture.io.SerializationTestUtils; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-context/src/test/java/org/springframework/aop/target/CommonsPool2TargetSourceTests.java b/spring-context/src/test/java/org/springframework/aop/target/CommonsPool2TargetSourceTests.java index 0c2390d1243..68f75103a80 100644 --- a/spring-context/src/test/java/org/springframework/aop/target/CommonsPool2TargetSourceTests.java +++ b/spring-context/src/test/java/org/springframework/aop/target/CommonsPool2TargetSourceTests.java @@ -30,7 +30,7 @@ import org.springframework.beans.test.fixtures.beans.SerializablePerson; import org.springframework.beans.test.fixtures.beans.SideEffectBean; import org.springframework.context.support.StaticApplicationContext; import org.springframework.core.io.ClassPathResource; -import org.springframework.core.test.fixtures.io.SerializationTestUtils; +import org.springframework.core.testfixture.io.SerializationTestUtils; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; diff --git a/spring-context/src/test/java/org/springframework/beans/factory/xml/XmlBeanFactoryTests.java b/spring-context/src/test/java/org/springframework/beans/factory/xml/XmlBeanFactoryTests.java index 311a933b21a..70c6116e7c6 100644 --- a/spring-context/src/test/java/org/springframework/beans/factory/xml/XmlBeanFactoryTests.java +++ b/spring-context/src/test/java/org/springframework/beans/factory/xml/XmlBeanFactoryTests.java @@ -61,7 +61,7 @@ import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.FileSystemResource; import org.springframework.core.io.UrlResource; import org.springframework.core.io.support.EncodedResource; -import org.springframework.core.test.fixtures.io.SerializationTestUtils; +import org.springframework.core.testfixture.io.SerializationTestUtils; import org.springframework.tests.sample.beans.ResourceTestBean; import org.springframework.util.ClassUtils; import org.springframework.util.FileCopyUtils; diff --git a/spring-context/src/test/java/org/springframework/context/annotation/AnnotationProcessorPerformanceTests.java b/spring-context/src/test/java/org/springframework/context/annotation/AnnotationProcessorPerformanceTests.java index 128bd67f2d6..b0a89c07e96 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/AnnotationProcessorPerformanceTests.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/AnnotationProcessorPerformanceTests.java @@ -36,11 +36,11 @@ import org.springframework.beans.factory.support.RootBeanDefinition; import org.springframework.beans.test.fixtures.beans.ITestBean; import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.context.support.GenericApplicationContext; -import org.springframework.core.test.fixtures.Assume; -import org.springframework.core.test.fixtures.EnabledForTestGroups; +import org.springframework.core.testfixture.Assume; +import org.springframework.core.testfixture.EnabledForTestGroups; import static org.assertj.core.api.Assertions.assertThat; -import static org.springframework.core.test.fixtures.TestGroup.PERFORMANCE; +import static org.springframework.core.testfixture.TestGroup.PERFORMANCE; /** * @author Juergen Hoeller diff --git a/spring-context/src/test/java/org/springframework/context/annotation/CommonAnnotationBeanPostProcessorTests.java b/spring-context/src/test/java/org/springframework/context/annotation/CommonAnnotationBeanPostProcessorTests.java index 405aa16ccbc..44af70d9b10 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/CommonAnnotationBeanPostProcessorTests.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/CommonAnnotationBeanPostProcessorTests.java @@ -42,7 +42,7 @@ import org.springframework.beans.test.fixtures.beans.NestedTestBean; import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.context.support.GenericApplicationContext; import org.springframework.context.test.fixtures.jndi.ExpectedLookupTemplate; -import org.springframework.core.test.fixtures.io.SerializationTestUtils; +import org.springframework.core.testfixture.io.SerializationTestUtils; import org.springframework.jndi.support.SimpleJndiBeanFactory; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-context/src/test/java/org/springframework/context/annotation/ComponentScanAnnotationIntegrationTests.java b/spring-context/src/test/java/org/springframework/context/annotation/ComponentScanAnnotationIntegrationTests.java index 441ca88cd0d..25061f5a045 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/ComponentScanAnnotationIntegrationTests.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/ComponentScanAnnotationIntegrationTests.java @@ -56,7 +56,7 @@ import org.springframework.core.env.ConfigurableEnvironment; import org.springframework.core.env.Environment; import org.springframework.core.env.Profiles; import org.springframework.core.io.ResourceLoader; -import org.springframework.core.test.fixtures.io.SerializationTestUtils; +import org.springframework.core.testfixture.io.SerializationTestUtils; import org.springframework.core.type.classreading.MetadataReader; import org.springframework.core.type.classreading.MetadataReaderFactory; import org.springframework.core.type.filter.TypeFilter; diff --git a/spring-context/src/test/java/org/springframework/context/annotation/ComponentScanParserScopedProxyTests.java b/spring-context/src/test/java/org/springframework/context/annotation/ComponentScanParserScopedProxyTests.java index 4b163056601..e0669373f71 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/ComponentScanParserScopedProxyTests.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/ComponentScanParserScopedProxyTests.java @@ -24,7 +24,7 @@ import org.springframework.aop.support.AopUtils; import org.springframework.beans.factory.parsing.BeanDefinitionParsingException; import org.springframework.context.support.ClassPathXmlApplicationContext; import org.springframework.context.test.fixtures.SimpleMapScope; -import org.springframework.core.test.fixtures.io.SerializationTestUtils; +import org.springframework.core.testfixture.io.SerializationTestUtils; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; diff --git a/spring-context/src/test/java/org/springframework/context/expression/ApplicationContextExpressionTests.java b/spring-context/src/test/java/org/springframework/context/expression/ApplicationContextExpressionTests.java index 598c1a0c863..f2f584f29f2 100644 --- a/spring-context/src/test/java/org/springframework/context/expression/ApplicationContextExpressionTests.java +++ b/spring-context/src/test/java/org/springframework/context/expression/ApplicationContextExpressionTests.java @@ -52,14 +52,14 @@ import org.springframework.core.convert.support.GenericConversionService; import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.Resource; import org.springframework.core.io.support.EncodedResource; -import org.springframework.core.test.fixtures.Assume; -import org.springframework.core.test.fixtures.EnabledForTestGroups; -import org.springframework.core.test.fixtures.io.SerializationTestUtils; +import org.springframework.core.testfixture.Assume; +import org.springframework.core.testfixture.EnabledForTestGroups; +import org.springframework.core.testfixture.io.SerializationTestUtils; import org.springframework.util.FileCopyUtils; import org.springframework.util.StopWatch; import static org.assertj.core.api.Assertions.assertThat; -import static org.springframework.core.test.fixtures.TestGroup.PERFORMANCE; +import static org.springframework.core.testfixture.TestGroup.PERFORMANCE; /** * @author Juergen Hoeller diff --git a/spring-context/src/test/java/org/springframework/context/expression/EnvironmentAccessorIntegrationTests.java b/spring-context/src/test/java/org/springframework/context/expression/EnvironmentAccessorIntegrationTests.java index 8db30517da0..ca8e26eb73a 100644 --- a/spring-context/src/test/java/org/springframework/context/expression/EnvironmentAccessorIntegrationTests.java +++ b/spring-context/src/test/java/org/springframework/context/expression/EnvironmentAccessorIntegrationTests.java @@ -22,7 +22,7 @@ import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.context.support.AbstractApplicationContext; import org.springframework.context.support.GenericApplicationContext; -import org.springframework.core.test.fixtures.env.MockPropertySource; +import org.springframework.core.testfixture.env.MockPropertySource; import static org.assertj.core.api.Assertions.assertThat; import static org.springframework.beans.factory.support.BeanDefinitionBuilder.genericBeanDefinition; diff --git a/spring-context/src/test/java/org/springframework/context/support/DefaultLifecycleProcessorTests.java b/spring-context/src/test/java/org/springframework/context/support/DefaultLifecycleProcessorTests.java index f24be678c73..16e0000c88a 100644 --- a/spring-context/src/test/java/org/springframework/context/support/DefaultLifecycleProcessorTests.java +++ b/spring-context/src/test/java/org/springframework/context/support/DefaultLifecycleProcessorTests.java @@ -27,10 +27,10 @@ import org.springframework.beans.factory.support.RootBeanDefinition; import org.springframework.context.Lifecycle; import org.springframework.context.LifecycleProcessor; import org.springframework.context.SmartLifecycle; -import org.springframework.core.test.fixtures.EnabledForTestGroups; +import org.springframework.core.testfixture.EnabledForTestGroups; import static org.assertj.core.api.Assertions.assertThat; -import static org.springframework.core.test.fixtures.TestGroup.PERFORMANCE; +import static org.springframework.core.testfixture.TestGroup.PERFORMANCE; /** * @author Mark Fisher diff --git a/spring-context/src/test/java/org/springframework/context/support/EnvironmentSecurityManagerIntegrationTests.java b/spring-context/src/test/java/org/springframework/context/support/EnvironmentSecurityManagerIntegrationTests.java index 190ba795821..968aba7f695 100644 --- a/spring-context/src/test/java/org/springframework/context/support/EnvironmentSecurityManagerIntegrationTests.java +++ b/spring-context/src/test/java/org/springframework/context/support/EnvironmentSecurityManagerIntegrationTests.java @@ -28,7 +28,7 @@ import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.context.annotation.AnnotatedBeanDefinitionReader; import org.springframework.context.annotation.Profile; import org.springframework.core.env.AbstractEnvironment; -import org.springframework.core.test.fixtures.env.EnvironmentTestUtils; +import org.springframework.core.testfixture.env.EnvironmentTestUtils; import org.springframework.stereotype.Component; import static java.lang.String.format; diff --git a/spring-context/src/test/java/org/springframework/context/support/PropertySourcesPlaceholderConfigurerTests.java b/spring-context/src/test/java/org/springframework/context/support/PropertySourcesPlaceholderConfigurerTests.java index bc71706e11f..f899e376c40 100644 --- a/spring-context/src/test/java/org/springframework/context/support/PropertySourcesPlaceholderConfigurerTests.java +++ b/spring-context/src/test/java/org/springframework/context/support/PropertySourcesPlaceholderConfigurerTests.java @@ -30,7 +30,7 @@ import org.springframework.core.env.PropertySource; import org.springframework.core.env.StandardEnvironment; import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.Resource; -import org.springframework.core.test.fixtures.env.MockPropertySource; +import org.springframework.core.testfixture.env.MockPropertySource; import org.springframework.mock.env.MockEnvironment; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-context/src/test/java/org/springframework/mock/env/MockEnvironment.java b/spring-context/src/test/java/org/springframework/mock/env/MockEnvironment.java index bb23db28d4a..6397865a1f8 100644 --- a/spring-context/src/test/java/org/springframework/mock/env/MockEnvironment.java +++ b/spring-context/src/test/java/org/springframework/mock/env/MockEnvironment.java @@ -18,7 +18,7 @@ package org.springframework.mock.env; import org.springframework.core.env.AbstractEnvironment; import org.springframework.core.env.ConfigurableEnvironment; -import org.springframework.core.test.fixtures.env.MockPropertySource; +import org.springframework.core.testfixture.env.MockPropertySource; /** * Simple {@link ConfigurableEnvironment} implementation exposing @@ -27,7 +27,7 @@ import org.springframework.core.test.fixtures.env.MockPropertySource; * @author Chris Beams * @author Sam Brannen * @since 3.2 - * @see org.springframework.mock.env.MockPropertySource + * @see org.springframework.core.testfixture.env.MockPropertySource */ public class MockEnvironment extends AbstractEnvironment { diff --git a/spring-context/src/test/java/org/springframework/scheduling/annotation/EnableSchedulingTests.java b/spring-context/src/test/java/org/springframework/scheduling/annotation/EnableSchedulingTests.java index 6a155d4cc89..89d7e09c9c3 100644 --- a/spring-context/src/test/java/org/springframework/scheduling/annotation/EnableSchedulingTests.java +++ b/spring-context/src/test/java/org/springframework/scheduling/annotation/EnableSchedulingTests.java @@ -26,7 +26,7 @@ import org.junit.jupiter.api.Test; import org.springframework.context.annotation.AnnotationConfigApplicationContext; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; -import org.springframework.core.test.fixtures.EnabledForTestGroups; +import org.springframework.core.testfixture.EnabledForTestGroups; import org.springframework.scheduling.TaskScheduler; import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler; import org.springframework.scheduling.config.IntervalTask; @@ -35,7 +35,7 @@ import org.springframework.scheduling.config.ScheduledTaskRegistrar; import org.springframework.scheduling.config.TaskManagementConfigUtils; import static org.assertj.core.api.Assertions.assertThat; -import static org.springframework.core.test.fixtures.TestGroup.PERFORMANCE; +import static org.springframework.core.testfixture.TestGroup.PERFORMANCE; /** * Tests use of @EnableScheduling on @Configuration classes. diff --git a/spring-context/src/test/java/org/springframework/scheduling/concurrent/ScheduledExecutorFactoryBeanTests.java b/spring-context/src/test/java/org/springframework/scheduling/concurrent/ScheduledExecutorFactoryBeanTests.java index c35995d0f6b..5272b8596ee 100644 --- a/spring-context/src/test/java/org/springframework/scheduling/concurrent/ScheduledExecutorFactoryBeanTests.java +++ b/spring-context/src/test/java/org/springframework/scheduling/concurrent/ScheduledExecutorFactoryBeanTests.java @@ -23,7 +23,7 @@ import java.util.concurrent.ThreadFactory; import org.junit.jupiter.api.Test; import org.springframework.core.task.NoOpRunnable; -import org.springframework.core.test.fixtures.EnabledForTestGroups; +import org.springframework.core.testfixture.EnabledForTestGroups; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException; @@ -32,7 +32,7 @@ import static org.mockito.Mockito.atLeast; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.never; import static org.mockito.Mockito.verify; -import static org.springframework.core.test.fixtures.TestGroup.PERFORMANCE; +import static org.springframework.core.testfixture.TestGroup.PERFORMANCE; /** * @author Rick Evans diff --git a/spring-context/src/test/java/org/springframework/scripting/support/ScriptFactoryPostProcessorTests.java b/spring-context/src/test/java/org/springframework/scripting/support/ScriptFactoryPostProcessorTests.java index 65c9bfdb5e6..ac8d95bf955 100644 --- a/spring-context/src/test/java/org/springframework/scripting/support/ScriptFactoryPostProcessorTests.java +++ b/spring-context/src/test/java/org/springframework/scripting/support/ScriptFactoryPostProcessorTests.java @@ -24,7 +24,7 @@ import org.springframework.beans.factory.config.BeanDefinition; import org.springframework.beans.factory.support.BeanDefinitionBuilder; import org.springframework.context.support.ClassPathXmlApplicationContext; import org.springframework.context.support.GenericApplicationContext; -import org.springframework.core.test.fixtures.EnabledForTestGroups; +import org.springframework.core.testfixture.EnabledForTestGroups; import org.springframework.scripting.Messenger; import org.springframework.scripting.ScriptCompilationException; import org.springframework.scripting.groovy.GroovyScriptFactory; @@ -33,7 +33,7 @@ import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; import static org.assertj.core.api.Assertions.assertThatIllegalStateException; import static org.mockito.Mockito.mock; -import static org.springframework.core.test.fixtures.TestGroup.PERFORMANCE; +import static org.springframework.core.testfixture.TestGroup.PERFORMANCE; /** * @author Rick Evans diff --git a/spring-context/src/test/java/org/springframework/validation/beanvalidation/SpringValidatorAdapterTests.java b/spring-context/src/test/java/org/springframework/validation/beanvalidation/SpringValidatorAdapterTests.java index 0145e155b78..b4d925d845d 100644 --- a/spring-context/src/test/java/org/springframework/validation/beanvalidation/SpringValidatorAdapterTests.java +++ b/spring-context/src/test/java/org/springframework/validation/beanvalidation/SpringValidatorAdapterTests.java @@ -50,7 +50,7 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.BeanWrapper; import org.springframework.beans.BeanWrapperImpl; import org.springframework.context.support.StaticMessageSource; -import org.springframework.core.test.fixtures.io.SerializationTestUtils; +import org.springframework.core.testfixture.io.SerializationTestUtils; import org.springframework.util.ObjectUtils; import org.springframework.validation.BeanPropertyBindingResult; import org.springframework.validation.FieldError; diff --git a/spring-context/src/test/kotlin/org/springframework/context/support/BeanDefinitionDslTests.kt b/spring-context/src/test/kotlin/org/springframework/context/support/BeanDefinitionDslTests.kt index d9fc98990ae..cc315fcddec 100644 --- a/spring-context/src/test/kotlin/org/springframework/context/support/BeanDefinitionDslTests.kt +++ b/spring-context/src/test/kotlin/org/springframework/context/support/BeanDefinitionDslTests.kt @@ -25,7 +25,7 @@ import org.springframework.beans.factory.getBean import org.springframework.context.support.BeanDefinitionDsl.* import org.springframework.core.env.SimpleCommandLinePropertySource import org.springframework.core.env.get -import org.springframework.core.test.fixtures.env.MockPropertySource +import org.springframework.core.testfixture.env.MockPropertySource import java.util.stream.Collectors @Suppress("UNUSED_EXPRESSION") diff --git a/spring-core/src/test/java/example/type/AspectJTypeFilterTestsTypes.java b/spring-core/src/test/java/example/type/AspectJTypeFilterTestsTypes.java index bf17886f9b7..089fe1b4f17 100644 --- a/spring-core/src/test/java/example/type/AspectJTypeFilterTestsTypes.java +++ b/spring-core/src/test/java/example/type/AspectJTypeFilterTestsTypes.java @@ -16,7 +16,7 @@ package example.type; -import org.springframework.core.test.fixtures.stereotype.Component; +import org.springframework.core.testfixture.stereotype.Component; /** * We must use a standalone set of types to ensure that no one else is loading diff --git a/spring-core/src/test/java/org/springframework/core/annotation/AnnotatedElementUtilsTests.java b/spring-core/src/test/java/org/springframework/core/annotation/AnnotatedElementUtilsTests.java index 0aca2ed6077..5cb78d611ff 100644 --- a/spring-core/src/test/java/org/springframework/core/annotation/AnnotatedElementUtilsTests.java +++ b/spring-core/src/test/java/org/springframework/core/annotation/AnnotatedElementUtilsTests.java @@ -42,8 +42,8 @@ import org.springframework.core.annotation.AnnotationUtilsTests.ExtendsBaseClass import org.springframework.core.annotation.AnnotationUtilsTests.ImplementsInterfaceWithGenericAnnotatedMethod; import org.springframework.core.annotation.AnnotationUtilsTests.WebController; import org.springframework.core.annotation.AnnotationUtilsTests.WebMapping; -import org.springframework.core.test.fixtures.stereotype.Component; -import org.springframework.core.test.fixtures.stereotype.Indexed; +import org.springframework.core.testfixture.stereotype.Component; +import org.springframework.core.testfixture.stereotype.Indexed; import org.springframework.lang.NonNullApi; import org.springframework.lang.Nullable; import org.springframework.util.MultiValueMap; diff --git a/spring-core/src/test/java/org/springframework/core/annotation/AnnotationUtilsTests.java b/spring-core/src/test/java/org/springframework/core/annotation/AnnotationUtilsTests.java index 78ec17e6b8c..556c7c68435 100644 --- a/spring-core/src/test/java/org/springframework/core/annotation/AnnotationUtilsTests.java +++ b/spring-core/src/test/java/org/springframework/core/annotation/AnnotationUtilsTests.java @@ -39,7 +39,7 @@ import org.junit.jupiter.api.Test; import org.springframework.core.Ordered; import org.springframework.core.annotation.subpackage.NonPublicAnnotatedClass; -import org.springframework.core.test.fixtures.stereotype.Component; +import org.springframework.core.testfixture.stereotype.Component; import org.springframework.lang.NonNullApi; import static java.util.Arrays.asList; @@ -928,7 +928,7 @@ class AnnotationUtilsTests { Map map = Collections.singletonMap(VALUE, 42L); assertThatIllegalStateException().isThrownBy(() -> synthesizeAnnotation(map, Component.class, null).value()) - .withMessageContaining("Attribute 'value' in annotation org.springframework.core.test.fixtures.stereotype.Component " + .withMessageContaining("Attribute 'value' in annotation org.springframework.core.testfixture.stereotype.Component " + "should be compatible with java.lang.String but a java.lang.Long value was returned"); } diff --git a/spring-core/src/test/java/org/springframework/core/annotation/MergedAnnotationsTests.java b/spring-core/src/test/java/org/springframework/core/annotation/MergedAnnotationsTests.java index 956f93f549a..4b6ab16ca92 100644 --- a/spring-core/src/test/java/org/springframework/core/annotation/MergedAnnotationsTests.java +++ b/spring-core/src/test/java/org/springframework/core/annotation/MergedAnnotationsTests.java @@ -43,8 +43,8 @@ import org.springframework.core.Ordered; import org.springframework.core.annotation.MergedAnnotation.Adapt; import org.springframework.core.annotation.MergedAnnotations.SearchStrategy; import org.springframework.core.annotation.subpackage.NonPublicAnnotatedClass; -import org.springframework.core.test.fixtures.stereotype.Component; -import org.springframework.core.test.fixtures.stereotype.Indexed; +import org.springframework.core.testfixture.stereotype.Component; +import org.springframework.core.testfixture.stereotype.Indexed; import org.springframework.lang.Nullable; import org.springframework.util.ClassUtils; import org.springframework.util.MultiValueMap; @@ -1770,7 +1770,7 @@ class MergedAnnotationsTests { MergedAnnotation annotation = MergedAnnotation.of(Component.class, map); assertThatIllegalStateException().isThrownBy(() -> annotation.synthesize().value()) .withMessage("Attribute 'value' in annotation " + - "org.springframework.core.test.fixtures.stereotype.Component should be " + + "org.springframework.core.testfixture.stereotype.Component should be " + "compatible with java.lang.String but a java.lang.Long value was returned"); } diff --git a/spring-core/src/test/java/org/springframework/core/codec/ByteArrayDecoderTests.java b/spring-core/src/test/java/org/springframework/core/codec/ByteArrayDecoderTests.java index c41874ef083..10f93f51503 100644 --- a/spring-core/src/test/java/org/springframework/core/codec/ByteArrayDecoderTests.java +++ b/spring-core/src/test/java/org/springframework/core/codec/ByteArrayDecoderTests.java @@ -24,7 +24,7 @@ import reactor.core.publisher.Flux; import org.springframework.core.ResolvableType; import org.springframework.core.io.buffer.DataBuffer; -import org.springframework.core.test.fixtures.codec.AbstractDecoderTests; +import org.springframework.core.testfixture.codec.AbstractDecoderTests; import org.springframework.util.MimeTypeUtils; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-core/src/test/java/org/springframework/core/codec/ByteArrayEncoderTests.java b/spring-core/src/test/java/org/springframework/core/codec/ByteArrayEncoderTests.java index 12d40d64aad..dcb5043f297 100644 --- a/spring-core/src/test/java/org/springframework/core/codec/ByteArrayEncoderTests.java +++ b/spring-core/src/test/java/org/springframework/core/codec/ByteArrayEncoderTests.java @@ -22,7 +22,7 @@ import org.junit.jupiter.api.Test; import reactor.core.publisher.Flux; import org.springframework.core.ResolvableType; -import org.springframework.core.test.fixtures.codec.AbstractEncoderTests; +import org.springframework.core.testfixture.codec.AbstractEncoderTests; import org.springframework.util.MimeTypeUtils; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-core/src/test/java/org/springframework/core/codec/ByteBufferDecoderTests.java b/spring-core/src/test/java/org/springframework/core/codec/ByteBufferDecoderTests.java index 1d0215ee58e..d14a7543609 100644 --- a/spring-core/src/test/java/org/springframework/core/codec/ByteBufferDecoderTests.java +++ b/spring-core/src/test/java/org/springframework/core/codec/ByteBufferDecoderTests.java @@ -25,7 +25,7 @@ import reactor.core.publisher.Flux; import org.springframework.core.ResolvableType; import org.springframework.core.io.buffer.DataBuffer; -import org.springframework.core.test.fixtures.codec.AbstractDecoderTests; +import org.springframework.core.testfixture.codec.AbstractDecoderTests; import org.springframework.util.MimeTypeUtils; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-core/src/test/java/org/springframework/core/codec/ByteBufferEncoderTests.java b/spring-core/src/test/java/org/springframework/core/codec/ByteBufferEncoderTests.java index 066aa9051d9..1bc0e3f665d 100644 --- a/spring-core/src/test/java/org/springframework/core/codec/ByteBufferEncoderTests.java +++ b/spring-core/src/test/java/org/springframework/core/codec/ByteBufferEncoderTests.java @@ -23,7 +23,7 @@ import org.junit.jupiter.api.Test; import reactor.core.publisher.Flux; import org.springframework.core.ResolvableType; -import org.springframework.core.test.fixtures.codec.AbstractEncoderTests; +import org.springframework.core.testfixture.codec.AbstractEncoderTests; import org.springframework.util.MimeTypeUtils; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-core/src/test/java/org/springframework/core/codec/CharSequenceEncoderTests.java b/spring-core/src/test/java/org/springframework/core/codec/CharSequenceEncoderTests.java index 6356dfc810e..e73bb2c1245 100644 --- a/spring-core/src/test/java/org/springframework/core/codec/CharSequenceEncoderTests.java +++ b/spring-core/src/test/java/org/springframework/core/codec/CharSequenceEncoderTests.java @@ -23,7 +23,7 @@ import org.junit.jupiter.api.Test; import reactor.core.publisher.Flux; import org.springframework.core.ResolvableType; -import org.springframework.core.test.fixtures.codec.AbstractEncoderTests; +import org.springframework.core.testfixture.codec.AbstractEncoderTests; import org.springframework.util.MimeTypeUtils; import static java.nio.charset.StandardCharsets.ISO_8859_1; diff --git a/spring-core/src/test/java/org/springframework/core/codec/DataBufferDecoderTests.java b/spring-core/src/test/java/org/springframework/core/codec/DataBufferDecoderTests.java index ec0ccdda086..e1296537bfd 100644 --- a/spring-core/src/test/java/org/springframework/core/codec/DataBufferDecoderTests.java +++ b/spring-core/src/test/java/org/springframework/core/codec/DataBufferDecoderTests.java @@ -25,7 +25,7 @@ import reactor.core.publisher.Flux; import org.springframework.core.ResolvableType; import org.springframework.core.io.buffer.DataBuffer; import org.springframework.core.io.buffer.DataBufferUtils; -import org.springframework.core.test.fixtures.codec.AbstractDecoderTests; +import org.springframework.core.testfixture.codec.AbstractDecoderTests; import org.springframework.util.MimeTypeUtils; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-core/src/test/java/org/springframework/core/codec/DataBufferEncoderTests.java b/spring-core/src/test/java/org/springframework/core/codec/DataBufferEncoderTests.java index cb6242c7182..9a578ed403f 100644 --- a/spring-core/src/test/java/org/springframework/core/codec/DataBufferEncoderTests.java +++ b/spring-core/src/test/java/org/springframework/core/codec/DataBufferEncoderTests.java @@ -24,7 +24,7 @@ import reactor.core.publisher.Mono; import org.springframework.core.ResolvableType; import org.springframework.core.io.buffer.DataBuffer; -import org.springframework.core.test.fixtures.codec.AbstractEncoderTests; +import org.springframework.core.testfixture.codec.AbstractEncoderTests; import org.springframework.util.MimeTypeUtils; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-core/src/test/java/org/springframework/core/codec/ResourceDecoderTests.java b/spring-core/src/test/java/org/springframework/core/codec/ResourceDecoderTests.java index 409d9c693e9..1c3a531f7a3 100644 --- a/spring-core/src/test/java/org/springframework/core/codec/ResourceDecoderTests.java +++ b/spring-core/src/test/java/org/springframework/core/codec/ResourceDecoderTests.java @@ -28,7 +28,7 @@ import org.springframework.core.io.ByteArrayResource; import org.springframework.core.io.InputStreamResource; import org.springframework.core.io.Resource; import org.springframework.core.io.buffer.DataBuffer; -import org.springframework.core.test.fixtures.codec.AbstractDecoderTests; +import org.springframework.core.testfixture.codec.AbstractDecoderTests; import org.springframework.util.MimeTypeUtils; import org.springframework.util.StreamUtils; diff --git a/spring-core/src/test/java/org/springframework/core/codec/ResourceEncoderTests.java b/spring-core/src/test/java/org/springframework/core/codec/ResourceEncoderTests.java index b99bcb3812c..1925415e734 100644 --- a/spring-core/src/test/java/org/springframework/core/codec/ResourceEncoderTests.java +++ b/spring-core/src/test/java/org/springframework/core/codec/ResourceEncoderTests.java @@ -28,7 +28,7 @@ import org.springframework.core.io.ByteArrayResource; import org.springframework.core.io.InputStreamResource; import org.springframework.core.io.Resource; import org.springframework.core.io.buffer.DataBuffer; -import org.springframework.core.test.fixtures.codec.AbstractEncoderTests; +import org.springframework.core.testfixture.codec.AbstractEncoderTests; import org.springframework.lang.Nullable; import org.springframework.util.MimeType; import org.springframework.util.MimeTypeUtils; diff --git a/spring-core/src/test/java/org/springframework/core/codec/ResourceRegionEncoderTests.java b/spring-core/src/test/java/org/springframework/core/codec/ResourceRegionEncoderTests.java index 8148ecf64e0..2a25e3cc141 100644 --- a/spring-core/src/test/java/org/springframework/core/codec/ResourceRegionEncoderTests.java +++ b/spring-core/src/test/java/org/springframework/core/codec/ResourceRegionEncoderTests.java @@ -32,8 +32,8 @@ import org.springframework.core.io.Resource; import org.springframework.core.io.buffer.DataBuffer; import org.springframework.core.io.buffer.DataBufferUtils; import org.springframework.core.io.support.ResourceRegion; -import org.springframework.core.test.fixtures.io.buffer.AbstractLeakCheckingTests; -import org.springframework.core.test.fixtures.io.buffer.DataBufferTestUtils; +import org.springframework.core.testfixture.io.buffer.AbstractLeakCheckingTests; +import org.springframework.core.testfixture.io.buffer.DataBufferTestUtils; import org.springframework.util.MimeType; import org.springframework.util.MimeTypeUtils; diff --git a/spring-core/src/test/java/org/springframework/core/codec/StringDecoderTests.java b/spring-core/src/test/java/org/springframework/core/codec/StringDecoderTests.java index bcfc43b498f..0d3d29ceef5 100644 --- a/spring-core/src/test/java/org/springframework/core/codec/StringDecoderTests.java +++ b/spring-core/src/test/java/org/springframework/core/codec/StringDecoderTests.java @@ -30,7 +30,7 @@ import reactor.test.StepVerifier; import org.springframework.core.ResolvableType; import org.springframework.core.io.buffer.DataBuffer; import org.springframework.core.io.buffer.DataBufferLimitException; -import org.springframework.core.test.fixtures.codec.AbstractDecoderTests; +import org.springframework.core.testfixture.codec.AbstractDecoderTests; import org.springframework.util.MimeType; import org.springframework.util.MimeTypeUtils; diff --git a/spring-core/src/test/java/org/springframework/core/convert/converter/DefaultConversionServiceTests.java b/spring-core/src/test/java/org/springframework/core/convert/converter/DefaultConversionServiceTests.java index f5a932bacbd..a91f5415270 100644 --- a/spring-core/src/test/java/org/springframework/core/convert/converter/DefaultConversionServiceTests.java +++ b/spring-core/src/test/java/org/springframework/core/convert/converter/DefaultConversionServiceTests.java @@ -51,13 +51,13 @@ import org.springframework.core.convert.ConversionFailedException; import org.springframework.core.convert.ConverterNotFoundException; import org.springframework.core.convert.TypeDescriptor; import org.springframework.core.convert.support.DefaultConversionService; -import org.springframework.core.test.fixtures.EnabledForTestGroups; +import org.springframework.core.testfixture.EnabledForTestGroups; import org.springframework.util.ClassUtils; import org.springframework.util.StopWatch; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; -import static org.springframework.core.test.fixtures.TestGroup.PERFORMANCE; +import static org.springframework.core.testfixture.TestGroup.PERFORMANCE; /** * Unit tests for {@link DefaultConversionService}. diff --git a/spring-core/src/test/java/org/springframework/core/convert/support/GenericConversionServiceTests.java b/spring-core/src/test/java/org/springframework/core/convert/support/GenericConversionServiceTests.java index fd2271d26f6..9e0c6464827 100644 --- a/spring-core/src/test/java/org/springframework/core/convert/support/GenericConversionServiceTests.java +++ b/spring-core/src/test/java/org/springframework/core/convert/support/GenericConversionServiceTests.java @@ -43,7 +43,7 @@ import org.springframework.core.convert.converter.ConverterFactory; import org.springframework.core.convert.converter.GenericConverter; import org.springframework.core.io.DescriptiveResource; import org.springframework.core.io.Resource; -import org.springframework.core.test.fixtures.EnabledForTestGroups; +import org.springframework.core.testfixture.EnabledForTestGroups; import org.springframework.lang.Nullable; import org.springframework.util.StopWatch; import org.springframework.util.StringUtils; @@ -54,7 +54,7 @@ import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException; import static org.assertj.core.api.Assertions.assertThatIllegalStateException; -import static org.springframework.core.test.fixtures.TestGroup.PERFORMANCE; +import static org.springframework.core.testfixture.TestGroup.PERFORMANCE; /** * Unit tests for {@link GenericConversionService}. diff --git a/spring-core/src/test/java/org/springframework/core/env/MutablePropertySourcesTests.java b/spring-core/src/test/java/org/springframework/core/env/MutablePropertySourcesTests.java index 9d04dcbd246..222104a2a32 100644 --- a/spring-core/src/test/java/org/springframework/core/env/MutablePropertySourcesTests.java +++ b/spring-core/src/test/java/org/springframework/core/env/MutablePropertySourcesTests.java @@ -20,7 +20,7 @@ import java.util.Iterator; import org.junit.jupiter.api.Test; -import org.springframework.core.test.fixtures.env.MockPropertySource; +import org.springframework.core.testfixture.env.MockPropertySource; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; diff --git a/spring-core/src/test/java/org/springframework/core/env/PropertySourcesPropertyResolverTests.java b/spring-core/src/test/java/org/springframework/core/env/PropertySourcesPropertyResolverTests.java index bed53fce1f4..f51fc97e9a0 100644 --- a/spring-core/src/test/java/org/springframework/core/env/PropertySourcesPropertyResolverTests.java +++ b/spring-core/src/test/java/org/springframework/core/env/PropertySourcesPropertyResolverTests.java @@ -24,7 +24,7 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.springframework.core.convert.ConverterNotFoundException; -import org.springframework.core.test.fixtures.env.MockPropertySource; +import org.springframework.core.testfixture.env.MockPropertySource; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; diff --git a/spring-core/src/test/java/org/springframework/core/env/StandardEnvironmentTests.java b/spring-core/src/test/java/org/springframework/core/env/StandardEnvironmentTests.java index 24bb7143ebe..ee87b557100 100644 --- a/spring-core/src/test/java/org/springframework/core/env/StandardEnvironmentTests.java +++ b/spring-core/src/test/java/org/springframework/core/env/StandardEnvironmentTests.java @@ -24,8 +24,8 @@ import java.util.Map; import org.junit.jupiter.api.Test; import org.springframework.core.SpringProperties; -import org.springframework.core.test.fixtures.env.EnvironmentTestUtils; -import org.springframework.core.test.fixtures.env.MockPropertySource; +import org.springframework.core.testfixture.env.EnvironmentTestUtils; +import org.springframework.core.testfixture.env.MockPropertySource; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException; diff --git a/spring-core/src/test/java/org/springframework/core/io/buffer/DataBufferTests.java b/spring-core/src/test/java/org/springframework/core/io/buffer/DataBufferTests.java index 2d006cd45a7..cd0932e6257 100644 --- a/spring-core/src/test/java/org/springframework/core/io/buffer/DataBufferTests.java +++ b/spring-core/src/test/java/org/springframework/core/io/buffer/DataBufferTests.java @@ -22,7 +22,7 @@ import java.nio.ByteBuffer; import java.nio.charset.StandardCharsets; import java.util.Arrays; -import org.springframework.core.test.fixtures.io.buffer.AbstractDataBufferAllocatingTests; +import org.springframework.core.testfixture.io.buffer.AbstractDataBufferAllocatingTests; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; diff --git a/spring-core/src/test/java/org/springframework/core/io/buffer/DataBufferUtilsTests.java b/spring-core/src/test/java/org/springframework/core/io/buffer/DataBufferUtilsTests.java index 168a6df23e8..2b785b0b719 100644 --- a/spring-core/src/test/java/org/springframework/core/io/buffer/DataBufferUtilsTests.java +++ b/spring-core/src/test/java/org/springframework/core/io/buffer/DataBufferUtilsTests.java @@ -45,8 +45,8 @@ import reactor.test.StepVerifier; import org.springframework.core.io.ByteArrayResource; import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.Resource; -import org.springframework.core.test.fixtures.io.buffer.AbstractDataBufferAllocatingTests; -import org.springframework.core.test.fixtures.io.buffer.DataBufferTestUtils; +import org.springframework.core.testfixture.io.buffer.AbstractDataBufferAllocatingTests; +import org.springframework.core.testfixture.io.buffer.DataBufferTestUtils; import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.ArgumentMatchers.any; diff --git a/spring-core/src/test/java/org/springframework/core/io/buffer/LeakAwareDataBufferFactoryTests.java b/spring-core/src/test/java/org/springframework/core/io/buffer/LeakAwareDataBufferFactoryTests.java index 37d941dde6f..64531c0865d 100644 --- a/spring-core/src/test/java/org/springframework/core/io/buffer/LeakAwareDataBufferFactoryTests.java +++ b/spring-core/src/test/java/org/springframework/core/io/buffer/LeakAwareDataBufferFactoryTests.java @@ -18,7 +18,7 @@ package org.springframework.core.io.buffer; import org.junit.jupiter.api.Test; -import org.springframework.core.test.fixtures.io.buffer.LeakAwareDataBufferFactory; +import org.springframework.core.testfixture.io.buffer.LeakAwareDataBufferFactory; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; import static org.springframework.core.io.buffer.DataBufferUtils.release; diff --git a/spring-core/src/test/java/org/springframework/core/io/buffer/support/DataBufferTestUtilsTests.java b/spring-core/src/test/java/org/springframework/core/io/buffer/support/DataBufferTestUtilsTests.java index 576df265588..b369d125b30 100644 --- a/spring-core/src/test/java/org/springframework/core/io/buffer/support/DataBufferTestUtilsTests.java +++ b/spring-core/src/test/java/org/springframework/core/io/buffer/support/DataBufferTestUtilsTests.java @@ -20,8 +20,8 @@ import java.nio.charset.StandardCharsets; import org.springframework.core.io.buffer.DataBuffer; import org.springframework.core.io.buffer.DataBufferFactory; -import org.springframework.core.test.fixtures.io.buffer.AbstractDataBufferAllocatingTests; -import org.springframework.core.test.fixtures.io.buffer.DataBufferTestUtils; +import org.springframework.core.testfixture.io.buffer.AbstractDataBufferAllocatingTests; +import org.springframework.core.testfixture.io.buffer.DataBufferTestUtils; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-core/src/test/java/org/springframework/core/test/fixtures/TestGroupParsingTests.java b/spring-core/src/test/java/org/springframework/core/testfixture/TestGroupParsingTests.java similarity index 98% rename from spring-core/src/test/java/org/springframework/core/test/fixtures/TestGroupParsingTests.java rename to spring-core/src/test/java/org/springframework/core/testfixture/TestGroupParsingTests.java index 097fd19c8c7..76f427d38c6 100644 --- a/spring-core/src/test/java/org/springframework/core/test/fixtures/TestGroupParsingTests.java +++ b/spring-core/src/test/java/org/springframework/core/testfixture/TestGroupParsingTests.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.core.test.fixtures; +package org.springframework.core.testfixture; import java.util.Collections; import java.util.EnumSet; diff --git a/spring-core/src/test/java/org/springframework/core/test/fixtures/TestGroupTests.java b/spring-core/src/test/java/org/springframework/core/testfixture/TestGroupTests.java similarity index 95% rename from spring-core/src/test/java/org/springframework/core/test/fixtures/TestGroupTests.java rename to spring-core/src/test/java/org/springframework/core/testfixture/TestGroupTests.java index 84eda4984c5..af9d829dae7 100644 --- a/spring-core/src/test/java/org/springframework/core/test/fixtures/TestGroupTests.java +++ b/spring-core/src/test/java/org/springframework/core/testfixture/TestGroupTests.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.core.test.fixtures; +package org.springframework.core.testfixture; import java.util.Arrays; import java.util.Set; @@ -30,8 +30,8 @@ import static org.assertj.core.api.Assertions.assertThatCode; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; import static org.assertj.core.api.Assertions.assertThatIllegalStateException; import static org.junit.jupiter.api.Assumptions.assumeTrue; -import static org.springframework.core.test.fixtures.TestGroup.LONG_RUNNING; -import static org.springframework.core.test.fixtures.TestGroup.PERFORMANCE; +import static org.springframework.core.testfixture.TestGroup.LONG_RUNNING; +import static org.springframework.core.testfixture.TestGroup.PERFORMANCE; /** * Tests for {@link TestGroup}. diff --git a/spring-core/src/test/java/org/springframework/core/type/AnnotationMetadataTests.java b/spring-core/src/test/java/org/springframework/core/type/AnnotationMetadataTests.java index 0881e55de54..f1342883bca 100644 --- a/spring-core/src/test/java/org/springframework/core/type/AnnotationMetadataTests.java +++ b/spring-core/src/test/java/org/springframework/core/type/AnnotationMetadataTests.java @@ -33,7 +33,7 @@ import org.junit.jupiter.api.Test; import org.springframework.core.annotation.AliasFor; import org.springframework.core.annotation.AnnotationAttributes; -import org.springframework.core.test.fixtures.stereotype.Component; +import org.springframework.core.testfixture.stereotype.Component; import org.springframework.core.type.classreading.MetadataReader; import org.springframework.core.type.classreading.MetadataReaderFactory; import org.springframework.core.type.classreading.SimpleMetadataReaderFactory; diff --git a/spring-core/src/test/java/org/springframework/core/type/AnnotationTypeFilterTests.java b/spring-core/src/test/java/org/springframework/core/type/AnnotationTypeFilterTests.java index d1c7d1652f6..1550c9d7c7b 100644 --- a/spring-core/src/test/java/org/springframework/core/type/AnnotationTypeFilterTests.java +++ b/spring-core/src/test/java/org/springframework/core/type/AnnotationTypeFilterTests.java @@ -21,7 +21,7 @@ import example.type.InheritedAnnotation; import example.type.NonInheritedAnnotation; import org.junit.jupiter.api.Test; -import org.springframework.core.test.fixtures.stereotype.Component; +import org.springframework.core.testfixture.stereotype.Component; import org.springframework.core.type.classreading.MetadataReader; import org.springframework.core.type.classreading.MetadataReaderFactory; import org.springframework.core.type.classreading.SimpleMetadataReaderFactory; diff --git a/spring-core/src/test/java/org/springframework/core/type/AspectJTypeFilterTests.java b/spring-core/src/test/java/org/springframework/core/type/AspectJTypeFilterTests.java index a3dfed9fcc9..a356881775a 100644 --- a/spring-core/src/test/java/org/springframework/core/type/AspectJTypeFilterTests.java +++ b/spring-core/src/test/java/org/springframework/core/type/AspectJTypeFilterTests.java @@ -88,7 +88,7 @@ class AspectJTypeFilterTests { @Test void annotationPatternMatches() throws Exception { assertMatch("example.type.AspectJTypeFilterTestsTypes$SomeClassAnnotatedWithComponent", - "@org.springframework.core.test.fixtures.stereotype.Component *..*"); + "@org.springframework.core.testfixture.stereotype.Component *..*"); assertMatch("example.type.AspectJTypeFilterTestsTypes$SomeClassAnnotatedWithComponent", "@* *..*"); assertMatch("example.type.AspectJTypeFilterTestsTypes$SomeClassAnnotatedWithComponent", @@ -96,9 +96,9 @@ class AspectJTypeFilterTests { assertMatch("example.type.AspectJTypeFilterTestsTypes$SomeClassAnnotatedWithComponent", "@*..*Component *..*"); assertMatch("example.type.AspectJTypeFilterTestsTypes$SomeClassAnnotatedWithComponent", - "@org.springframework.core.test.fixtures.stereotype.Component *..*Component"); + "@org.springframework.core.testfixture.stereotype.Component *..*Component"); assertMatch("example.type.AspectJTypeFilterTestsTypes$SomeClassAnnotatedWithComponent", - "@org.springframework.core.test.fixtures.stereotype.Component *"); + "@org.springframework.core.testfixture.stereotype.Component *"); } @Test diff --git a/spring-core/src/test/java/org/springframework/core/type/CachingMetadataReaderLeakTests.java b/spring-core/src/test/java/org/springframework/core/type/CachingMetadataReaderLeakTests.java index 405a742034b..89421fe9053 100644 --- a/spring-core/src/test/java/org/springframework/core/type/CachingMetadataReaderLeakTests.java +++ b/spring-core/src/test/java/org/springframework/core/type/CachingMetadataReaderLeakTests.java @@ -22,13 +22,13 @@ import org.junit.jupiter.api.Test; import org.springframework.core.io.Resource; import org.springframework.core.io.UrlResource; -import org.springframework.core.test.fixtures.EnabledForTestGroups; +import org.springframework.core.testfixture.EnabledForTestGroups; import org.springframework.core.type.classreading.CachingMetadataReaderFactory; import org.springframework.core.type.classreading.MetadataReader; import org.springframework.core.type.classreading.MetadataReaderFactory; import static org.assertj.core.api.Assertions.assertThat; -import static org.springframework.core.test.fixtures.TestGroup.LONG_RUNNING; +import static org.springframework.core.testfixture.TestGroup.LONG_RUNNING; /** * Unit tests for checking the behaviour of {@link CachingMetadataReaderFactory} under diff --git a/spring-core/src/test/java/org/springframework/util/AutoPopulatingListTests.java b/spring-core/src/test/java/org/springframework/util/AutoPopulatingListTests.java index 416ad92d2db..00e65b3f074 100644 --- a/spring-core/src/test/java/org/springframework/util/AutoPopulatingListTests.java +++ b/spring-core/src/test/java/org/springframework/util/AutoPopulatingListTests.java @@ -20,7 +20,7 @@ import java.util.LinkedList; import org.junit.jupiter.api.Test; -import org.springframework.core.test.fixtures.io.SerializationTestUtils; +import org.springframework.core.testfixture.io.SerializationTestUtils; import org.springframework.tests.sample.objects.TestObject; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-core/src/test/java/org/springframework/util/ReflectionUtilsTests.java b/spring-core/src/test/java/org/springframework/util/ReflectionUtilsTests.java index 4bef1397a21..f9ed283756b 100644 --- a/spring-core/src/test/java/org/springframework/util/ReflectionUtilsTests.java +++ b/spring-core/src/test/java/org/springframework/util/ReflectionUtilsTests.java @@ -27,12 +27,12 @@ import java.util.List; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -import org.springframework.core.test.fixtures.EnabledForTestGroups; +import org.springframework.core.testfixture.EnabledForTestGroups; import org.springframework.tests.sample.objects.TestObject; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException; -import static org.springframework.core.test.fixtures.TestGroup.PERFORMANCE; +import static org.springframework.core.testfixture.TestGroup.PERFORMANCE; /** * @author Rob Harrop diff --git a/spring-core/src/test/java/org/springframework/util/xml/AbstractStaxHandlerTests.java b/spring-core/src/test/java/org/springframework/util/xml/AbstractStaxHandlerTests.java index 2592d12a4a8..76d55709d13 100644 --- a/spring-core/src/test/java/org/springframework/util/xml/AbstractStaxHandlerTests.java +++ b/spring-core/src/test/java/org/springframework/util/xml/AbstractStaxHandlerTests.java @@ -34,7 +34,7 @@ import org.xml.sax.InputSource; import org.xml.sax.XMLReader; import org.xmlunit.util.Predicate; -import org.springframework.core.test.fixtures.xml.XmlContent; +import org.springframework.core.testfixture.xml.XmlContent; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-core/src/test/java/org/springframework/util/xml/DomContentHandlerTests.java b/spring-core/src/test/java/org/springframework/util/xml/DomContentHandlerTests.java index a7fe73634c8..40cef211849 100644 --- a/spring-core/src/test/java/org/springframework/util/xml/DomContentHandlerTests.java +++ b/spring-core/src/test/java/org/springframework/util/xml/DomContentHandlerTests.java @@ -28,7 +28,7 @@ import org.w3c.dom.Element; import org.xml.sax.InputSource; import org.xml.sax.XMLReader; -import org.springframework.core.test.fixtures.xml.XmlContent; +import org.springframework.core.testfixture.xml.XmlContent; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-core/src/test/java/org/springframework/util/xml/ListBasedXMLEventReaderTests.java b/spring-core/src/test/java/org/springframework/util/xml/ListBasedXMLEventReaderTests.java index 0049180a3c5..9ea91f2be76 100644 --- a/spring-core/src/test/java/org/springframework/util/xml/ListBasedXMLEventReaderTests.java +++ b/spring-core/src/test/java/org/springframework/util/xml/ListBasedXMLEventReaderTests.java @@ -30,7 +30,7 @@ import javax.xml.stream.events.XMLEvent; import org.junit.jupiter.api.Test; -import org.springframework.core.test.fixtures.xml.XmlContent; +import org.springframework.core.testfixture.xml.XmlContent; import static javax.xml.stream.XMLStreamConstants.END_DOCUMENT; import static javax.xml.stream.XMLStreamConstants.END_ELEMENT; diff --git a/spring-core/src/test/java/org/springframework/util/xml/StaxResultTests.java b/spring-core/src/test/java/org/springframework/util/xml/StaxResultTests.java index 000307e318c..e284337c723 100644 --- a/spring-core/src/test/java/org/springframework/util/xml/StaxResultTests.java +++ b/spring-core/src/test/java/org/springframework/util/xml/StaxResultTests.java @@ -31,7 +31,7 @@ import javax.xml.transform.stream.StreamSource; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; -import org.springframework.core.test.fixtures.xml.XmlContent; +import org.springframework.core.testfixture.xml.XmlContent; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-core/src/test/java/org/springframework/util/xml/StaxSourceTests.java b/spring-core/src/test/java/org/springframework/util/xml/StaxSourceTests.java index 908dfd3d1b9..dc82a03c392 100644 --- a/spring-core/src/test/java/org/springframework/util/xml/StaxSourceTests.java +++ b/spring-core/src/test/java/org/springframework/util/xml/StaxSourceTests.java @@ -34,7 +34,7 @@ import org.junit.jupiter.api.Test; import org.w3c.dom.Document; import org.xml.sax.InputSource; -import org.springframework.core.test.fixtures.xml.XmlContent; +import org.springframework.core.testfixture.xml.XmlContent; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-core/src/test/java/org/springframework/util/xml/XMLEventStreamReaderTests.java b/spring-core/src/test/java/org/springframework/util/xml/XMLEventStreamReaderTests.java index 7d9719a3473..633a5383701 100644 --- a/spring-core/src/test/java/org/springframework/util/xml/XMLEventStreamReaderTests.java +++ b/spring-core/src/test/java/org/springframework/util/xml/XMLEventStreamReaderTests.java @@ -31,7 +31,7 @@ import org.junit.jupiter.api.Test; import org.w3c.dom.Node; import org.xmlunit.util.Predicate; -import org.springframework.core.test.fixtures.xml.XmlContent; +import org.springframework.core.testfixture.xml.XmlContent; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-core/src/test/java/org/springframework/util/xml/XMLEventStreamWriterTests.java b/spring-core/src/test/java/org/springframework/util/xml/XMLEventStreamWriterTests.java index 7ed978406b4..f09526e7924 100644 --- a/spring-core/src/test/java/org/springframework/util/xml/XMLEventStreamWriterTests.java +++ b/spring-core/src/test/java/org/springframework/util/xml/XMLEventStreamWriterTests.java @@ -27,7 +27,7 @@ import org.junit.jupiter.api.Test; import org.w3c.dom.Node; import org.xmlunit.util.Predicate; -import org.springframework.core.test.fixtures.xml.XmlContent; +import org.springframework.core.testfixture.xml.XmlContent; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/Assume.java b/spring-core/src/testFixtures/java/org/springframework/core/testfixture/Assume.java similarity index 96% rename from spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/Assume.java rename to spring-core/src/testFixtures/java/org/springframework/core/testfixture/Assume.java index 1537f459a2a..83c3dd8d9e9 100644 --- a/spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/Assume.java +++ b/spring-core/src/testFixtures/java/org/springframework/core/testfixture/Assume.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.core.test.fixtures; +package org.springframework.core.testfixture; import org.apache.commons.logging.Log; diff --git a/spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/EnabledForTestGroups.java b/spring-core/src/testFixtures/java/org/springframework/core/testfixture/EnabledForTestGroups.java similarity index 96% rename from spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/EnabledForTestGroups.java rename to spring-core/src/testFixtures/java/org/springframework/core/testfixture/EnabledForTestGroups.java index 5fd5eeab920..490f42811ed 100644 --- a/spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/EnabledForTestGroups.java +++ b/spring-core/src/testFixtures/java/org/springframework/core/testfixture/EnabledForTestGroups.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.core.test.fixtures; +package org.springframework.core.testfixture; import java.lang.annotation.Documented; import java.lang.annotation.ElementType; diff --git a/spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/TestGroup.java b/spring-core/src/testFixtures/java/org/springframework/core/testfixture/TestGroup.java similarity index 98% rename from spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/TestGroup.java rename to spring-core/src/testFixtures/java/org/springframework/core/testfixture/TestGroup.java index 0203908775b..ddad7199207 100644 --- a/spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/TestGroup.java +++ b/spring-core/src/testFixtures/java/org/springframework/core/testfixture/TestGroup.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.core.test.fixtures; +package org.springframework.core.testfixture; import java.util.Collections; import java.util.EnumSet; diff --git a/spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/TestGroupsCondition.java b/spring-core/src/testFixtures/java/org/springframework/core/testfixture/TestGroupsCondition.java similarity index 97% rename from spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/TestGroupsCondition.java rename to spring-core/src/testFixtures/java/org/springframework/core/testfixture/TestGroupsCondition.java index e17d446033c..010f33b7eb1 100644 --- a/spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/TestGroupsCondition.java +++ b/spring-core/src/testFixtures/java/org/springframework/core/testfixture/TestGroupsCondition.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.core.test.fixtures; +package org.springframework.core.testfixture; import java.util.Arrays; import java.util.Optional; diff --git a/spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/TimeStamped.java b/spring-core/src/testFixtures/java/org/springframework/core/testfixture/TimeStamped.java similarity index 95% rename from spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/TimeStamped.java rename to spring-core/src/testFixtures/java/org/springframework/core/testfixture/TimeStamped.java index 27fe1634002..58f45ad8acd 100644 --- a/spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/TimeStamped.java +++ b/spring-core/src/testFixtures/java/org/springframework/core/testfixture/TimeStamped.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.core.test.fixtures; +package org.springframework.core.testfixture; /** * This interface can be implemented by cacheable objects or cache entries, diff --git a/spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/codec/AbstractDecoderTests.java b/spring-core/src/testFixtures/java/org/springframework/core/testfixture/codec/AbstractDecoderTests.java similarity index 99% rename from spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/codec/AbstractDecoderTests.java rename to spring-core/src/testFixtures/java/org/springframework/core/testfixture/codec/AbstractDecoderTests.java index 72fece41b7e..5804d93fa83 100644 --- a/spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/codec/AbstractDecoderTests.java +++ b/spring-core/src/testFixtures/java/org/springframework/core/testfixture/codec/AbstractDecoderTests.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.core.test.fixtures.codec; +package org.springframework.core.testfixture.codec; import java.time.Duration; import java.util.Map; @@ -29,7 +29,7 @@ import reactor.test.StepVerifier; import org.springframework.core.ResolvableType; import org.springframework.core.codec.Decoder; import org.springframework.core.io.buffer.DataBuffer; -import org.springframework.core.test.fixtures.io.buffer.AbstractLeakCheckingTests; +import org.springframework.core.testfixture.io.buffer.AbstractLeakCheckingTests; import org.springframework.lang.Nullable; import org.springframework.util.Assert; import org.springframework.util.MimeType; diff --git a/spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/codec/AbstractEncoderTests.java b/spring-core/src/testFixtures/java/org/springframework/core/testfixture/codec/AbstractEncoderTests.java similarity index 98% rename from spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/codec/AbstractEncoderTests.java rename to spring-core/src/testFixtures/java/org/springframework/core/testfixture/codec/AbstractEncoderTests.java index 33af4bb64b0..09cae0ca19c 100644 --- a/spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/codec/AbstractEncoderTests.java +++ b/spring-core/src/testFixtures/java/org/springframework/core/testfixture/codec/AbstractEncoderTests.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.core.test.fixtures.codec; +package org.springframework.core.testfixture.codec; import java.util.Map; import java.util.function.Consumer; @@ -28,7 +28,7 @@ import org.springframework.core.ResolvableType; import org.springframework.core.codec.Encoder; import org.springframework.core.io.buffer.DataBuffer; import org.springframework.core.io.buffer.DataBufferUtils; -import org.springframework.core.test.fixtures.io.buffer.AbstractLeakCheckingTests; +import org.springframework.core.testfixture.io.buffer.AbstractLeakCheckingTests; import org.springframework.lang.Nullable; import org.springframework.util.Assert; import org.springframework.util.MimeType; diff --git a/spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/env/EnvironmentTestUtils.java b/spring-core/src/testFixtures/java/org/springframework/core/testfixture/env/EnvironmentTestUtils.java similarity index 98% rename from spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/env/EnvironmentTestUtils.java rename to spring-core/src/testFixtures/java/org/springframework/core/testfixture/env/EnvironmentTestUtils.java index 227c70a84b7..8606c47be38 100644 --- a/spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/env/EnvironmentTestUtils.java +++ b/spring-core/src/testFixtures/java/org/springframework/core/testfixture/env/EnvironmentTestUtils.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.core.test.fixtures.env; +package org.springframework.core.testfixture.env; import java.lang.reflect.Field; import java.util.Collections; diff --git a/spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/env/MockPropertySource.java b/spring-core/src/testFixtures/java/org/springframework/core/testfixture/env/MockPropertySource.java similarity index 98% rename from spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/env/MockPropertySource.java rename to spring-core/src/testFixtures/java/org/springframework/core/testfixture/env/MockPropertySource.java index 9037af3d5b8..ae4944ddccb 100644 --- a/spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/env/MockPropertySource.java +++ b/spring-core/src/testFixtures/java/org/springframework/core/testfixture/env/MockPropertySource.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.core.test.fixtures.env; +package org.springframework.core.testfixture.env; import java.util.Properties; diff --git a/spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/io/ResourceTestUtils.java b/spring-core/src/testFixtures/java/org/springframework/core/testfixture/io/ResourceTestUtils.java similarity index 96% rename from spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/io/ResourceTestUtils.java rename to spring-core/src/testFixtures/java/org/springframework/core/testfixture/io/ResourceTestUtils.java index 3925c486876..3542ab5d979 100644 --- a/spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/io/ResourceTestUtils.java +++ b/spring-core/src/testFixtures/java/org/springframework/core/testfixture/io/ResourceTestUtils.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.core.test.fixtures.io; +package org.springframework.core.testfixture.io; import org.springframework.core.io.ClassPathResource; diff --git a/spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/io/SerializationTestUtils.java b/spring-core/src/testFixtures/java/org/springframework/core/testfixture/io/SerializationTestUtils.java similarity index 97% rename from spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/io/SerializationTestUtils.java rename to spring-core/src/testFixtures/java/org/springframework/core/testfixture/io/SerializationTestUtils.java index 798dc834776..8958435aa21 100644 --- a/spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/io/SerializationTestUtils.java +++ b/spring-core/src/testFixtures/java/org/springframework/core/testfixture/io/SerializationTestUtils.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.core.test.fixtures.io; +package org.springframework.core.testfixture.io; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; diff --git a/spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/io/buffer/AbstractDataBufferAllocatingTests.java b/spring-core/src/testFixtures/java/org/springframework/core/testfixture/io/buffer/AbstractDataBufferAllocatingTests.java similarity index 97% rename from spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/io/buffer/AbstractDataBufferAllocatingTests.java rename to spring-core/src/testFixtures/java/org/springframework/core/testfixture/io/buffer/AbstractDataBufferAllocatingTests.java index e8f40a82e1f..5c5ad5f44fa 100644 --- a/spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/io/buffer/AbstractDataBufferAllocatingTests.java +++ b/spring-core/src/testFixtures/java/org/springframework/core/testfixture/io/buffer/AbstractDataBufferAllocatingTests.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.core.test.fixtures.io.buffer; +package org.springframework.core.testfixture.io.buffer; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; @@ -148,7 +148,7 @@ public abstract class AbstractDataBufferAllocatingTests { @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.METHOD) @ParameterizedTest(name = "[{index}] {0}") - @MethodSource("org.springframework.core.test.fixtures.io.buffer.AbstractDataBufferAllocatingTests#dataBufferFactories()") + @MethodSource("org.springframework.core.testfixture.io.buffer.AbstractDataBufferAllocatingTests#dataBufferFactories()") public @interface ParameterizedDataBufferAllocatingTest { } diff --git a/spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/io/buffer/AbstractLeakCheckingTests.java b/spring-core/src/testFixtures/java/org/springframework/core/testfixture/io/buffer/AbstractLeakCheckingTests.java similarity index 96% rename from spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/io/buffer/AbstractLeakCheckingTests.java rename to spring-core/src/testFixtures/java/org/springframework/core/testfixture/io/buffer/AbstractLeakCheckingTests.java index e6b5f3b425a..061cad5f8e3 100644 --- a/spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/io/buffer/AbstractLeakCheckingTests.java +++ b/spring-core/src/testFixtures/java/org/springframework/core/testfixture/io/buffer/AbstractLeakCheckingTests.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.core.test.fixtures.io.buffer; +package org.springframework.core.testfixture.io.buffer; import org.junit.jupiter.api.AfterEach; diff --git a/spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/io/buffer/DataBufferTestUtils.java b/spring-core/src/testFixtures/java/org/springframework/core/testfixture/io/buffer/DataBufferTestUtils.java similarity index 97% rename from spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/io/buffer/DataBufferTestUtils.java rename to spring-core/src/testFixtures/java/org/springframework/core/testfixture/io/buffer/DataBufferTestUtils.java index d66fca19479..2410d07a716 100644 --- a/spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/io/buffer/DataBufferTestUtils.java +++ b/spring-core/src/testFixtures/java/org/springframework/core/testfixture/io/buffer/DataBufferTestUtils.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.core.test.fixtures.io.buffer; +package org.springframework.core.testfixture.io.buffer; import java.nio.charset.Charset; diff --git a/spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/io/buffer/LeakAwareDataBuffer.java b/spring-core/src/testFixtures/java/org/springframework/core/testfixture/io/buffer/LeakAwareDataBuffer.java similarity index 98% rename from spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/io/buffer/LeakAwareDataBuffer.java rename to spring-core/src/testFixtures/java/org/springframework/core/testfixture/io/buffer/LeakAwareDataBuffer.java index cb42a0468e4..f03036f1310 100644 --- a/spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/io/buffer/LeakAwareDataBuffer.java +++ b/spring-core/src/testFixtures/java/org/springframework/core/testfixture/io/buffer/LeakAwareDataBuffer.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.core.test.fixtures.io.buffer; +package org.springframework.core.testfixture.io.buffer; import org.springframework.core.io.buffer.DataBuffer; import org.springframework.core.io.buffer.DataBufferWrapper; diff --git a/spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/io/buffer/LeakAwareDataBufferFactory.java b/spring-core/src/testFixtures/java/org/springframework/core/testfixture/io/buffer/LeakAwareDataBufferFactory.java similarity index 98% rename from spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/io/buffer/LeakAwareDataBufferFactory.java rename to spring-core/src/testFixtures/java/org/springframework/core/testfixture/io/buffer/LeakAwareDataBufferFactory.java index e3c8dced702..29ed5905cd9 100644 --- a/spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/io/buffer/LeakAwareDataBufferFactory.java +++ b/spring-core/src/testFixtures/java/org/springframework/core/testfixture/io/buffer/LeakAwareDataBufferFactory.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.core.test.fixtures.io.buffer; +package org.springframework.core.testfixture.io.buffer; import java.nio.ByteBuffer; import java.time.Duration; diff --git a/spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/stereotype/Component.java b/spring-core/src/testFixtures/java/org/springframework/core/testfixture/stereotype/Component.java similarity index 95% rename from spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/stereotype/Component.java rename to spring-core/src/testFixtures/java/org/springframework/core/testfixture/stereotype/Component.java index 04bf3e0fc7e..15dc1f13f65 100644 --- a/spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/stereotype/Component.java +++ b/spring-core/src/testFixtures/java/org/springframework/core/testfixture/stereotype/Component.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.core.test.fixtures.stereotype; +package org.springframework.core.testfixture.stereotype; import java.lang.annotation.Documented; import java.lang.annotation.ElementType; diff --git a/spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/stereotype/Indexed.java b/spring-core/src/testFixtures/java/org/springframework/core/testfixture/stereotype/Indexed.java similarity index 94% rename from spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/stereotype/Indexed.java rename to spring-core/src/testFixtures/java/org/springframework/core/testfixture/stereotype/Indexed.java index 2da265f6cb7..0f91f76bc36 100644 --- a/spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/stereotype/Indexed.java +++ b/spring-core/src/testFixtures/java/org/springframework/core/testfixture/stereotype/Indexed.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.core.test.fixtures.stereotype; +package org.springframework.core.testfixture.stereotype; import java.lang.annotation.Documented; import java.lang.annotation.ElementType; diff --git a/spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/xml/XmlContent.java b/spring-core/src/testFixtures/java/org/springframework/core/testfixture/xml/XmlContent.java similarity index 96% rename from spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/xml/XmlContent.java rename to spring-core/src/testFixtures/java/org/springframework/core/testfixture/xml/XmlContent.java index becbae6d2c7..94b44912c65 100644 --- a/spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/xml/XmlContent.java +++ b/spring-core/src/testFixtures/java/org/springframework/core/testfixture/xml/XmlContent.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.core.test.fixtures.xml; +package org.springframework.core.testfixture.xml; import java.io.StringWriter; diff --git a/spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/xml/XmlContentAssert.java b/spring-core/src/testFixtures/java/org/springframework/core/testfixture/xml/XmlContentAssert.java similarity index 97% rename from spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/xml/XmlContentAssert.java rename to spring-core/src/testFixtures/java/org/springframework/core/testfixture/xml/XmlContentAssert.java index c76d1cb3a5c..6e05f820812 100644 --- a/spring-core/src/testFixtures/java/org/springframework/core/test/fixtures/xml/XmlContentAssert.java +++ b/spring-core/src/testFixtures/java/org/springframework/core/testfixture/xml/XmlContentAssert.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.core.test.fixtures.xml; +package org.springframework.core.testfixture.xml; import org.assertj.core.api.AbstractAssert; import org.w3c.dom.Node; diff --git a/spring-expression/src/test/java/org/springframework/expression/spel/MapAccessTests.java b/spring-expression/src/test/java/org/springframework/expression/spel/MapAccessTests.java index a18114da24d..40a6fa7cb25 100644 --- a/spring-expression/src/test/java/org/springframework/expression/spel/MapAccessTests.java +++ b/spring-expression/src/test/java/org/springframework/expression/spel/MapAccessTests.java @@ -21,7 +21,7 @@ import java.util.Map; import org.junit.jupiter.api.Test; -import org.springframework.core.test.fixtures.EnabledForTestGroups; +import org.springframework.core.testfixture.EnabledForTestGroups; import org.springframework.expression.AccessException; import org.springframework.expression.EvaluationContext; import org.springframework.expression.Expression; @@ -33,7 +33,7 @@ import org.springframework.expression.spel.support.StandardEvaluationContext; import org.springframework.util.StopWatch; import static org.assertj.core.api.Assertions.assertThat; -import static org.springframework.core.test.fixtures.TestGroup.PERFORMANCE; +import static org.springframework.core.testfixture.TestGroup.PERFORMANCE; /** * Testing variations on map access. diff --git a/spring-expression/src/test/java/org/springframework/expression/spel/PerformanceTests.java b/spring-expression/src/test/java/org/springframework/expression/spel/PerformanceTests.java index b1cbb7f0aa6..164e849f9f3 100644 --- a/spring-expression/src/test/java/org/springframework/expression/spel/PerformanceTests.java +++ b/spring-expression/src/test/java/org/springframework/expression/spel/PerformanceTests.java @@ -18,7 +18,7 @@ package org.springframework.expression.spel; import org.junit.jupiter.api.Test; -import org.springframework.core.test.fixtures.EnabledForTestGroups; +import org.springframework.core.testfixture.EnabledForTestGroups; import org.springframework.expression.EvaluationContext; import org.springframework.expression.Expression; import org.springframework.expression.ExpressionParser; @@ -26,7 +26,7 @@ import org.springframework.expression.spel.standard.SpelExpressionParser; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.fail; -import static org.springframework.core.test.fixtures.TestGroup.PERFORMANCE; +import static org.springframework.core.testfixture.TestGroup.PERFORMANCE; ///CLOVER:OFF diff --git a/spring-jdbc/src/test/java/org/springframework/jdbc/config/JdbcNamespaceIntegrationTests.java b/spring-jdbc/src/test/java/org/springframework/jdbc/config/JdbcNamespaceIntegrationTests.java index ad5e78c6cf9..cf3d4b8a9f4 100644 --- a/spring-jdbc/src/test/java/org/springframework/jdbc/config/JdbcNamespaceIntegrationTests.java +++ b/spring-jdbc/src/test/java/org/springframework/jdbc/config/JdbcNamespaceIntegrationTests.java @@ -29,7 +29,7 @@ import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; import org.springframework.context.ConfigurableApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; import org.springframework.core.io.ClassPathResource; -import org.springframework.core.test.fixtures.EnabledForTestGroups; +import org.springframework.core.testfixture.EnabledForTestGroups; import org.springframework.jdbc.BadSqlGrammarException; import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.jdbc.datasource.AbstractDriverBasedDataSource; @@ -38,7 +38,7 @@ import org.springframework.jdbc.datasource.init.DataSourceInitializer; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; -import static org.springframework.core.test.fixtures.TestGroup.LONG_RUNNING; +import static org.springframework.core.testfixture.TestGroup.LONG_RUNNING; import static org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseFactory.DEFAULT_DATABASE_NAME; /** diff --git a/spring-jdbc/src/test/java/org/springframework/jdbc/datasource/DataSourceTransactionManagerTests.java b/spring-jdbc/src/test/java/org/springframework/jdbc/datasource/DataSourceTransactionManagerTests.java index 919f4b17dab..0b401b2a87c 100644 --- a/spring-jdbc/src/test/java/org/springframework/jdbc/datasource/DataSourceTransactionManagerTests.java +++ b/spring-jdbc/src/test/java/org/springframework/jdbc/datasource/DataSourceTransactionManagerTests.java @@ -30,7 +30,7 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.mockito.InOrder; -import org.springframework.core.test.fixtures.EnabledForTestGroups; +import org.springframework.core.testfixture.EnabledForTestGroups; import org.springframework.dao.DataAccessResourceFailureException; import org.springframework.jdbc.UncategorizedSQLException; import org.springframework.transaction.CannotCreateTransactionException; @@ -58,7 +58,7 @@ import static org.mockito.Mockito.inOrder; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; -import static org.springframework.core.test.fixtures.TestGroup.PERFORMANCE; +import static org.springframework.core.testfixture.TestGroup.PERFORMANCE; /** * @author Juergen Hoeller diff --git a/spring-messaging/src/test/java/org/springframework/messaging/MessageHeadersTests.java b/spring-messaging/src/test/java/org/springframework/messaging/MessageHeadersTests.java index 088a53804c4..8e207444f1f 100644 --- a/spring-messaging/src/test/java/org/springframework/messaging/MessageHeadersTests.java +++ b/spring-messaging/src/test/java/org/springframework/messaging/MessageHeadersTests.java @@ -25,7 +25,7 @@ import java.util.concurrent.atomic.AtomicLong; import org.junit.jupiter.api.Test; -import org.springframework.core.test.fixtures.io.SerializationTestUtils; +import org.springframework.core.testfixture.io.SerializationTestUtils; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException; diff --git a/spring-messaging/src/test/java/org/springframework/messaging/converter/MarshallingMessageConverterTests.java b/spring-messaging/src/test/java/org/springframework/messaging/converter/MarshallingMessageConverterTests.java index 8f256aa5077..a676edb99b1 100644 --- a/spring-messaging/src/test/java/org/springframework/messaging/converter/MarshallingMessageConverterTests.java +++ b/spring-messaging/src/test/java/org/springframework/messaging/converter/MarshallingMessageConverterTests.java @@ -25,7 +25,7 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.xmlunit.diff.DifferenceEvaluator; -import org.springframework.core.test.fixtures.xml.XmlContent; +import org.springframework.core.testfixture.xml.XmlContent; import org.springframework.messaging.Message; import org.springframework.messaging.support.MessageBuilder; import org.springframework.oxm.jaxb.Jaxb2Marshaller; diff --git a/spring-messaging/src/test/java/org/springframework/messaging/handler/invocation/reactive/TestEncoderMethodReturnValueHandler.java b/spring-messaging/src/test/java/org/springframework/messaging/handler/invocation/reactive/TestEncoderMethodReturnValueHandler.java index ed40c25a9dd..50bb018c1ac 100644 --- a/spring-messaging/src/test/java/org/springframework/messaging/handler/invocation/reactive/TestEncoderMethodReturnValueHandler.java +++ b/spring-messaging/src/test/java/org/springframework/messaging/handler/invocation/reactive/TestEncoderMethodReturnValueHandler.java @@ -24,7 +24,7 @@ import org.springframework.core.MethodParameter; import org.springframework.core.ReactiveAdapterRegistry; import org.springframework.core.codec.Encoder; import org.springframework.core.io.buffer.DataBuffer; -import org.springframework.core.test.fixtures.io.buffer.DataBufferTestUtils; +import org.springframework.core.testfixture.io.buffer.DataBufferTestUtils; import org.springframework.messaging.Message; import static java.nio.charset.StandardCharsets.UTF_8; diff --git a/spring-messaging/src/test/java/org/springframework/messaging/rsocket/LeakAwareNettyDataBufferFactory.java b/spring-messaging/src/test/java/org/springframework/messaging/rsocket/LeakAwareNettyDataBufferFactory.java index 762ba52151b..1f2e9271fa9 100644 --- a/spring-messaging/src/test/java/org/springframework/messaging/rsocket/LeakAwareNettyDataBufferFactory.java +++ b/spring-messaging/src/test/java/org/springframework/messaging/rsocket/LeakAwareNettyDataBufferFactory.java @@ -31,7 +31,7 @@ import org.springframework.core.io.buffer.PooledDataBuffer; import org.springframework.util.ObjectUtils; /** - * Unlike {@link org.springframework.core.test.fixtures.io.buffer.LeakAwareDataBufferFactory} + * Unlike {@link org.springframework.core.testfixture.io.buffer.LeakAwareDataBufferFactory} * this one is an instance of {@link NettyDataBufferFactory} which is necessary * since {@link PayloadUtils} does instanceof checks, and that also allows * intercepting {@link NettyDataBufferFactory#wrap(ByteBuf)}. diff --git a/spring-messaging/src/test/java/org/springframework/messaging/rsocket/MetadataEncoderTests.java b/spring-messaging/src/test/java/org/springframework/messaging/rsocket/MetadataEncoderTests.java index 23d73df77ab..6a8e84a32f1 100644 --- a/spring-messaging/src/test/java/org/springframework/messaging/rsocket/MetadataEncoderTests.java +++ b/spring-messaging/src/test/java/org/springframework/messaging/rsocket/MetadataEncoderTests.java @@ -33,7 +33,7 @@ import org.springframework.core.io.buffer.DataBuffer; import org.springframework.core.io.buffer.DefaultDataBufferFactory; import org.springframework.core.io.buffer.NettyDataBuffer; import org.springframework.core.io.buffer.NettyDataBufferFactory; -import org.springframework.core.test.fixtures.io.buffer.DataBufferTestUtils; +import org.springframework.core.testfixture.io.buffer.DataBufferTestUtils; import org.springframework.util.MimeType; import org.springframework.util.MimeTypeUtils; diff --git a/spring-messaging/src/test/java/org/springframework/messaging/rsocket/PayloadUtilsTests.java b/spring-messaging/src/test/java/org/springframework/messaging/rsocket/PayloadUtilsTests.java index f368ce74577..ddeca0ddeb7 100644 --- a/spring-messaging/src/test/java/org/springframework/messaging/rsocket/PayloadUtilsTests.java +++ b/spring-messaging/src/test/java/org/springframework/messaging/rsocket/PayloadUtilsTests.java @@ -30,7 +30,7 @@ import org.springframework.core.io.buffer.DataBufferUtils; import org.springframework.core.io.buffer.DefaultDataBuffer; import org.springframework.core.io.buffer.DefaultDataBufferFactory; import org.springframework.core.io.buffer.NettyDataBuffer; -import org.springframework.core.test.fixtures.io.buffer.DataBufferTestUtils; +import org.springframework.core.testfixture.io.buffer.DataBufferTestUtils; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-messaging/src/test/java/org/springframework/messaging/support/MessageHeaderAccessorTests.java b/spring-messaging/src/test/java/org/springframework/messaging/support/MessageHeaderAccessorTests.java index 3d59175823a..937bdaef4c4 100644 --- a/spring-messaging/src/test/java/org/springframework/messaging/support/MessageHeaderAccessorTests.java +++ b/spring-messaging/src/test/java/org/springframework/messaging/support/MessageHeaderAccessorTests.java @@ -24,7 +24,7 @@ import java.util.UUID; import org.junit.jupiter.api.Test; -import org.springframework.core.test.fixtures.io.SerializationTestUtils; +import org.springframework.core.testfixture.io.SerializationTestUtils; import org.springframework.messaging.Message; import org.springframework.messaging.MessageHeaders; import org.springframework.util.MimeTypeUtils; diff --git a/spring-orm/src/test/java/org/springframework/orm/jpa/AbstractContainerEntityManagerFactoryIntegrationTests.java b/spring-orm/src/test/java/org/springframework/orm/jpa/AbstractContainerEntityManagerFactoryIntegrationTests.java index 51ffa961aa3..15c27ccc5f0 100644 --- a/spring-orm/src/test/java/org/springframework/orm/jpa/AbstractContainerEntityManagerFactoryIntegrationTests.java +++ b/spring-orm/src/test/java/org/springframework/orm/jpa/AbstractContainerEntityManagerFactoryIntegrationTests.java @@ -26,7 +26,7 @@ import javax.persistence.Query; import org.junit.jupiter.api.Test; -import org.springframework.core.test.fixtures.io.SerializationTestUtils; +import org.springframework.core.testfixture.io.SerializationTestUtils; import org.springframework.orm.jpa.domain.DriversLicense; import org.springframework.orm.jpa.domain.Person; diff --git a/spring-orm/src/test/java/org/springframework/orm/jpa/LocalContainerEntityManagerFactoryBeanTests.java b/spring-orm/src/test/java/org/springframework/orm/jpa/LocalContainerEntityManagerFactoryBeanTests.java index 23fb944acef..a2495d2267c 100644 --- a/spring-orm/src/test/java/org/springframework/orm/jpa/LocalContainerEntityManagerFactoryBeanTests.java +++ b/spring-orm/src/test/java/org/springframework/orm/jpa/LocalContainerEntityManagerFactoryBeanTests.java @@ -32,7 +32,7 @@ import javax.persistence.spi.ProviderUtil; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.support.DefaultListableBeanFactory; -import org.springframework.core.test.fixtures.io.SerializationTestUtils; +import org.springframework.core.testfixture.io.SerializationTestUtils; import org.springframework.dao.DataAccessException; import org.springframework.dao.OptimisticLockingFailureException; import org.springframework.instrument.classloading.InstrumentationLoadTimeWeaver; diff --git a/spring-orm/src/test/java/org/springframework/orm/jpa/support/PersistenceInjectionTests.java b/spring-orm/src/test/java/org/springframework/orm/jpa/support/PersistenceInjectionTests.java index 885e22d77c3..9409e437cec 100644 --- a/spring-orm/src/test/java/org/springframework/orm/jpa/support/PersistenceInjectionTests.java +++ b/spring-orm/src/test/java/org/springframework/orm/jpa/support/PersistenceInjectionTests.java @@ -39,7 +39,7 @@ import org.springframework.beans.factory.support.RootBeanDefinition; import org.springframework.context.support.GenericApplicationContext; import org.springframework.context.test.fixtures.SimpleMapScope; import org.springframework.context.test.fixtures.jndi.ExpectedLookupTemplate; -import org.springframework.core.test.fixtures.io.SerializationTestUtils; +import org.springframework.core.testfixture.io.SerializationTestUtils; import org.springframework.lang.Nullable; import org.springframework.orm.jpa.AbstractEntityManagerFactoryBeanTests; import org.springframework.orm.jpa.DefaultJpaDialect; diff --git a/spring-oxm/src/test/java/org/springframework/oxm/AbstractMarshallerTests.java b/spring-oxm/src/test/java/org/springframework/oxm/AbstractMarshallerTests.java index 6dd6a91f1f7..d6a539691cd 100644 --- a/spring-oxm/src/test/java/org/springframework/oxm/AbstractMarshallerTests.java +++ b/spring-oxm/src/test/java/org/springframework/oxm/AbstractMarshallerTests.java @@ -36,7 +36,7 @@ import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Text; -import org.springframework.core.test.fixtures.xml.XmlContent; +import org.springframework.core.testfixture.xml.XmlContent; import org.springframework.util.xml.StaxUtils; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-oxm/src/test/java/org/springframework/oxm/jaxb/Jaxb2MarshallerTests.java b/spring-oxm/src/test/java/org/springframework/oxm/jaxb/Jaxb2MarshallerTests.java index 2dc7d433610..be10b7fecdb 100644 --- a/spring-oxm/src/test/java/org/springframework/oxm/jaxb/Jaxb2MarshallerTests.java +++ b/spring-oxm/src/test/java/org/springframework/oxm/jaxb/Jaxb2MarshallerTests.java @@ -46,7 +46,7 @@ import org.xmlunit.diff.DifferenceEvaluator; import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.Resource; -import org.springframework.core.test.fixtures.xml.XmlContent; +import org.springframework.core.testfixture.xml.XmlContent; import org.springframework.oxm.AbstractMarshallerTests; import org.springframework.oxm.UncategorizedMappingException; import org.springframework.oxm.XmlMappingException; diff --git a/spring-oxm/src/test/java/org/springframework/oxm/jibx/JibxMarshallerTests.java b/spring-oxm/src/test/java/org/springframework/oxm/jibx/JibxMarshallerTests.java index 6a904c2dd7d..6ed3d7102d5 100644 --- a/spring-oxm/src/test/java/org/springframework/oxm/jibx/JibxMarshallerTests.java +++ b/spring-oxm/src/test/java/org/springframework/oxm/jibx/JibxMarshallerTests.java @@ -23,7 +23,7 @@ import javax.xml.transform.stream.StreamResult; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.condition.EnabledOnJre; -import org.springframework.core.test.fixtures.xml.XmlContent; +import org.springframework.core.testfixture.xml.XmlContent; import org.springframework.oxm.AbstractMarshallerTests; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-oxm/src/test/java/org/springframework/oxm/xstream/XStreamMarshallerTests.java b/spring-oxm/src/test/java/org/springframework/oxm/xstream/XStreamMarshallerTests.java index c57a3045547..5d06efc4f4c 100644 --- a/spring-oxm/src/test/java/org/springframework/oxm/xstream/XStreamMarshallerTests.java +++ b/spring-oxm/src/test/java/org/springframework/oxm/xstream/XStreamMarshallerTests.java @@ -56,7 +56,7 @@ import org.xml.sax.ContentHandler; import org.xmlunit.builder.Input; import org.xmlunit.xpath.JAXPXPathEngine; -import org.springframework.core.test.fixtures.xml.XmlContent; +import org.springframework.core.testfixture.xml.XmlContent; import org.springframework.util.xml.StaxUtils; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/concurrency/SpringJUnit4ConcurrencyTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/concurrency/SpringJUnit4ConcurrencyTests.java index 5075ccd9f6e..ee61b3ebeff 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/concurrency/SpringJUnit4ConcurrencyTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/concurrency/SpringJUnit4ConcurrencyTests.java @@ -24,7 +24,7 @@ import org.junit.Ignore; import org.junit.Test; import org.junit.experimental.ParallelComputer; -import org.springframework.core.test.fixtures.TestGroup; +import org.springframework.core.testfixture.TestGroup; import org.springframework.test.context.junit4.InheritedConfigSpringJUnit4ClassRunnerAppCtxTests; import org.springframework.test.context.junit4.MethodLevelTransactionalSpringRunnerTests; import org.springframework.test.context.junit4.SpringJUnit47ClassRunnerRuleTests; diff --git a/spring-test/src/test/java/org/springframework/test/web/reactive/server/HttpHandlerConnectorTests.java b/spring-test/src/test/java/org/springframework/test/web/reactive/server/HttpHandlerConnectorTests.java index 08c0948f33e..17c04a82542 100644 --- a/spring-test/src/test/java/org/springframework/test/web/reactive/server/HttpHandlerConnectorTests.java +++ b/spring-test/src/test/java/org/springframework/test/web/reactive/server/HttpHandlerConnectorTests.java @@ -28,7 +28,7 @@ import reactor.core.scheduler.Schedulers; import org.springframework.core.io.buffer.DataBuffer; import org.springframework.core.io.buffer.DefaultDataBufferFactory; -import org.springframework.core.test.fixtures.io.buffer.DataBufferTestUtils; +import org.springframework.core.testfixture.io.buffer.DataBufferTestUtils; import org.springframework.http.HttpCookie; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpMethod; diff --git a/spring-test/src/test/java/org/springframework/test/web/servlet/htmlunit/DelegatingWebConnectionTests.java b/spring-test/src/test/java/org/springframework/test/web/servlet/htmlunit/DelegatingWebConnectionTests.java index c5fae22e884..229faa1aa4f 100644 --- a/spring-test/src/test/java/org/springframework/test/web/servlet/htmlunit/DelegatingWebConnectionTests.java +++ b/spring-test/src/test/java/org/springframework/test/web/servlet/htmlunit/DelegatingWebConnectionTests.java @@ -32,7 +32,7 @@ import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; -import org.springframework.core.test.fixtures.EnabledForTestGroups; +import org.springframework.core.testfixture.EnabledForTestGroups; import org.springframework.stereotype.Controller; import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.htmlunit.DelegatingWebConnection.DelegateWebConnection; @@ -42,7 +42,7 @@ import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.BDDMockito.given; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.verifyNoMoreInteractions; -import static org.springframework.core.test.fixtures.TestGroup.PERFORMANCE; +import static org.springframework.core.testfixture.TestGroup.PERFORMANCE; /** * Unit and integration tests for {@link DelegatingWebConnection}. diff --git a/spring-test/src/test/java/org/springframework/test/web/servlet/htmlunit/MockMvcWebClientBuilderTests.java b/spring-test/src/test/java/org/springframework/test/web/servlet/htmlunit/MockMvcWebClientBuilderTests.java index 981e25d01a4..bd74b3d6f08 100644 --- a/spring-test/src/test/java/org/springframework/test/web/servlet/htmlunit/MockMvcWebClientBuilderTests.java +++ b/spring-test/src/test/java/org/springframework/test/web/servlet/htmlunit/MockMvcWebClientBuilderTests.java @@ -30,7 +30,7 @@ import com.gargoylesoftware.htmlunit.util.Cookie; import org.junit.jupiter.api.Test; import org.springframework.context.annotation.Configuration; -import org.springframework.core.test.fixtures.TestGroup; +import org.springframework.core.testfixture.TestGroup; import org.springframework.test.context.junit.jupiter.web.SpringJUnitWebConfig; import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.setup.MockMvcBuilders; diff --git a/spring-test/src/test/java/org/springframework/test/web/servlet/htmlunit/webdriver/MockMvcHtmlUnitDriverBuilderTests.java b/spring-test/src/test/java/org/springframework/test/web/servlet/htmlunit/webdriver/MockMvcHtmlUnitDriverBuilderTests.java index 16670b908bd..8c8146d0991 100644 --- a/spring-test/src/test/java/org/springframework/test/web/servlet/htmlunit/webdriver/MockMvcHtmlUnitDriverBuilderTests.java +++ b/spring-test/src/test/java/org/springframework/test/web/servlet/htmlunit/webdriver/MockMvcHtmlUnitDriverBuilderTests.java @@ -25,7 +25,7 @@ import org.junit.jupiter.api.Test; import org.openqa.selenium.htmlunit.HtmlUnitDriver; import org.springframework.context.annotation.Configuration; -import org.springframework.core.test.fixtures.TestGroup; +import org.springframework.core.testfixture.TestGroup; import org.springframework.test.context.junit.jupiter.web.SpringJUnitWebConfig; import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.setup.MockMvcBuilders; diff --git a/spring-tx/src/test/java/org/springframework/transaction/annotation/AnnotationTransactionAttributeSourceTests.java b/spring-tx/src/test/java/org/springframework/transaction/annotation/AnnotationTransactionAttributeSourceTests.java index 62ecf10fd5f..bb869e84744 100644 --- a/spring-tx/src/test/java/org/springframework/transaction/annotation/AnnotationTransactionAttributeSourceTests.java +++ b/spring-tx/src/test/java/org/springframework/transaction/annotation/AnnotationTransactionAttributeSourceTests.java @@ -31,7 +31,7 @@ import org.junit.jupiter.api.Test; import org.springframework.aop.framework.Advised; import org.springframework.aop.framework.ProxyFactory; import org.springframework.core.annotation.AnnotationUtils; -import org.springframework.core.test.fixtures.io.SerializationTestUtils; +import org.springframework.core.testfixture.io.SerializationTestUtils; import org.springframework.tests.transaction.CallCountingTransactionManager; import org.springframework.transaction.interceptor.NoRollbackRuleAttribute; import org.springframework.transaction.interceptor.RollbackRuleAttribute; diff --git a/spring-tx/src/test/java/org/springframework/transaction/config/AnnotationDrivenTests.java b/spring-tx/src/test/java/org/springframework/transaction/config/AnnotationDrivenTests.java index 114348dcbcb..5760d3b351a 100644 --- a/spring-tx/src/test/java/org/springframework/transaction/config/AnnotationDrivenTests.java +++ b/spring-tx/src/test/java/org/springframework/transaction/config/AnnotationDrivenTests.java @@ -27,7 +27,7 @@ import org.springframework.beans.factory.support.RootBeanDefinition; import org.springframework.context.ApplicationContext; import org.springframework.context.annotation.AnnotationConfigApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; -import org.springframework.core.test.fixtures.io.SerializationTestUtils; +import org.springframework.core.testfixture.io.SerializationTestUtils; import org.springframework.tests.transaction.CallCountingTransactionManager; import org.springframework.transaction.support.TransactionSynchronizationManager; diff --git a/spring-tx/src/test/java/org/springframework/transaction/interceptor/TransactionAttributeSourceAdvisorTests.java b/spring-tx/src/test/java/org/springframework/transaction/interceptor/TransactionAttributeSourceAdvisorTests.java index dc4d69b840b..c0900611d59 100644 --- a/spring-tx/src/test/java/org/springframework/transaction/interceptor/TransactionAttributeSourceAdvisorTests.java +++ b/spring-tx/src/test/java/org/springframework/transaction/interceptor/TransactionAttributeSourceAdvisorTests.java @@ -20,7 +20,7 @@ import java.util.Properties; import org.junit.jupiter.api.Test; -import org.springframework.core.test.fixtures.io.SerializationTestUtils; +import org.springframework.core.testfixture.io.SerializationTestUtils; /** * @author Rod Johnson diff --git a/spring-tx/src/test/java/org/springframework/transaction/interceptor/TransactionInterceptorTests.java b/spring-tx/src/test/java/org/springframework/transaction/interceptor/TransactionInterceptorTests.java index 5eb598d6688..c870022cc2f 100644 --- a/spring-tx/src/test/java/org/springframework/transaction/interceptor/TransactionInterceptorTests.java +++ b/spring-tx/src/test/java/org/springframework/transaction/interceptor/TransactionInterceptorTests.java @@ -24,7 +24,7 @@ import org.junit.jupiter.api.Test; import org.springframework.aop.framework.ProxyFactory; import org.springframework.beans.factory.BeanFactory; import org.springframework.beans.factory.NoSuchBeanDefinitionException; -import org.springframework.core.test.fixtures.io.SerializationTestUtils; +import org.springframework.core.testfixture.io.SerializationTestUtils; import org.springframework.lang.Nullable; import org.springframework.transaction.PlatformTransactionManager; import org.springframework.transaction.TransactionDefinition; diff --git a/spring-tx/src/test/java/org/springframework/transaction/support/JtaTransactionManagerSerializationTests.java b/spring-tx/src/test/java/org/springframework/transaction/support/JtaTransactionManagerSerializationTests.java index 5b07c460bd6..be9f8e6b43d 100644 --- a/spring-tx/src/test/java/org/springframework/transaction/support/JtaTransactionManagerSerializationTests.java +++ b/spring-tx/src/test/java/org/springframework/transaction/support/JtaTransactionManagerSerializationTests.java @@ -22,7 +22,7 @@ import javax.transaction.UserTransaction; import org.junit.jupiter.api.Test; import org.springframework.context.test.fixtures.jndi.SimpleNamingContextBuilder; -import org.springframework.core.test.fixtures.io.SerializationTestUtils; +import org.springframework.core.testfixture.io.SerializationTestUtils; import org.springframework.transaction.jta.JtaTransactionManager; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-web/src/test/java/org/springframework/http/codec/CancelWithoutDemandCodecTests.java b/spring-web/src/test/java/org/springframework/http/codec/CancelWithoutDemandCodecTests.java index 22a30a2af02..2bb2e8c6fa4 100644 --- a/spring-web/src/test/java/org/springframework/http/codec/CancelWithoutDemandCodecTests.java +++ b/spring-web/src/test/java/org/springframework/http/codec/CancelWithoutDemandCodecTests.java @@ -33,7 +33,7 @@ import org.springframework.core.ResolvableType; import org.springframework.core.codec.CharSequenceEncoder; import org.springframework.core.io.buffer.DataBuffer; import org.springframework.core.io.buffer.DataBufferFactory; -import org.springframework.core.test.fixtures.io.buffer.LeakAwareDataBufferFactory; +import org.springframework.core.testfixture.io.buffer.LeakAwareDataBufferFactory; import org.springframework.http.HttpHeaders; import org.springframework.http.MediaType; import org.springframework.http.ReactiveHttpOutputMessage; diff --git a/spring-web/src/test/java/org/springframework/http/codec/FormHttpMessageReaderTests.java b/spring-web/src/test/java/org/springframework/http/codec/FormHttpMessageReaderTests.java index 26bdaaa5b2f..161c467b5c0 100644 --- a/spring-web/src/test/java/org/springframework/http/codec/FormHttpMessageReaderTests.java +++ b/spring-web/src/test/java/org/springframework/http/codec/FormHttpMessageReaderTests.java @@ -28,7 +28,7 @@ import reactor.test.StepVerifier; import org.springframework.core.ResolvableType; import org.springframework.core.io.buffer.DataBuffer; -import org.springframework.core.test.fixtures.io.buffer.AbstractLeakCheckingTests; +import org.springframework.core.testfixture.io.buffer.AbstractLeakCheckingTests; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpMethod; import org.springframework.http.MediaType; diff --git a/spring-web/src/test/java/org/springframework/http/codec/FormHttpMessageWriterTests.java b/spring-web/src/test/java/org/springframework/http/codec/FormHttpMessageWriterTests.java index 152a3eb31cd..6a133141ce4 100644 --- a/spring-web/src/test/java/org/springframework/http/codec/FormHttpMessageWriterTests.java +++ b/spring-web/src/test/java/org/springframework/http/codec/FormHttpMessageWriterTests.java @@ -27,8 +27,8 @@ import reactor.test.StepVerifier; import org.springframework.core.ResolvableType; import org.springframework.core.io.buffer.DataBuffer; import org.springframework.core.io.buffer.DataBufferUtils; -import org.springframework.core.test.fixtures.io.buffer.AbstractLeakCheckingTests; -import org.springframework.core.test.fixtures.io.buffer.DataBufferTestUtils; +import org.springframework.core.testfixture.io.buffer.AbstractLeakCheckingTests; +import org.springframework.core.testfixture.io.buffer.DataBufferTestUtils; import org.springframework.http.HttpHeaders; import org.springframework.http.MediaType; import org.springframework.mock.http.server.reactive.test.MockServerHttpResponse; diff --git a/spring-web/src/test/java/org/springframework/http/codec/ServerSentEventHttpMessageReaderTests.java b/spring-web/src/test/java/org/springframework/http/codec/ServerSentEventHttpMessageReaderTests.java index b213758b4b7..d6ef84b73f1 100644 --- a/spring-web/src/test/java/org/springframework/http/codec/ServerSentEventHttpMessageReaderTests.java +++ b/spring-web/src/test/java/org/springframework/http/codec/ServerSentEventHttpMessageReaderTests.java @@ -27,7 +27,7 @@ import reactor.test.StepVerifier; import org.springframework.core.ResolvableType; import org.springframework.core.io.buffer.DataBuffer; -import org.springframework.core.test.fixtures.io.buffer.AbstractLeakCheckingTests; +import org.springframework.core.testfixture.io.buffer.AbstractLeakCheckingTests; import org.springframework.http.MediaType; import org.springframework.http.codec.json.Jackson2JsonDecoder; import org.springframework.mock.http.server.reactive.test.MockServerHttpRequest; diff --git a/spring-web/src/test/java/org/springframework/http/codec/ServerSentEventHttpMessageWriterTests.java b/spring-web/src/test/java/org/springframework/http/codec/ServerSentEventHttpMessageWriterTests.java index 8e9bc707086..2bd290d9b88 100644 --- a/spring-web/src/test/java/org/springframework/http/codec/ServerSentEventHttpMessageWriterTests.java +++ b/spring-web/src/test/java/org/springframework/http/codec/ServerSentEventHttpMessageWriterTests.java @@ -31,8 +31,8 @@ import reactor.test.StepVerifier; import org.springframework.core.ResolvableType; import org.springframework.core.io.buffer.DataBufferFactory; import org.springframework.core.io.buffer.DataBufferUtils; -import org.springframework.core.test.fixtures.io.buffer.AbstractDataBufferAllocatingTests; -import org.springframework.core.test.fixtures.io.buffer.DataBufferTestUtils; +import org.springframework.core.testfixture.io.buffer.AbstractDataBufferAllocatingTests; +import org.springframework.core.testfixture.io.buffer.DataBufferTestUtils; import org.springframework.http.MediaType; import org.springframework.http.codec.json.Jackson2JsonEncoder; import org.springframework.http.converter.json.Jackson2ObjectMapperBuilder; diff --git a/spring-web/src/test/java/org/springframework/http/codec/cbor/Jackson2CborDecoderTests.java b/spring-web/src/test/java/org/springframework/http/codec/cbor/Jackson2CborDecoderTests.java index 4cfe5cb3868..b434b2fdd15 100644 --- a/spring-web/src/test/java/org/springframework/http/codec/cbor/Jackson2CborDecoderTests.java +++ b/spring-web/src/test/java/org/springframework/http/codec/cbor/Jackson2CborDecoderTests.java @@ -26,7 +26,7 @@ import reactor.core.publisher.Flux; import org.springframework.core.ResolvableType; import org.springframework.core.io.buffer.DataBuffer; -import org.springframework.core.test.fixtures.codec.AbstractDecoderTests; +import org.springframework.core.testfixture.codec.AbstractDecoderTests; import org.springframework.http.codec.Pojo; import org.springframework.http.converter.json.Jackson2ObjectMapperBuilder; import org.springframework.util.MimeType; diff --git a/spring-web/src/test/java/org/springframework/http/codec/cbor/Jackson2CborEncoderTests.java b/spring-web/src/test/java/org/springframework/http/codec/cbor/Jackson2CborEncoderTests.java index e1293d55883..b3ae238a8ca 100644 --- a/spring-web/src/test/java/org/springframework/http/codec/cbor/Jackson2CborEncoderTests.java +++ b/spring-web/src/test/java/org/springframework/http/codec/cbor/Jackson2CborEncoderTests.java @@ -26,8 +26,8 @@ import reactor.core.publisher.Flux; import org.springframework.core.ResolvableType; import org.springframework.core.io.buffer.DataBuffer; -import org.springframework.core.test.fixtures.io.buffer.AbstractLeakCheckingTests; -import org.springframework.core.test.fixtures.io.buffer.DataBufferTestUtils; +import org.springframework.core.testfixture.io.buffer.AbstractLeakCheckingTests; +import org.springframework.core.testfixture.io.buffer.DataBufferTestUtils; import org.springframework.http.codec.Pojo; import org.springframework.http.codec.ServerSentEvent; import org.springframework.http.converter.json.Jackson2ObjectMapperBuilder; diff --git a/spring-web/src/test/java/org/springframework/http/codec/json/Jackson2JsonDecoderTests.java b/spring-web/src/test/java/org/springframework/http/codec/json/Jackson2JsonDecoderTests.java index 6ec074bafb8..c1e0b61715d 100644 --- a/spring-web/src/test/java/org/springframework/http/codec/json/Jackson2JsonDecoderTests.java +++ b/spring-web/src/test/java/org/springframework/http/codec/json/Jackson2JsonDecoderTests.java @@ -37,7 +37,7 @@ import org.springframework.core.ResolvableType; import org.springframework.core.codec.CodecException; import org.springframework.core.codec.DecodingException; import org.springframework.core.io.buffer.DataBuffer; -import org.springframework.core.test.fixtures.codec.AbstractDecoderTests; +import org.springframework.core.testfixture.codec.AbstractDecoderTests; import org.springframework.http.MediaType; import org.springframework.http.codec.Pojo; import org.springframework.http.codec.json.JacksonViewBean.MyJacksonView1; diff --git a/spring-web/src/test/java/org/springframework/http/codec/json/Jackson2JsonEncoderTests.java b/spring-web/src/test/java/org/springframework/http/codec/json/Jackson2JsonEncoderTests.java index 84a979c0fdc..946b730f6c2 100644 --- a/spring-web/src/test/java/org/springframework/http/codec/json/Jackson2JsonEncoderTests.java +++ b/spring-web/src/test/java/org/springframework/http/codec/json/Jackson2JsonEncoderTests.java @@ -34,7 +34,7 @@ import reactor.test.StepVerifier; import org.springframework.core.ResolvableType; import org.springframework.core.io.buffer.DataBuffer; import org.springframework.core.io.buffer.DataBufferUtils; -import org.springframework.core.test.fixtures.codec.AbstractEncoderTests; +import org.springframework.core.testfixture.codec.AbstractEncoderTests; import org.springframework.http.MediaType; import org.springframework.http.codec.Pojo; import org.springframework.http.codec.ServerSentEvent; diff --git a/spring-web/src/test/java/org/springframework/http/codec/json/Jackson2SmileDecoderTests.java b/spring-web/src/test/java/org/springframework/http/codec/json/Jackson2SmileDecoderTests.java index 13a8326fd7c..b672918fcb9 100644 --- a/spring-web/src/test/java/org/springframework/http/codec/json/Jackson2SmileDecoderTests.java +++ b/spring-web/src/test/java/org/springframework/http/codec/json/Jackson2SmileDecoderTests.java @@ -26,7 +26,7 @@ import reactor.core.publisher.Flux; import org.springframework.core.ResolvableType; import org.springframework.core.io.buffer.DataBuffer; -import org.springframework.core.test.fixtures.codec.AbstractDecoderTests; +import org.springframework.core.testfixture.codec.AbstractDecoderTests; import org.springframework.http.codec.Pojo; import org.springframework.http.converter.json.Jackson2ObjectMapperBuilder; import org.springframework.util.MimeType; diff --git a/spring-web/src/test/java/org/springframework/http/codec/json/Jackson2SmileEncoderTests.java b/spring-web/src/test/java/org/springframework/http/codec/json/Jackson2SmileEncoderTests.java index 3fdffe872e5..7b39ac59f44 100644 --- a/spring-web/src/test/java/org/springframework/http/codec/json/Jackson2SmileEncoderTests.java +++ b/spring-web/src/test/java/org/springframework/http/codec/json/Jackson2SmileEncoderTests.java @@ -29,8 +29,8 @@ import reactor.core.publisher.Mono; import org.springframework.core.ResolvableType; import org.springframework.core.io.buffer.DataBuffer; -import org.springframework.core.test.fixtures.codec.AbstractEncoderTests; -import org.springframework.core.test.fixtures.io.buffer.DataBufferTestUtils; +import org.springframework.core.testfixture.codec.AbstractEncoderTests; +import org.springframework.core.testfixture.io.buffer.DataBufferTestUtils; import org.springframework.http.codec.Pojo; import org.springframework.http.codec.ServerSentEvent; import org.springframework.http.converter.json.Jackson2ObjectMapperBuilder; diff --git a/spring-web/src/test/java/org/springframework/http/codec/json/Jackson2TokenizerTests.java b/spring-web/src/test/java/org/springframework/http/codec/json/Jackson2TokenizerTests.java index 20dc4d994b5..c42291d0c9b 100644 --- a/spring-web/src/test/java/org/springframework/http/codec/json/Jackson2TokenizerTests.java +++ b/spring-web/src/test/java/org/springframework/http/codec/json/Jackson2TokenizerTests.java @@ -35,7 +35,7 @@ import reactor.test.StepVerifier; import org.springframework.core.codec.DecodingException; import org.springframework.core.io.buffer.DataBuffer; import org.springframework.core.io.buffer.DataBufferLimitException; -import org.springframework.core.test.fixtures.io.buffer.AbstractLeakCheckingTests; +import org.springframework.core.testfixture.io.buffer.AbstractLeakCheckingTests; import static java.util.Arrays.asList; import static java.util.Collections.singletonList; diff --git a/spring-web/src/test/java/org/springframework/http/codec/multipart/MultipartHttpMessageWriterTests.java b/spring-web/src/test/java/org/springframework/http/codec/multipart/MultipartHttpMessageWriterTests.java index 87e1f3300dc..36bfc18302e 100644 --- a/spring-web/src/test/java/org/springframework/http/codec/multipart/MultipartHttpMessageWriterTests.java +++ b/spring-web/src/test/java/org/springframework/http/codec/multipart/MultipartHttpMessageWriterTests.java @@ -35,7 +35,7 @@ import org.springframework.core.io.Resource; import org.springframework.core.io.buffer.DataBuffer; import org.springframework.core.io.buffer.DataBufferUtils; import org.springframework.core.io.buffer.DefaultDataBufferFactory; -import org.springframework.core.test.fixtures.io.buffer.AbstractLeakCheckingTests; +import org.springframework.core.testfixture.io.buffer.AbstractLeakCheckingTests; import org.springframework.http.HttpEntity; import org.springframework.http.MediaType; import org.springframework.http.client.MultipartBodyBuilder; diff --git a/spring-web/src/test/java/org/springframework/http/codec/multipart/SynchronossPartHttpMessageReaderTests.java b/spring-web/src/test/java/org/springframework/http/codec/multipart/SynchronossPartHttpMessageReaderTests.java index b2fb11b3c77..7d6661dfa9c 100644 --- a/spring-web/src/test/java/org/springframework/http/codec/multipart/SynchronossPartHttpMessageReaderTests.java +++ b/spring-web/src/test/java/org/springframework/http/codec/multipart/SynchronossPartHttpMessageReaderTests.java @@ -36,8 +36,8 @@ import org.springframework.core.codec.DecodingException; import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.buffer.DataBuffer; import org.springframework.core.io.buffer.DataBufferUtils; -import org.springframework.core.test.fixtures.io.buffer.AbstractLeakCheckingTests; -import org.springframework.core.test.fixtures.io.buffer.DataBufferTestUtils; +import org.springframework.core.testfixture.io.buffer.AbstractLeakCheckingTests; +import org.springframework.core.testfixture.io.buffer.DataBufferTestUtils; import org.springframework.http.HttpMethod; import org.springframework.http.MediaType; import org.springframework.http.client.MultipartBodyBuilder; diff --git a/spring-web/src/test/java/org/springframework/http/codec/protobuf/ProtobufDecoderTests.java b/spring-web/src/test/java/org/springframework/http/codec/protobuf/ProtobufDecoderTests.java index 1d3c367ce02..40501537dbc 100644 --- a/spring-web/src/test/java/org/springframework/http/codec/protobuf/ProtobufDecoderTests.java +++ b/spring-web/src/test/java/org/springframework/http/codec/protobuf/ProtobufDecoderTests.java @@ -29,7 +29,7 @@ import org.springframework.core.ResolvableType; import org.springframework.core.codec.DecodingException; import org.springframework.core.io.buffer.DataBuffer; import org.springframework.core.io.buffer.DataBufferUtils; -import org.springframework.core.test.fixtures.codec.AbstractDecoderTests; +import org.springframework.core.testfixture.codec.AbstractDecoderTests; import org.springframework.http.MediaType; import org.springframework.protobuf.Msg; import org.springframework.protobuf.SecondMsg; diff --git a/spring-web/src/test/java/org/springframework/http/codec/protobuf/ProtobufEncoderTests.java b/spring-web/src/test/java/org/springframework/http/codec/protobuf/ProtobufEncoderTests.java index f0bfbd15a70..c4738469dee 100644 --- a/spring-web/src/test/java/org/springframework/http/codec/protobuf/ProtobufEncoderTests.java +++ b/spring-web/src/test/java/org/springframework/http/codec/protobuf/ProtobufEncoderTests.java @@ -27,7 +27,7 @@ import reactor.core.publisher.Mono; import org.springframework.core.io.buffer.DataBuffer; import org.springframework.core.io.buffer.DataBufferUtils; -import org.springframework.core.test.fixtures.codec.AbstractEncoderTests; +import org.springframework.core.testfixture.codec.AbstractEncoderTests; import org.springframework.http.MediaType; import org.springframework.protobuf.Msg; import org.springframework.protobuf.SecondMsg; diff --git a/spring-web/src/test/java/org/springframework/http/codec/xml/Jaxb2XmlDecoderTests.java b/spring-web/src/test/java/org/springframework/http/codec/xml/Jaxb2XmlDecoderTests.java index 9bc7894d1a0..7fda7067f20 100644 --- a/spring-web/src/test/java/org/springframework/http/codec/xml/Jaxb2XmlDecoderTests.java +++ b/spring-web/src/test/java/org/springframework/http/codec/xml/Jaxb2XmlDecoderTests.java @@ -30,7 +30,7 @@ import reactor.test.StepVerifier; import org.springframework.core.ResolvableType; import org.springframework.core.io.buffer.DataBuffer; -import org.springframework.core.test.fixtures.io.buffer.AbstractLeakCheckingTests; +import org.springframework.core.testfixture.io.buffer.AbstractLeakCheckingTests; import org.springframework.http.MediaType; import org.springframework.http.codec.Pojo; import org.springframework.http.codec.xml.jaxb.XmlRootElement; diff --git a/spring-web/src/test/java/org/springframework/http/codec/xml/Jaxb2XmlEncoderTests.java b/spring-web/src/test/java/org/springframework/http/codec/xml/Jaxb2XmlEncoderTests.java index 6522f57bf0f..81d5767c15d 100644 --- a/spring-web/src/test/java/org/springframework/http/codec/xml/Jaxb2XmlEncoderTests.java +++ b/spring-web/src/test/java/org/springframework/http/codec/xml/Jaxb2XmlEncoderTests.java @@ -30,8 +30,8 @@ import reactor.core.publisher.Mono; import org.springframework.core.ResolvableType; import org.springframework.core.io.buffer.DataBuffer; -import org.springframework.core.test.fixtures.codec.AbstractEncoderTests; -import org.springframework.core.test.fixtures.xml.XmlContent; +import org.springframework.core.testfixture.codec.AbstractEncoderTests; +import org.springframework.core.testfixture.xml.XmlContent; import org.springframework.http.MediaType; import org.springframework.http.codec.Pojo; diff --git a/spring-web/src/test/java/org/springframework/http/codec/xml/XmlEventDecoderTests.java b/spring-web/src/test/java/org/springframework/http/codec/xml/XmlEventDecoderTests.java index 3bd9b8ff50a..cf48d090fa4 100644 --- a/spring-web/src/test/java/org/springframework/http/codec/xml/XmlEventDecoderTests.java +++ b/spring-web/src/test/java/org/springframework/http/codec/xml/XmlEventDecoderTests.java @@ -28,7 +28,7 @@ import reactor.test.StepVerifier; import org.springframework.core.io.buffer.DataBuffer; import org.springframework.core.io.buffer.DataBufferLimitException; -import org.springframework.core.test.fixtures.io.buffer.AbstractLeakCheckingTests; +import org.springframework.core.testfixture.io.buffer.AbstractLeakCheckingTests; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-web/src/test/java/org/springframework/http/converter/feed/AtomFeedHttpMessageConverterTests.java b/spring-web/src/test/java/org/springframework/http/converter/feed/AtomFeedHttpMessageConverterTests.java index 4f733570186..856dcd78706 100644 --- a/spring-web/src/test/java/org/springframework/http/converter/feed/AtomFeedHttpMessageConverterTests.java +++ b/spring-web/src/test/java/org/springframework/http/converter/feed/AtomFeedHttpMessageConverterTests.java @@ -31,7 +31,7 @@ import org.xmlunit.diff.DefaultNodeMatcher; import org.xmlunit.diff.ElementSelectors; import org.xmlunit.diff.NodeMatcher; -import org.springframework.core.test.fixtures.xml.XmlContent; +import org.springframework.core.testfixture.xml.XmlContent; import org.springframework.http.MediaType; import org.springframework.http.MockHttpInputMessage; import org.springframework.http.MockHttpOutputMessage; diff --git a/spring-web/src/test/java/org/springframework/http/converter/feed/RssChannelHttpMessageConverterTests.java b/spring-web/src/test/java/org/springframework/http/converter/feed/RssChannelHttpMessageConverterTests.java index cea67dac411..5d1e01f3287 100644 --- a/spring-web/src/test/java/org/springframework/http/converter/feed/RssChannelHttpMessageConverterTests.java +++ b/spring-web/src/test/java/org/springframework/http/converter/feed/RssChannelHttpMessageConverterTests.java @@ -27,7 +27,7 @@ import com.rometools.rome.feed.rss.Channel; import com.rometools.rome.feed.rss.Item; import org.junit.jupiter.api.Test; -import org.springframework.core.test.fixtures.xml.XmlContent; +import org.springframework.core.testfixture.xml.XmlContent; import org.springframework.http.MediaType; import org.springframework.http.MockHttpInputMessage; import org.springframework.http.MockHttpOutputMessage; diff --git a/spring-web/src/test/java/org/springframework/http/converter/xml/Jaxb2RootElementHttpMessageConverterTests.java b/spring-web/src/test/java/org/springframework/http/converter/xml/Jaxb2RootElementHttpMessageConverterTests.java index 277eb3291fa..cf5fa05d46c 100644 --- a/spring-web/src/test/java/org/springframework/http/converter/xml/Jaxb2RootElementHttpMessageConverterTests.java +++ b/spring-web/src/test/java/org/springframework/http/converter/xml/Jaxb2RootElementHttpMessageConverterTests.java @@ -36,7 +36,7 @@ import org.springframework.aop.framework.AopProxy; import org.springframework.aop.framework.DefaultAopProxyFactory; import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.Resource; -import org.springframework.core.test.fixtures.xml.XmlContent; +import org.springframework.core.testfixture.xml.XmlContent; import org.springframework.http.MediaType; import org.springframework.http.MockHttpInputMessage; import org.springframework.http.MockHttpOutputMessage; diff --git a/spring-web/src/test/java/org/springframework/http/converter/xml/SourceHttpMessageConverterTests.java b/spring-web/src/test/java/org/springframework/http/converter/xml/SourceHttpMessageConverterTests.java index 53ccbb62f9e..a54e6895efb 100644 --- a/spring-web/src/test/java/org/springframework/http/converter/xml/SourceHttpMessageConverterTests.java +++ b/spring-web/src/test/java/org/springframework/http/converter/xml/SourceHttpMessageConverterTests.java @@ -41,7 +41,7 @@ import org.xml.sax.helpers.DefaultHandler; import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.Resource; -import org.springframework.core.test.fixtures.xml.XmlContent; +import org.springframework.core.testfixture.xml.XmlContent; import org.springframework.http.MediaType; import org.springframework.http.MockHttpInputMessage; import org.springframework.http.MockHttpOutputMessage; diff --git a/spring-web/src/test/java/org/springframework/http/server/reactive/ChannelSendOperatorTests.java b/spring-web/src/test/java/org/springframework/http/server/reactive/ChannelSendOperatorTests.java index 24d14c548f4..7a050dd67e7 100644 --- a/spring-web/src/test/java/org/springframework/http/server/reactive/ChannelSendOperatorTests.java +++ b/spring-web/src/test/java/org/springframework/http/server/reactive/ChannelSendOperatorTests.java @@ -35,7 +35,7 @@ import reactor.core.publisher.Signal; import reactor.test.StepVerifier; import org.springframework.core.io.buffer.DataBuffer; -import org.springframework.core.test.fixtures.io.buffer.LeakAwareDataBufferFactory; +import org.springframework.core.testfixture.io.buffer.LeakAwareDataBufferFactory; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-web/src/test/java/org/springframework/http/server/reactive/HttpHeadResponseDecoratorTests.java b/spring-web/src/test/java/org/springframework/http/server/reactive/HttpHeadResponseDecoratorTests.java index 83ccd8b089e..55695bca646 100644 --- a/spring-web/src/test/java/org/springframework/http/server/reactive/HttpHeadResponseDecoratorTests.java +++ b/spring-web/src/test/java/org/springframework/http/server/reactive/HttpHeadResponseDecoratorTests.java @@ -24,7 +24,7 @@ import reactor.core.publisher.Flux; import org.springframework.core.io.buffer.DataBuffer; import org.springframework.core.io.buffer.NettyDataBufferFactory; -import org.springframework.core.test.fixtures.io.buffer.LeakAwareDataBufferFactory; +import org.springframework.core.testfixture.io.buffer.LeakAwareDataBufferFactory; import org.springframework.mock.http.server.reactive.test.MockServerHttpResponse; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-web/src/test/java/org/springframework/web/bind/ServletRequestUtilsTests.java b/spring-web/src/test/java/org/springframework/web/bind/ServletRequestUtilsTests.java index f459f4f04aa..c9a9553f255 100644 --- a/spring-web/src/test/java/org/springframework/web/bind/ServletRequestUtilsTests.java +++ b/spring-web/src/test/java/org/springframework/web/bind/ServletRequestUtilsTests.java @@ -18,13 +18,13 @@ package org.springframework.web.bind; import org.junit.jupiter.api.Test; -import org.springframework.core.test.fixtures.EnabledForTestGroups; +import org.springframework.core.testfixture.EnabledForTestGroups; import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.util.StopWatch; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; -import static org.springframework.core.test.fixtures.TestGroup.PERFORMANCE; +import static org.springframework.core.testfixture.TestGroup.PERFORMANCE; /** * @author Juergen Hoeller diff --git a/spring-web/src/test/java/org/springframework/web/context/request/SessionScopeTests.java b/spring-web/src/test/java/org/springframework/web/context/request/SessionScopeTests.java index a767bbd8d46..da0d226b9a2 100644 --- a/spring-web/src/test/java/org/springframework/web/context/request/SessionScopeTests.java +++ b/spring-web/src/test/java/org/springframework/web/context/request/SessionScopeTests.java @@ -31,7 +31,7 @@ import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; import org.springframework.beans.test.fixtures.beans.DerivedTestBean; import org.springframework.beans.test.fixtures.beans.TestBean; import org.springframework.core.io.ClassPathResource; -import org.springframework.core.test.fixtures.io.SerializationTestUtils; +import org.springframework.core.testfixture.io.SerializationTestUtils; import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.mock.web.test.MockHttpSession; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/config/ResourceHandlerRegistryTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/config/ResourceHandlerRegistryTests.java index dec3055660d..5ec569118c9 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/config/ResourceHandlerRegistryTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/config/ResourceHandlerRegistryTests.java @@ -28,7 +28,7 @@ import reactor.test.StepVerifier; import org.springframework.cache.concurrent.ConcurrentMapCache; import org.springframework.context.support.GenericApplicationContext; -import org.springframework.core.test.fixtures.io.buffer.DataBufferTestUtils; +import org.springframework.core.testfixture.io.buffer.DataBufferTestUtils; import org.springframework.http.CacheControl; import org.springframework.http.server.PathContainer; import org.springframework.mock.http.server.reactive.test.MockServerHttpRequest; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/function/BodyInsertersTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/function/BodyInsertersTests.java index 2a37cf84781..a74864d7659 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/function/BodyInsertersTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/function/BodyInsertersTests.java @@ -45,7 +45,7 @@ import org.springframework.core.io.buffer.DataBuffer; import org.springframework.core.io.buffer.DataBufferUtils; import org.springframework.core.io.buffer.DefaultDataBuffer; import org.springframework.core.io.buffer.DefaultDataBufferFactory; -import org.springframework.core.test.fixtures.io.buffer.DataBufferTestUtils; +import org.springframework.core.testfixture.io.buffer.DataBufferTestUtils; import org.springframework.http.HttpMethod; import org.springframework.http.HttpRange; import org.springframework.http.ReactiveHttpOutputMessage; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/function/client/ExchangeFilterFunctionsTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/function/client/ExchangeFilterFunctionsTests.java index 64e016e55ec..a98844e486e 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/function/client/ExchangeFilterFunctionsTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/function/client/ExchangeFilterFunctionsTests.java @@ -27,7 +27,7 @@ import reactor.test.StepVerifier; import org.springframework.core.io.buffer.DataBuffer; import org.springframework.core.io.buffer.DataBufferUtils; import org.springframework.core.io.buffer.DefaultDataBufferFactory; -import org.springframework.core.test.fixtures.io.buffer.DataBufferTestUtils; +import org.springframework.core.testfixture.io.buffer.DataBufferTestUtils; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpMethod; import org.springframework.http.HttpStatus; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/function/client/WebClientDataBufferAllocatingTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/function/client/WebClientDataBufferAllocatingTests.java index a2e80fe6403..555c3f51802 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/function/client/WebClientDataBufferAllocatingTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/function/client/WebClientDataBufferAllocatingTests.java @@ -34,7 +34,7 @@ import reactor.test.StepVerifier; import org.springframework.core.ParameterizedTypeReference; import org.springframework.core.io.buffer.DataBufferFactory; import org.springframework.core.io.buffer.NettyDataBufferFactory; -import org.springframework.core.test.fixtures.io.buffer.AbstractDataBufferAllocatingTests; +import org.springframework.core.testfixture.io.buffer.AbstractDataBufferAllocatingTests; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/resource/ResourceWebHandlerTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/resource/ResourceWebHandlerTests.java index 838a11cca3a..f057b690661 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/resource/ResourceWebHandlerTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/resource/ResourceWebHandlerTests.java @@ -39,7 +39,7 @@ import org.springframework.core.io.buffer.DataBuffer; import org.springframework.core.io.buffer.DataBufferFactory; import org.springframework.core.io.buffer.DataBufferUtils; import org.springframework.core.io.buffer.DefaultDataBufferFactory; -import org.springframework.core.test.fixtures.io.buffer.DataBufferTestUtils; +import org.springframework.core.testfixture.io.buffer.DataBufferTestUtils; import org.springframework.http.CacheControl; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpMethod; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/MessageWriterResultHandlerTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/MessageWriterResultHandlerTests.java index 5da68b75be6..4273bd98b28 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/MessageWriterResultHandlerTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/MessageWriterResultHandlerTests.java @@ -54,7 +54,7 @@ import org.springframework.web.reactive.accept.RequestedContentTypeResolver; import org.springframework.web.reactive.accept.RequestedContentTypeResolverBuilder; import static org.assertj.core.api.Assertions.assertThat; -import static org.springframework.core.test.fixtures.io.buffer.DataBufferTestUtils.dumpString; +import static org.springframework.core.testfixture.io.buffer.DataBufferTestUtils.dumpString; import static org.springframework.http.MediaType.APPLICATION_JSON; import static org.springframework.web.method.ResolvableMethod.on; import static org.springframework.web.reactive.HandlerMapping.PRODUCIBLE_MEDIA_TYPES_ATTRIBUTE; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestPartMethodArgumentResolverTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestPartMethodArgumentResolverTests.java index d55746f8381..4beaf7af247 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestPartMethodArgumentResolverTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestPartMethodArgumentResolverTests.java @@ -33,7 +33,7 @@ import org.springframework.core.MethodParameter; import org.springframework.core.ReactiveAdapterRegistry; import org.springframework.core.io.buffer.DataBuffer; import org.springframework.core.io.buffer.DataBufferUtils; -import org.springframework.core.test.fixtures.io.buffer.DataBufferTestUtils; +import org.springframework.core.testfixture.io.buffer.DataBufferTestUtils; import org.springframework.http.HttpMethod; import org.springframework.http.MediaType; import org.springframework.http.client.MultipartBodyBuilder; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/ResponseEntityResultHandlerTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/ResponseEntityResultHandlerTests.java index 58c90779e1f..86b92d67cff 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/ResponseEntityResultHandlerTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/ResponseEntityResultHandlerTests.java @@ -40,7 +40,7 @@ import org.springframework.core.MethodParameter; import org.springframework.core.ResolvableType; import org.springframework.core.codec.ByteBufferEncoder; import org.springframework.core.codec.CharSequenceEncoder; -import org.springframework.core.test.fixtures.io.buffer.DataBufferTestUtils; +import org.springframework.core.testfixture.io.buffer.DataBufferTestUtils; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpMethod; import org.springframework.http.HttpStatus; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/view/HttpMessageWriterViewTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/view/HttpMessageWriterViewTests.java index acee2437d10..e44647d0897 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/view/HttpMessageWriterViewTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/view/HttpMessageWriterViewTests.java @@ -29,7 +29,7 @@ import reactor.test.StepVerifier; import org.springframework.core.codec.CharSequenceEncoder; import org.springframework.core.io.buffer.DataBuffer; -import org.springframework.core.test.fixtures.io.buffer.DataBufferTestUtils; +import org.springframework.core.testfixture.io.buffer.DataBufferTestUtils; import org.springframework.http.MediaType; import org.springframework.http.codec.json.Jackson2JsonEncoder; import org.springframework.http.codec.xml.Jaxb2XmlEncoder; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/view/ViewResolutionResultHandlerTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/view/ViewResolutionResultHandlerTests.java index b461aaaa076..72e1f392ec8 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/view/ViewResolutionResultHandlerTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/view/ViewResolutionResultHandlerTests.java @@ -38,7 +38,7 @@ import org.springframework.core.Ordered; import org.springframework.core.ResolvableType; import org.springframework.core.io.buffer.DataBuffer; import org.springframework.core.io.buffer.DefaultDataBufferFactory; -import org.springframework.core.test.fixtures.io.buffer.DataBufferTestUtils; +import org.springframework.core.testfixture.io.buffer.DataBufferTestUtils; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.server.reactive.ServerHttpResponse; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/view/ZeroDemandResponse.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/view/ZeroDemandResponse.java index d7e150bac8d..59b3c946028 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/view/ZeroDemandResponse.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/view/ZeroDemandResponse.java @@ -24,7 +24,7 @@ import reactor.core.publisher.Mono; import org.springframework.core.io.buffer.DataBuffer; import org.springframework.core.io.buffer.DataBufferFactory; -import org.springframework.core.test.fixtures.io.buffer.LeakAwareDataBufferFactory; +import org.springframework.core.testfixture.io.buffer.LeakAwareDataBufferFactory; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseCookie; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ServletAnnotationControllerHandlerMethodTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ServletAnnotationControllerHandlerMethodTests.java index 093f1eda916..374c3516bed 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ServletAnnotationControllerHandlerMethodTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ServletAnnotationControllerHandlerMethodTests.java @@ -78,7 +78,7 @@ import org.springframework.context.annotation.AnnotationConfigUtils; import org.springframework.context.support.PropertySourcesPlaceholderConfigurer; import org.springframework.core.MethodParameter; import org.springframework.core.convert.converter.Converter; -import org.springframework.core.test.fixtures.io.SerializationTestUtils; +import org.springframework.core.testfixture.io.SerializationTestUtils; import org.springframework.format.annotation.DateTimeFormat; import org.springframework.format.support.DefaultFormattingConversionService; import org.springframework.format.support.FormattingConversionServiceFactoryBean; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/view/feed/AtomFeedViewTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/view/feed/AtomFeedViewTests.java index f8b7bc7c535..a0f05ac6632 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/view/feed/AtomFeedViewTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/view/feed/AtomFeedViewTests.java @@ -29,7 +29,7 @@ import com.rometools.rome.feed.atom.Entry; import com.rometools.rome.feed.atom.Feed; import org.junit.jupiter.api.Test; -import org.springframework.core.test.fixtures.xml.XmlContent; +import org.springframework.core.testfixture.xml.XmlContent; import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.mock.web.test.MockHttpServletResponse; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/view/feed/RssFeedViewTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/view/feed/RssFeedViewTests.java index bc4a2ac49f3..cf362d398d0 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/view/feed/RssFeedViewTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/view/feed/RssFeedViewTests.java @@ -29,7 +29,7 @@ import com.rometools.rome.feed.rss.Description; import com.rometools.rome.feed.rss.Item; import org.junit.jupiter.api.Test; -import org.springframework.core.test.fixtures.xml.XmlContent; +import org.springframework.core.testfixture.xml.XmlContent; import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.mock.web.test.MockHttpServletResponse; diff --git a/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/client/AbstractSockJsIntegrationTests.java b/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/client/AbstractSockJsIntegrationTests.java index 8af8d83e3d0..ae57059f193 100644 --- a/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/client/AbstractSockJsIntegrationTests.java +++ b/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/client/AbstractSockJsIntegrationTests.java @@ -49,7 +49,7 @@ import org.junit.jupiter.api.Timeout; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; -import org.springframework.core.test.fixtures.EnabledForTestGroups; +import org.springframework.core.testfixture.EnabledForTestGroups; import org.springframework.http.HttpHeaders; import org.springframework.http.server.ServletServerHttpRequest; import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler; @@ -69,7 +69,7 @@ import org.springframework.web.socket.server.support.DefaultHandshakeHandler; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.fail; -import static org.springframework.core.test.fixtures.TestGroup.PERFORMANCE; +import static org.springframework.core.testfixture.TestGroup.PERFORMANCE; /** * Abstract base class for integration tests using the From 7cd4ddf5fcaeee4e288f57801eb0713a652eb979 Mon Sep 17 00:00:00 2001 From: Sam Brannen Date: Sun, 29 Dec 2019 17:37:19 +0100 Subject: [PATCH 05/13] Rename test fixture package in spring-beans See gh-23550 --- ...NamespaceHandlerScopeIntegrationTests.java | 4 +- ...visorAutoProxyCreatorIntegrationTests.java | 2 +- ...ceHandlerScopeIntegrationTests-context.xml | 8 +- ...toProxyCreatorIntegrationTests-context.xml | 10 +-- .../AspectJExpressionPointcutTests.java | 26 +++--- .../BeanNamePointcutMatchingTests.java | 2 +- ...hodInvocationProceedingJoinPointTests.java | 4 +- .../TigerAspectJExpressionPointcutTests.java | 4 +- .../aspectj/TypePatternClassFilterTests.java | 28 +++---- .../AbstractAspectJAdvisorFactoryTests.java | 8 +- .../annotation/ArgumentBindingTests.java | 4 +- .../AspectJPointcutAdvisorTests.java | 2 +- .../AspectJNamespaceHandlerTests.java | 2 +- .../config/AopNamespaceHandlerEventTests.java | 2 +- .../aop/framework/AopProxyUtilsTests.java | 4 +- .../framework/IntroductionBenchmarkTests.java | 4 +- .../aop/framework/MethodInvocationTests.java | 2 +- .../aop/framework/ProxyFactoryTests.java | 6 +- .../ConcurrencyThrottleInterceptorTests.java | 6 +- .../ExposeBeanNameAdvisorsTests.java | 4 +- .../ExposeInvocationInterceptorTests.java | 4 +- .../AbstractRegexpMethodPointcutTests.java | 2 +- .../aop/support/AopUtilsTests.java | 2 +- .../aop/support/ClassFiltersTests.java | 4 +- .../aop/support/ClassUtilsTests.java | 2 +- .../aop/support/ComposablePointcutTests.java | 2 +- .../aop/support/ControlFlowPointcutTests.java | 4 +- ...elegatingIntroductionInterceptorTests.java | 12 +-- .../aop/support/MethodMatchersTests.java | 6 +- .../support/NameMatchMethodPointcutTests.java | 4 +- .../aop/support/PointcutsTests.java | 2 +- ...MethodPointcutAdvisorIntegrationTests.java | 6 +- .../aop/support/RootClassFilterTests.java | 2 +- .../CommonsPool2TargetSourceProxyTests.java | 2 +- .../target/HotSwappableTargetSourceTests.java | 6 +- .../aop/target/LazyInitTargetSourceTests.java | 2 +- .../PrototypeBasedTargetSourceTests.java | 4 +- .../target/PrototypeTargetSourceTests.java | 2 +- .../target/ThreadLocalTargetSourceTests.java | 4 +- .../AopNamespaceHandlerEventTests-context.xml | 2 +- ...PointcutErrorTests-pointcutDuplication.xml | 2 +- ...dlerPointcutErrorTests-pointcutMissing.xml | 2 +- ...ointcutAdvisorIntegrationTests-context.xml | 10 +-- ...onsPool2TargetSourceProxyTests-context.xml | 2 +- .../HotSwappableTargetSourceTests-context.xml | 4 +- ...LazyInitTargetSourceTests-customTarget.xml | 2 +- .../LazyInitTargetSourceTests-singleton.xml | 2 +- .../PrototypeTargetSourceTests-context.xml | 4 +- .../ThreadLocalTargetSourceTests-context.xml | 6 +- .../beans/AbstractPropertyAccessorTests.java | 10 +-- .../springframework/beans/BeanUtilsTests.java | 6 +- .../beans/BeanWrapperEnumTests.java | 4 +- .../beans/BeanWrapperGenericsTests.java | 8 +- .../beans/BeanWrapperTests.java | 2 +- .../CachedIntrospectionResultsTests.java | 4 +- .../beans/DirectFieldAccessorTests.java | 2 +- .../beans/ExtendedBeanInfoTests.java | 2 +- .../beans/factory/BeanFactoryUtilsTests.java | 12 +-- .../DefaultListableBeanFactoryTests.java | 16 ++-- ...wiredAnnotationBeanPostProcessorTests.java | 8 +- ...njectAnnotationBeanPostProcessorTests.java | 8 +- .../annotation/LookupAnnotationTests.java | 2 +- .../config/CustomEditorConfigurerTests.java | 2 +- .../FieldRetrievingFactoryBeanTests.java | 4 +- .../config/PropertyPathFactoryBeanTests.java | 4 +- .../PropertyPlaceholderConfigurerTests.java | 2 +- .../PropertyResourceConfigurerTests.java | 4 +- .../factory/config/SimpleScopeTests.java | 2 +- .../parsing/CustomProblemReporterTests.java | 2 +- .../support/BeanDefinitionBuilderTests.java | 2 +- .../factory/support/BeanDefinitionTests.java | 2 +- .../support/BeanFactoryGenericsTests.java | 8 +- .../DefaultSingletonBeanRegistryTests.java | 4 +- ...DefinitionMetadataEqualsHashCodeTests.java | 2 +- .../factory/support/LookupMethodTests.java | 2 +- .../PropertiesBeanDefinitionReaderTests.java | 2 +- .../wiring/BeanConfigurerSupportTests.java | 2 +- .../xml/AutowireWithExclusionTests.java | 2 +- .../factory/xml/CollectionMergingTests.java | 2 +- .../xml/CollectionsWithDefaultTypesTests.java | 2 +- .../xml/ConstructorDependenciesBean.java | 4 +- .../beans/factory/xml/CountingFactory.java | 2 +- .../beans/factory/xml/DummyReferencer.java | 4 +- .../factory/xml/DuplicateBeanIdTests.java | 2 +- .../factory/xml/EventPublicationTests.java | 2 +- .../beans/factory/xml/FactoryMethodTests.java | 2 +- .../beans/factory/xml/FactoryMethods.java | 2 +- .../beans/factory/xml/InstanceFactory.java | 2 +- ...edBeansElementAttributeRecursionTests.java | 2 +- .../factory/xml/SchemaValidationTests.java | 2 +- ...impleConstructorNamespaceHandlerTests.java | 4 +- .../SimplePropertyNamespaceHandlerTests.java | 4 +- .../beans/factory/xml/TestBeanCreator.java | 2 +- .../xml/UtilNamespaceHandlerTests.java | 6 +- .../factory/xml/XmlBeanCollectionTests.java | 4 +- .../xml/XmlBeanDefinitionReaderTests.java | 2 +- .../xml/XmlListableBeanFactoryTests.java | 10 +-- .../propertyeditors/CustomEditorTests.java | 14 ++-- .../beans/support/PagedListHolderTests.java | 2 +- .../annotation/KotlinAutowiredTests.kt | 4 +- .../factory/BeanFactoryUtilsTests-leaf.xml | 2 +- .../factory/BeanFactoryUtilsTests-middle.xml | 4 +- .../factory/BeanFactoryUtilsTests-root.xml | 12 +-- ...ieldRetrievingFactoryBeanTests-context.xml | 2 +- .../PropertyPathFactoryBeanTests-context.xml | 18 ++--- .../config/SimpleScopeTests-context.xml | 2 +- .../CustomProblemReporterTests-context.xml | 8 +- .../factory/support/genericBeanTests.xml | 6 +- .../factory/support/lookupMethodTests.xml | 4 +- .../support/multiConstructorArgs.properties | 2 +- .../support/refConstructorArg.properties | 4 +- .../support/simpleConstructorArg.properties | 2 +- ...uplicateBeanIdTests-multiLevel-context.xml | 4 +- ...DuplicateBeanIdTests-sameLevel-context.xml | 4 +- ...tAttributeRecursionTests-merge-context.xml | 2 +- .../autowire-constructor-with-exclusion.xml | 4 +- .../factory/xml/autowire-with-exclusion.xml | 4 +- .../factory/xml/autowire-with-inclusion.xml | 4 +- .../xml/autowire-with-selective-inclusion.xml | 4 +- .../beans/factory/xml/beanEvents.xml | 8 +- .../beans/factory/xml/collectionMerging.xml | 28 +++---- .../beans/factory/xml/collections.xml | 54 ++++++------- .../xml/collectionsWithDefaultTypes.xml | 4 +- .../beans/factory/xml/factory-methods.xml | 4 +- .../beans/factory/xml/schemaValidated.xml | 10 +-- ...simpleConstructorNamespaceHandlerTests.xml | 22 ++--- ...tructorNamespaceHandlerTestsWithErrors.xml | 2 +- .../simplePropertyNamespaceHandlerTests.xml | 10 +-- ...ropertyNamespaceHandlerTestsWithErrors.xml | 4 +- .../beans/factory/xml/test.xml | 32 ++++---- .../beans/factory/xml/testUtilNamespace.xml | 20 ++--- .../beans/factory/xml/validateWithDtd.xml | 2 +- .../beans/factory/xml/validateWithXsd.xml | 2 +- .../beans/factory/xml/withMeta.xml | 6 +- .../beans/AgeHolder.java | 2 +- .../beans/AnnotatedBean.java | 2 +- .../beans/BooleanTestBean.java | 2 +- .../beans/CollectingReaderEventListener.java | 2 +- .../beans/Colour.java | 2 +- .../beans/CountingTestBean.java | 2 +- .../beans/CustomEnum.java | 2 +- .../beans/DependenciesBean.java | 2 +- .../beans/DerivedTestBean.java | 2 +- .../beans/DummyBean.java | 2 +- .../beans/DummyFactory.java | 2 +- .../beans/Employee.java | 2 +- .../beans/GenericBean.java | 2 +- .../beans/GenericIntegerBean.java | 2 +- .../beans/GenericSetOfIntegerBean.java | 2 +- .../beans/HasMap.java | 2 +- .../beans/INestedTestBean.java | 2 +- .../beans/IOther.java | 2 +- .../beans/ITestBean.java | 4 +- .../beans/IndexedTestBean.java | 2 +- .../beans/LifecycleBean.java | 2 +- .../beans/MustBeInitialized.java | 2 +- .../beans/NestedTestBean.java | 2 +- .../beans/NumberTestBean.java | 2 +- .../beans/PackageLevelVisibleBean.java | 2 +- .../beans/Person.java | 2 +- .../fixtures => testfixture}/beans/Pet.java | 2 +- .../beans/SerializablePerson.java | 2 +- .../beans/SideEffectBean.java | 2 +- .../beans/TestAnnotation.java | 2 +- .../beans/TestBean.java | 8 +- .../beans/factory/DummyFactory.java | 4 +- .../beans/package-info.java | 2 +- .../beans/subpkg/DeepBean.java | 2 +- .../factory/xml/AbstractBeanFactoryTests.java | 10 +-- .../xml/AbstractListableBeanFactoryTests.java | 8 +- .../scheduling/quartz/QuartzSupportTests.java | 2 +- .../BeanValidationPostProcessorTests.java | 2 +- .../aop/aspectj/AfterAdviceBindingTests.java | 4 +- .../AfterReturningAdviceBindingTests.java | 4 +- .../AfterThrowingAdviceBindingTests.java | 2 +- .../aop/aspectj/AroundAdviceBindingTests.java | 4 +- .../AspectAndAdvicePrecedenceTests.java | 2 +- ...AspectJExpressionPointcutAdvisorTests.java | 2 +- .../BeanNamePointcutAtAspectTests.java | 4 +- .../aop/aspectj/BeanNamePointcutTests.java | 2 +- .../aop/aspectj/BeforeAdviceBindingTests.java | 4 +- .../aop/aspectj/DeclareParentsTests.java | 2 +- ...licitJPArgumentMatchingAtAspectJTests.java | 4 +- .../AspectImplementingInterfaceTests.java | 2 +- ...xyCreatorAndLazyInitTargetSourceTests.java | 4 +- .../AspectJAutoProxyCreatorTests.java | 8 +- .../AtAspectJAfterThrowingTests.java | 4 +- .../autoproxy/benchmark/BenchmarkTests.java | 2 +- ...fterReturningGenericTypeMatchingTests.java | 4 +- ...NamespaceHandlerProxyTargetClassTests.java | 2 +- .../aop/config/AopNamespaceHandlerTests.java | 4 +- .../aop/framework/AbstractAopProxyTests.java | 10 +-- .../aop/framework/CglibProxyTests.java | 4 +- .../aop/framework/JdkDynamicProxyTests.java | 6 +- .../aop/framework/ProxyFactoryBeanTests.java | 8 +- .../AdvisorAdapterRegistrationTests.java | 2 +- .../AdvisorAutoProxyCreatorTests.java | 4 +- .../autoproxy/AutoProxyCreatorTests.java | 8 +- .../BeanNameAutoProxyCreatorInitTests.java | 2 +- .../BeanNameAutoProxyCreatorTests.java | 4 +- .../aop/scope/ScopedProxyTests.java | 4 +- .../target/CommonsPool2TargetSourceTests.java | 6 +- .../LookupMethodWrappedByCglibProxyTests.java | 2 +- ...aceHandlerWithExpressionLanguageTests.java | 2 +- .../factory/xml/XmlBeanFactoryTestTypes.java | 8 +- .../factory/xml/XmlBeanFactoryTests.java | 12 +-- .../support/CustomNamespaceHandlerTests.java | 4 +- .../cache/CacheReproTests.java | 2 +- .../context/LifecycleContextBean.java | 2 +- .../AbstractCircularImportDetectionTests.java | 2 +- .../AnnotationProcessorPerformanceTests.java | 4 +- .../ClassPathBeanDefinitionScannerTests.java | 2 +- ...PathFactoryBeanDefinitionScannerTests.java | 2 +- ...ommonAnnotationBeanPostProcessorTests.java | 8 +- .../ConfigurationClassAndBFPPTests.java | 2 +- ...nClassPostConstructAndAutowiringTests.java | 2 +- .../ConfigurationClassPostProcessorTests.java | 4 +- .../FooServiceDependentConverter.java | 6 +- ...wiredAnnotationBeanPostProcessorTests.java | 2 +- .../context/annotation/MyTestBean.java | 4 +- .../NestedConfigurationClassTests.java | 2 +- .../PropertySourceAnnotationTests.java | 2 +- .../componentscan/level1/Level1Config.java | 2 +- .../componentscan/level2/Level2Config.java | 2 +- .../AutowiredConfigurationTests.java | 4 +- .../BeanMethodQualificationTests.java | 4 +- ...figurationClassAspectIntegrationTests.java | 6 +- .../ConfigurationClassProcessingTests.java | 6 +- ...assWithPlaceholderConfigurerBeanTests.java | 4 +- .../ConfigurationMetaAnnotationTests.java | 2 +- .../ImportAnnotationDetectionTests.java | 2 +- .../configuration/ImportResourceTests.java | 4 +- .../annotation/configuration/ImportTests.java | 4 +- ...tedConfigurationClassEnhancementTests.java | 2 +- .../configuration/ScopingTests.java | 4 +- .../annotation4/FactoryMethodComponent.java | 2 +- .../context/annotation4/SimpleBean.java | 2 +- .../annotation6/ConfigForScanning.java | 2 +- .../event/ApplicationContextEventTests.java | 2 +- .../EventPublicationInterceptorTests.java | 4 +- .../ApplicationContextExpressionTests.java | 2 +- .../EnvironmentAccessorIntegrationTests.java | 2 +- .../BeanFactoryPostProcessorTests.java | 2 +- ...rtyResourceConfigurerIntegrationTests.java | 2 +- ...ertySourcesPlaceholderConfigurerTests.java | 2 +- .../support/SimpleThreadScopeTests.java | 2 +- ...ticApplicationContextMulticasterTests.java | 2 +- .../StaticApplicationContextTests.java | 2 +- .../support/StaticMessageSourceTests.java | 4 +- .../config/JeeNamespaceHandlerEventTests.java | 2 +- .../ejb/config/JeeNamespaceHandlerTests.java | 4 +- .../jmx/export/MBeanExporterTests.java | 2 +- .../jndi/JndiObjectFactoryBeanTests.java | 8 +- .../scripting/ContextScriptBean.java | 2 +- .../scripting/TestBeanAwareMessenger.java | 2 +- .../scripting/bsh/BshScriptFactoryTests.java | 2 +- .../groovy/GroovyScriptFactoryTests.java | 2 +- .../tests/sample/beans/FieldAccessBean.java | 2 +- .../org/springframework/ui/ModelMapTests.java | 2 +- .../DataBinderFieldAccessTests.java | 2 +- .../validation/DataBinderTests.java | 26 +++--- .../DefaultMessageCodesResolverTests.java | 14 ++-- .../validation/ValidationUtilsTests.java | 2 +- .../BeanValidationPostProcessorTests.java | 2 +- .../java/test/aspect/TwoAdviceAspect.java | 4 +- .../aop/aspectj/AfterAdviceBindingTests.xml | 2 +- .../AfterReturningAdviceBindingTests.xml | 4 +- .../AfterThrowingAdviceBindingTests.xml | 2 +- .../aop/aspectj/AroundAdviceBindingTests.xml | 2 +- .../aop/aspectj/AroundAdviceCircularTests.xml | 4 +- .../AspectAndAdvicePrecedenceTests.xml | 2 +- .../AspectJExpressionPointcutAdvisorTests.xml | 4 +- .../aspectj/BeanNamePointcutAtAspectTests.xml | 6 +- .../aop/aspectj/BeanNamePointcutTests.xml | 12 +-- .../aop/aspectj/BeforeAdviceBindingTests.xml | 2 +- .../aop/aspectj/DeclareParentsTests.xml | 4 +- ...plicitJPArgumentMatchingAtAspectJTests.xml | 2 +- .../ImplicitJPArgumentMatchingTests.xml | 4 +- .../OverloadedAdviceTests-ambiguous.xml | 2 +- .../aop/aspectj/OverloadedAdviceTests.xml | 2 +- ...pectImplementingInterfaceTests-context.xml | 2 +- .../AspectJAutoProxyCreatorTests-aspects.xml | 4 +- ...toProxyCreatorTests-aspectsPlusAdvisor.xml | 6 +- ...xyCreatorTests-aspectsWithAbstractBean.xml | 2 +- ...oProxyCreatorTests-aspectsWithOrdering.xml | 2 +- ...AspectJAutoProxyCreatorTests-pertarget.xml | 4 +- .../AspectJAutoProxyCreatorTests-perthis.xml | 2 +- ...JAutoProxyCreatorTests-twoAdviceAspect.xml | 2 +- ...yCreatorTests-twoAdviceAspectPrototype.xml | 2 +- ...yCreatorTests-twoAdviceAspectSingleton.xml | 2 +- ...pectJAutoProxyCreatorTests-usesInclude.xml | 2 +- ...oProxyCreatorTests-usesJoinPointAspect.xml | 2 +- .../AtAspectJAfterThrowingTests-context.xml | 2 +- .../benchmark/BenchmarkTests-aspectj.xml | 2 +- .../benchmark/BenchmarkTests-springAop.xml | 2 +- ...pNamespaceHandlerAdviceTypeTests-error.xml | 2 +- .../AopNamespaceHandlerAdviceTypeTests-ok.xml | 2 +- ...AopNamespaceHandlerArgNamesTests-error.xml | 2 +- .../AopNamespaceHandlerArgNamesTests-ok.xml | 2 +- ...ceHandlerProxyTargetClassTests-context.xml | 2 +- ...opNamespaceHandlerReturningTests-error.xml | 2 +- .../AopNamespaceHandlerReturningTests-ok.xml | 2 +- .../AopNamespaceHandlerTests-context.xml | 2 +- ...AopNamespaceHandlerThrowingTests-error.xml | 2 +- .../AopNamespaceHandlerThrowingTests-ok.xml | 2 +- .../config/PrototypeProxyTests-context.xml | 8 +- .../ProxyFactoryBeanTests-autowiring.xml | 2 +- .../ProxyFactoryBeanTests-context.xml | 26 +++--- ...xyFactoryBeanTests-double-targetsource.xml | 8 +- .../ProxyFactoryBeanTests-frozen.xml | 4 +- ...roxyFactoryBeanTests-inner-bean-target.xml | 2 +- .../ProxyFactoryBeanTests-invalid.xml | 4 +- ...yFactoryBeanTests-notlast-targetsource.xml | 4 +- .../ProxyFactoryBeanTests-prototype.xml | 4 +- .../ProxyFactoryBeanTests-serialization.xml | 10 +-- .../ProxyFactoryBeanTests-targetsource.xml | 4 +- ...visorAdapterRegistrationTests-with-bpp.xml | 4 +- ...orAdapterRegistrationTests-without-bpp.xml | 4 +- ...oProxyCreatorTests-common-interceptors.xml | 4 +- ...oProxyCreatorTests-custom-targetsource.xml | 8 +- ...AdvisorAutoProxyCreatorTests-optimized.xml | 2 +- ...toProxyCreatorTests-quick-targetsource.xml | 10 +-- ...nNameAutoProxyCreatorInitTests-context.xml | 2 +- .../BeanNameAutoProxyCreatorTests-context.xml | 16 ++-- .../aop/scope/ScopedProxyTests-list.xml | 2 +- .../aop/scope/ScopedProxyTests-override.xml | 2 +- .../aop/scope/ScopedProxyTests-testbean.xml | 2 +- .../CommonsPool2TargetSourceTests-context.xml | 4 +- ...MethodWrappedByCglibProxyTests-context.xml | 2 +- .../xml/XmlBeanFactoryTests-autowire.xml | 12 +-- .../factory/xml/XmlBeanFactoryTests-child.xml | 6 +- .../xml/XmlBeanFactoryTests-collections.xml | 46 +++++------ ...lBeanFactoryTests-complexFactoryCircle.xml | 8 +- .../XmlBeanFactoryTests-constructorArg.xml | 12 +-- ...lBeanFactoryTests-constructorOverrides.xml | 2 +- .../XmlBeanFactoryTests-defaultAutowire.xml | 8 +- .../XmlBeanFactoryTests-defaultLazyInit.xml | 2 +- ...mlBeanFactoryTests-delegationOverrides.xml | 4 +- .../xml/XmlBeanFactoryTests-factoryCircle.xml | 2 +- .../xml/XmlBeanFactoryTests-initializers.xml | 2 +- .../xml/XmlBeanFactoryTests-invalid.xml | 2 +- ...toryTests-invalidOverridesNoSuchMethod.xml | 2 +- ...nFactoryTests-localCollectionsUsingXsd.xml | 2 +- .../xml/XmlBeanFactoryTests-overrides.xml | 16 ++-- .../xml/XmlBeanFactoryTests-parent.xml | 6 +- .../xml/XmlBeanFactoryTests-reftypes.xml | 80 +++++++++---------- ...toryTests-testWithDuplicateNameInAlias.xml | 4 +- ...eanFactoryTests-testWithDuplicateNames.xml | 4 +- ...paceHandlerWithExpressionLanguageTests.xml | 4 +- .../CustomNamespaceHandlerTests-context.xml | 8 +- ...ndiBeanFactoryLocatorTests-collections.xml | 46 +++++------ ...textJndiBeanFactoryLocatorTests-parent.xml | 6 +- ...ortNonXmlResourceConfig-context.properties | 2 +- .../configuration/ImportXmlConfig-context.xml | 2 +- .../ImportXmlWithAopNamespace-context.xml | 2 +- .../support/simpleThreadScopeTests.xml | 18 ++--- .../context/support/testBeans.properties | 20 ++--- .../ejb/config/jeeNamespaceHandlerTests.xml | 14 ++-- .../scripting/bsh/MessengerImpl.bsh | 2 +- .../scripting/bsh/bsh-with-xsd.xml | 2 +- .../scripting/groovy/ScriptBean.groovy | 2 +- .../groovy/groovy-multiple-properties.xml | 2 +- .../AbstractApplicationContextTests.java | 6 +- .../jdbc/core/RowMapperTests.java | 2 +- .../BeanPropertySqlParameterSourceTests.java | 2 +- .../JdbcBeanDefinitionReaderTests.java | 4 +- .../jms/config/JmsNamespaceHandlerTests.java | 2 +- .../jms/remoting/JmsInvokerTests.java | 4 +- .../jms/config/jmsNamespaceHandlerTests.xml | 4 +- .../orm/jpa/domain/Person.java | 2 +- .../orm/jpa/domain/persistence-multi.xml | 2 +- ...dingPropertiesAndInheritedLoaderTests.java | 2 +- ...ithPropertiesExtendingPropertiesTests.java | 2 +- .../ActiveProfilesInterfaceTests.java | 2 +- .../ContextConfigurationInterfaceTests.java | 2 +- .../ContextConfigurationTestInterface.java | 2 +- ...riptDetectionGroovySpringContextTests.java | 4 +- .../groovy/GroovyControlGroupTests.java | 4 +- .../groovy/GroovySpringContextTests.java | 4 +- .../MixedXmlAndGroovySpringContextTests.java | 4 +- ...TransactionalJUnit4SpringContextTests.java | 4 +- ...ltContextLoaderClassSpringRunnerTests.java | 2 +- ...ParameterizedDependencyInjectionTests.java | 4 +- ...sedSpringJUnit4ClassRunnerAppCtxTests.java | 2 +- .../SpringJUnit4ClassRunnerAppCtxTests.java | 4 +- ...ingDefaultConfigClassesInheritedTests.java | 2 +- .../DefaultConfigClassesBaseTests.java | 2 +- .../DefaultConfigClassesInheritedTests.java | 2 +- ...ingDefaultConfigClassesInheritedTests.java | 2 +- ...ltLoaderDefaultConfigClassesBaseTests.java | 2 +- ...derDefaultConfigClassesInheritedTests.java | 2 +- ...tLoaderExplicitConfigClassesBaseTests.java | 2 +- ...erExplicitConfigClassesInheritedTests.java | 2 +- .../ExplicitConfigClassesBaseTests.java | 2 +- .../ExplicitConfigClassesInheritedTests.java | 2 +- .../annotation/PojoAndStringConfig.java | 4 +- ...mDefaultsMetaConfigWithOverridesTests.java | 4 +- .../DefaultProfileAnnotationConfigTests.java | 4 +- .../annotation/DefaultProfileConfig.java | 2 +- .../profile/annotation/DevProfileConfig.java | 2 +- .../DefaultProfileAnnotationConfigTests.java | 4 +- .../importresource/DefaultProfileConfig.java | 2 +- .../xml/DefaultProfileXmlConfigTests.java | 4 +- .../rules/ParameterizedSpringRuleTests.java | 4 +- .../spr3896/DefaultLocationsBaseTests.java | 2 +- .../DefaultLocationsInheritedTests.java | 2 +- .../spr3896/ExplicitLocationsBaseTests.java | 2 +- .../ExplicitLocationsInheritedTests.java | 2 +- ...ransactionalAnnotatedConfigClassTests.java | 2 +- ...edConfigClassWithAtConfigurationTests.java | 2 +- ...figClassesWithoutAtConfigurationTests.java | 2 +- ...otationConfigTestNGSpringContextTests.java | 4 +- ...TransactionalTestNGSpringContextTests.java | 4 +- ...TransactionalTestNGSpringContextTests.java | 4 +- .../RequestAndSessionScopedBeansWacTests.java | 2 +- ...AndInheritedLoaderTests-context.properties | 2 +- ...xtendingPropertiesTests-context.properties | 2 +- ...tionGroovySpringContextTestsContext.groovy | 4 +- .../test/context/groovy/context.groovy | 4 +- .../test/context/groovy/contextB.xml | 4 +- ...tionalJUnit4SpringContextTests-context.xml | 4 +- ...gJUnit4ClassRunnerAppCtxTests-context1.xml | 2 +- ...gJUnit4ClassRunnerAppCtxTests-context2.xml | 2 +- ...erizedDependencyInjectionTests-context.xml | 6 +- ...4ClassRunnerAppCtxTests-context.properties | 2 +- ...ngJUnit4ClassRunnerAppCtxTests-context.xml | 4 +- .../junit4/profile/importresource/import.xml | 2 +- .../DefaultProfileXmlConfigTests-context.xml | 4 +- ...DefaultLocationsInheritedTests-context.xml | 2 +- .../DefaultLocationsBaseTests-context.xml | 2 +- ...DefaultLocationsInheritedTests-context.xml | 2 +- ...tionalTestNGSpringContextTests-context.xml | 4 +- ...tAndSessionScopedBeansWacTests-context.xml | 4 +- .../TxNamespaceHandlerEventTests.java | 2 +- .../transaction/TxNamespaceHandlerTests.java | 2 +- .../AbstractTransactionAspectTests.java | 4 +- .../BeanFactoryTransactionTests.java | 6 +- .../interceptor/ImplementsNoInterfaces.java | 2 +- .../support/SimpleTransactionScopeTests.java | 4 +- .../noTransactionAttributeSource.xml | 2 +- .../interceptor/transactionalBeanFactory.xml | 12 +-- .../transaction/txNamespaceHandlerTests.xml | 2 +- .../remoting/caucho/CauchoRemotingTests.java | 4 +- .../httpinvoker/HttpInvokerTests.java | 4 +- .../web/bind/EscapedErrorsTests.java | 2 +- .../bind/ServletRequestDataBinderTests.java | 4 +- .../support/WebExchangeDataBinderTests.java | 4 +- .../support/WebRequestDataBinderTests.java | 4 +- .../RequestAndSessionScopedBeanTests.java | 2 +- .../context/request/RequestScopeTests.java | 4 +- .../request/RequestScopedProxyTests.java | 8 +- .../context/request/SessionScopeTests.java | 4 +- .../WebApplicationContextScopeTests.java | 2 +- .../SpringBeanAutowiringSupportTests.java | 4 +- .../ModelAttributeMethodProcessorTests.java | 2 +- .../SessionAttributesHandlerTests.java | 2 +- .../web/context/request/requestScopeTests.xml | 18 ++--- .../request/requestScopedProxyTests.xml | 20 ++--- .../web/context/request/sessionScopeTests.xml | 4 +- .../SessionAttributesHandlerTests.java | 2 +- .../result/view/AbstractViewTests.java | 2 +- .../view/freemarker/FreeMarkerMacroTests.java | 2 +- .../context/LifecycleContextBean.java | 2 +- .../web/context/ContextLoaderTests.java | 4 +- .../XmlWebApplicationContextTests.java | 2 +- .../support/ServletContextSupportTests.java | 2 +- .../web/servlet/DispatcherServletTests.java | 2 +- ...MvcConfigurationSupportExtensionTests.java | 2 +- .../ResponseStatusExceptionResolverTests.java | 2 +- ...ExtendedServletRequestDataBinderTests.java | 2 +- ...ResolverMethodReturnValueHandlerTests.java | 2 +- ...MappingHandlerAdapterIntegrationTests.java | 2 +- ...nnotationControllerHandlerMethodTests.java | 10 +-- ...letModelAttributeMethodProcessorTests.java | 2 +- .../DefaultHandlerExceptionResolverTests.java | 2 +- .../RedirectAttributesModelMapTests.java | 2 +- .../web/servlet/tags/BindTagTests.java | 6 +- .../tags/form/AbstractFormTagTests.java | 2 +- .../web/servlet/tags/form/ButtonTagTests.java | 2 +- .../servlet/tags/form/CheckboxTagTests.java | 6 +- .../servlet/tags/form/CheckboxesTagTests.java | 6 +- .../web/servlet/tags/form/ErrorsTagTests.java | 2 +- .../tags/form/HiddenInputTagTests.java | 2 +- .../web/servlet/tags/form/InputTagTests.java | 2 +- .../web/servlet/tags/form/LabelTagTests.java | 2 +- .../servlet/tags/form/OptionTagEnumTests.java | 4 +- .../web/servlet/tags/form/OptionTagTests.java | 4 +- .../servlet/tags/form/OptionsTagTests.java | 2 +- .../tags/form/RadioButtonTagTests.java | 4 +- .../tags/form/RadioButtonsTagTests.java | 6 +- .../web/servlet/tags/form/SelectTagTests.java | 4 +- .../tags/form/TestBeanWithRealCountry.java | 2 +- .../servlet/tags/form/TextareaTagTests.java | 2 +- .../web/servlet/view/RedirectViewTests.java | 2 +- .../web/servlet/view/ViewResolverTests.java | 2 +- .../view/freemarker/FreeMarkerMacroTests.java | 2 +- .../ContextLoaderTests-acc-context.xml | 2 +- .../context/WEB-INF/applicationContext.xml | 6 +- .../web/context/WEB-INF/context-addition.xml | 14 ++-- .../web/context/WEB-INF/contextInclude.xml | 2 +- .../web/context/WEB-INF/sessionContext.xml | 4 +- .../web/context/WEB-INF/test-servlet.xml | 16 ++-- .../web/context/WEB-INF/testNamespace.xml | 4 +- 503 files changed, 1148 insertions(+), 1142 deletions(-) rename spring-beans/src/testFixtures/java/org/springframework/beans/{test/fixtures => testfixture}/beans/AgeHolder.java (93%) rename spring-beans/src/testFixtures/java/org/springframework/beans/{test/fixtures => testfixture}/beans/AnnotatedBean.java (92%) rename spring-beans/src/testFixtures/java/org/springframework/beans/{test/fixtures => testfixture}/beans/BooleanTestBean.java (94%) rename spring-beans/src/testFixtures/java/org/springframework/beans/{test/fixtures => testfixture}/beans/CollectingReaderEventListener.java (98%) rename spring-beans/src/testFixtures/java/org/springframework/beans/{test/fixtures => testfixture}/beans/Colour.java (95%) rename spring-beans/src/testFixtures/java/org/springframework/beans/{test/fixtures => testfixture}/beans/CountingTestBean.java (93%) rename spring-beans/src/testFixtures/java/org/springframework/beans/{test/fixtures => testfixture}/beans/CustomEnum.java (93%) rename spring-beans/src/testFixtures/java/org/springframework/beans/{test/fixtures => testfixture}/beans/DependenciesBean.java (96%) rename spring-beans/src/testFixtures/java/org/springframework/beans/{test/fixtures => testfixture}/beans/DerivedTestBean.java (97%) rename spring-beans/src/testFixtures/java/org/springframework/beans/{test/fixtures => testfixture}/beans/DummyBean.java (96%) rename spring-beans/src/testFixtures/java/org/springframework/beans/{test/fixtures => testfixture}/beans/DummyFactory.java (98%) rename spring-beans/src/testFixtures/java/org/springframework/beans/{test/fixtures => testfixture}/beans/Employee.java (94%) rename spring-beans/src/testFixtures/java/org/springframework/beans/{test/fixtures => testfixture}/beans/GenericBean.java (99%) rename spring-beans/src/testFixtures/java/org/springframework/beans/{test/fixtures => testfixture}/beans/GenericIntegerBean.java (92%) rename spring-beans/src/testFixtures/java/org/springframework/beans/{test/fixtures => testfixture}/beans/GenericSetOfIntegerBean.java (93%) rename spring-beans/src/testFixtures/java/org/springframework/beans/{test/fixtures => testfixture}/beans/HasMap.java (97%) rename spring-beans/src/testFixtures/java/org/springframework/beans/{test/fixtures => testfixture}/beans/INestedTestBean.java (92%) rename spring-beans/src/testFixtures/java/org/springframework/beans/{test/fixtures => testfixture}/beans/IOther.java (92%) rename spring-beans/src/testFixtures/java/org/springframework/beans/{test/fixtures => testfixture}/beans/ITestBean.java (92%) rename spring-beans/src/testFixtures/java/org/springframework/beans/{test/fixtures => testfixture}/beans/IndexedTestBean.java (98%) rename spring-beans/src/testFixtures/java/org/springframework/beans/{test/fixtures => testfixture}/beans/LifecycleBean.java (98%) rename spring-beans/src/testFixtures/java/org/springframework/beans/{test/fixtures => testfixture}/beans/MustBeInitialized.java (96%) rename spring-beans/src/testFixtures/java/org/springframework/beans/{test/fixtures => testfixture}/beans/NestedTestBean.java (96%) rename spring-beans/src/testFixtures/java/org/springframework/beans/{test/fixtures => testfixture}/beans/NumberTestBean.java (97%) rename spring-beans/src/testFixtures/java/org/springframework/beans/{test/fixtures => testfixture}/beans/PackageLevelVisibleBean.java (93%) rename spring-beans/src/testFixtures/java/org/springframework/beans/{test/fixtures => testfixture}/beans/Person.java (94%) rename spring-beans/src/testFixtures/java/org/springframework/beans/{test/fixtures => testfixture}/beans/Pet.java (95%) rename spring-beans/src/testFixtures/java/org/springframework/beans/{test/fixtures => testfixture}/beans/SerializablePerson.java (96%) rename spring-beans/src/testFixtures/java/org/springframework/beans/{test/fixtures => testfixture}/beans/SideEffectBean.java (94%) rename spring-beans/src/testFixtures/java/org/springframework/beans/{test/fixtures => testfixture}/beans/TestAnnotation.java (93%) rename spring-beans/src/testFixtures/java/org/springframework/beans/{test/fixtures => testfixture}/beans/TestBean.java (96%) rename spring-beans/src/testFixtures/java/org/springframework/beans/{test/fixtures => testfixture}/beans/factory/DummyFactory.java (97%) rename spring-beans/src/testFixtures/java/org/springframework/beans/{test/fixtures => testfixture}/beans/package-info.java (55%) rename spring-beans/src/testFixtures/java/org/springframework/beans/{test/fixtures => testfixture}/beans/subpkg/DeepBean.java (93%) rename spring-beans/src/testFixtures/java/org/springframework/beans/{test/fixtures => testfixture}/factory/xml/AbstractBeanFactoryTests.java (96%) rename spring-beans/src/testFixtures/java/org/springframework/beans/{test/fixtures => testfixture}/factory/xml/AbstractListableBeanFactoryTests.java (90%) diff --git a/integration-tests/src/test/java/org/springframework/aop/config/AopNamespaceHandlerScopeIntegrationTests.java b/integration-tests/src/test/java/org/springframework/aop/config/AopNamespaceHandlerScopeIntegrationTests.java index b20012250c7..32ac556fe48 100644 --- a/integration-tests/src/test/java/org/springframework/aop/config/AopNamespaceHandlerScopeIntegrationTests.java +++ b/integration-tests/src/test/java/org/springframework/aop/config/AopNamespaceHandlerScopeIntegrationTests.java @@ -21,8 +21,8 @@ import org.junit.jupiter.api.Test; import org.springframework.aop.framework.Advised; import org.springframework.aop.support.AopUtils; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.test.fixtures.beans.ITestBean; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.ITestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.core.testfixture.io.SerializationTestUtils; import org.springframework.mock.web.MockHttpServletRequest; import org.springframework.mock.web.MockHttpSession; diff --git a/integration-tests/src/test/java/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorIntegrationTests.java b/integration-tests/src/test/java/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorIntegrationTests.java index e7060f90983..987c643a65c 100644 --- a/integration-tests/src/test/java/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorIntegrationTests.java +++ b/integration-tests/src/test/java/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorIntegrationTests.java @@ -28,7 +28,7 @@ import org.springframework.aop.support.AopUtils; import org.springframework.aop.support.StaticMethodMatcherPointcutAdvisor; import org.springframework.beans.factory.BeanFactory; import org.springframework.beans.factory.InitializingBean; -import org.springframework.beans.test.fixtures.beans.ITestBean; +import org.springframework.beans.testfixture.beans.ITestBean; import org.springframework.context.support.ClassPathXmlApplicationContext; import org.springframework.lang.Nullable; import org.springframework.tests.aop.advice.CountingBeforeAdvice; diff --git a/integration-tests/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerScopeIntegrationTests-context.xml b/integration-tests/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerScopeIntegrationTests-context.xml index ccbe045e9a5..ab891535b51 100644 --- a/integration-tests/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerScopeIntegrationTests-context.xml +++ b/integration-tests/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerScopeIntegrationTests-context.xml @@ -11,19 +11,19 @@ - + - + - + - + diff --git a/integration-tests/src/test/resources/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorIntegrationTests-context.xml b/integration-tests/src/test/resources/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorIntegrationTests-context.xml index 4e7280580da..ab6309ff35b 100644 --- a/integration-tests/src/test/resources/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorIntegrationTests-context.xml +++ b/integration-tests/src/test/resources/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorIntegrationTests-context.xml @@ -74,20 +74,20 @@ - + - + - org.springframework.beans.test.fixtures.beans.ITestBean.getName + org.springframework.beans.testfixture.beans.ITestBean.getName - + 4 @@ -97,7 +97,7 @@ - + diff --git a/spring-aop/src/test/java/org/springframework/aop/aspectj/AspectJExpressionPointcutTests.java b/spring-aop/src/test/java/org/springframework/aop/aspectj/AspectJExpressionPointcutTests.java index 3e9603edc18..008df78e64d 100644 --- a/spring-aop/src/test/java/org/springframework/aop/aspectj/AspectJExpressionPointcutTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/aspectj/AspectJExpressionPointcutTests.java @@ -31,10 +31,10 @@ import org.springframework.aop.MethodMatcher; import org.springframework.aop.Pointcut; import org.springframework.aop.framework.ProxyFactory; import org.springframework.aop.support.DefaultPointcutAdvisor; -import org.springframework.beans.test.fixtures.beans.IOther; -import org.springframework.beans.test.fixtures.beans.ITestBean; -import org.springframework.beans.test.fixtures.beans.TestBean; -import org.springframework.beans.test.fixtures.beans.subpkg.DeepBean; +import org.springframework.beans.testfixture.beans.IOther; +import org.springframework.beans.testfixture.beans.ITestBean; +import org.springframework.beans.testfixture.beans.TestBean; +import org.springframework.beans.testfixture.beans.subpkg.DeepBean; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; @@ -67,7 +67,7 @@ public class AspectJExpressionPointcutTests { @Test public void testMatchExplicit() { - String expression = "execution(int org.springframework.beans.test.fixtures.beans.TestBean.getAge())"; + String expression = "execution(int org.springframework.beans.testfixture.beans.TestBean.getAge())"; Pointcut pointcut = getPointcut(expression); ClassFilter classFilter = pointcut.getClassFilter(); @@ -117,8 +117,8 @@ public class AspectJExpressionPointcutTests { * @param which this or target */ private void testThisOrTarget(String which) throws SecurityException, NoSuchMethodException { - String matchesTestBean = which + "(org.springframework.beans.test.fixtures.beans.TestBean)"; - String matchesIOther = which + "(org.springframework.beans.test.fixtures.beans.IOther)"; + String matchesTestBean = which + "(org.springframework.beans.testfixture.beans.TestBean)"; + String matchesIOther = which + "(org.springframework.beans.testfixture.beans.IOther)"; AspectJExpressionPointcut testBeanPc = new AspectJExpressionPointcut(); testBeanPc.setExpression(matchesTestBean); @@ -142,7 +142,7 @@ public class AspectJExpressionPointcutTests { } private void testWithinPackage(boolean matchSubpackages) throws SecurityException, NoSuchMethodException { - String withinBeansPackage = "within(org.springframework.beans.test.fixtures.beans."; + String withinBeansPackage = "within(org.springframework.beans.testfixture.beans."; // Subpackages are matched by ** if (matchSubpackages) { withinBeansPackage += "."; @@ -187,7 +187,7 @@ public class AspectJExpressionPointcutTests { @Test public void testMatchWithArgs() throws Exception { - String expression = "execution(void org.springframework.beans.test.fixtures.beans.TestBean.setSomeNumber(Number)) && args(Double)"; + String expression = "execution(void org.springframework.beans.testfixture.beans.TestBean.setSomeNumber(Number)) && args(Double)"; Pointcut pointcut = getPointcut(expression); ClassFilter classFilter = pointcut.getClassFilter(); @@ -206,7 +206,7 @@ public class AspectJExpressionPointcutTests { @Test public void testSimpleAdvice() { - String expression = "execution(int org.springframework.beans.test.fixtures.beans.TestBean.getAge())"; + String expression = "execution(int org.springframework.beans.testfixture.beans.TestBean.getAge())"; CallCountingInterceptor interceptor = new CallCountingInterceptor(); TestBean testBean = getAdvisedProxy(expression, interceptor); @@ -219,7 +219,7 @@ public class AspectJExpressionPointcutTests { @Test public void testDynamicMatchingProxy() { - String expression = "execution(void org.springframework.beans.test.fixtures.beans.TestBean.setSomeNumber(Number)) && args(Double)"; + String expression = "execution(void org.springframework.beans.testfixture.beans.TestBean.setSomeNumber(Number)) && args(Double)"; CallCountingInterceptor interceptor = new CallCountingInterceptor(); TestBean testBean = getAdvisedProxy(expression, interceptor); @@ -233,7 +233,7 @@ public class AspectJExpressionPointcutTests { @Test public void testInvalidExpression() { - String expression = "execution(void org.springframework.beans.test.fixtures.beans.TestBean.setSomeNumber(Number) && args(Double)"; + String expression = "execution(void org.springframework.beans.testfixture.beans.TestBean.setSomeNumber(Number) && args(Double)"; assertThatIllegalArgumentException().isThrownBy( getPointcut(expression)::getClassFilter); // call to getClassFilter forces resolution } @@ -264,7 +264,7 @@ public class AspectJExpressionPointcutTests { @Test public void testWithUnsupportedPointcutPrimitive() { - String expression = "call(int org.springframework.beans.test.fixtures.beans.TestBean.getAge())"; + String expression = "call(int org.springframework.beans.testfixture.beans.TestBean.getAge())"; assertThatExceptionOfType(UnsupportedPointcutPrimitiveException.class).isThrownBy(() -> getPointcut(expression).getClassFilter()) // call to getClassFilter forces resolution... .satisfies(ex -> assertThat(ex.getUnsupportedPrimitive()).isEqualTo(PointcutPrimitive.CALL)); diff --git a/spring-aop/src/test/java/org/springframework/aop/aspectj/BeanNamePointcutMatchingTests.java b/spring-aop/src/test/java/org/springframework/aop/aspectj/BeanNamePointcutMatchingTests.java index f64fbdaf301..3fd1b1e0c84 100644 --- a/spring-aop/src/test/java/org/springframework/aop/aspectj/BeanNamePointcutMatchingTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/aspectj/BeanNamePointcutMatchingTests.java @@ -18,7 +18,7 @@ package org.springframework.aop.aspectj; import org.junit.jupiter.api.Test; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-aop/src/test/java/org/springframework/aop/aspectj/MethodInvocationProceedingJoinPointTests.java b/spring-aop/src/test/java/org/springframework/aop/aspectj/MethodInvocationProceedingJoinPointTests.java index 157c85f0e64..4591b74624a 100644 --- a/spring-aop/src/test/java/org/springframework/aop/aspectj/MethodInvocationProceedingJoinPointTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/aspectj/MethodInvocationProceedingJoinPointTests.java @@ -33,8 +33,8 @@ import org.springframework.aop.framework.AopContext; import org.springframework.aop.framework.ProxyFactory; import org.springframework.aop.interceptor.ExposeInvocationInterceptor; import org.springframework.aop.support.AopUtils; -import org.springframework.beans.test.fixtures.beans.ITestBean; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.ITestBean; +import org.springframework.beans.testfixture.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; diff --git a/spring-aop/src/test/java/org/springframework/aop/aspectj/TigerAspectJExpressionPointcutTests.java b/spring-aop/src/test/java/org/springframework/aop/aspectj/TigerAspectJExpressionPointcutTests.java index 6a87160981f..23d63fb1bea 100644 --- a/spring-aop/src/test/java/org/springframework/aop/aspectj/TigerAspectJExpressionPointcutTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/aspectj/TigerAspectJExpressionPointcutTests.java @@ -27,7 +27,7 @@ import test.annotation.EmptySpringAnnotation; import test.annotation.transaction.Tx; import org.springframework.aop.framework.ProxyFactory; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; @@ -56,7 +56,7 @@ public class TigerAspectJExpressionPointcutTests { @Test public void testMatchGenericArgument() { - String expression = "execution(* set*(java.util.List) )"; + String expression = "execution(* set*(java.util.List) )"; AspectJExpressionPointcut ajexp = new AspectJExpressionPointcut(); ajexp.setExpression(expression); diff --git a/spring-aop/src/test/java/org/springframework/aop/aspectj/TypePatternClassFilterTests.java b/spring-aop/src/test/java/org/springframework/aop/aspectj/TypePatternClassFilterTests.java index c9571051742..43373063622 100644 --- a/spring-aop/src/test/java/org/springframework/aop/aspectj/TypePatternClassFilterTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/aspectj/TypePatternClassFilterTests.java @@ -20,11 +20,11 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.factory.BeanFactory; import org.springframework.beans.factory.support.DefaultListableBeanFactory; -import org.springframework.beans.test.fixtures.beans.CountingTestBean; -import org.springframework.beans.test.fixtures.beans.IOther; -import org.springframework.beans.test.fixtures.beans.ITestBean; -import org.springframework.beans.test.fixtures.beans.TestBean; -import org.springframework.beans.test.fixtures.beans.subpkg.DeepBean; +import org.springframework.beans.testfixture.beans.CountingTestBean; +import org.springframework.beans.testfixture.beans.IOther; +import org.springframework.beans.testfixture.beans.ITestBean; +import org.springframework.beans.testfixture.beans.TestBean; +import org.springframework.beans.testfixture.beans.subpkg.DeepBean; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException; @@ -57,7 +57,7 @@ class TypePatternClassFilterTests { @Test void validPatternMatching() { - TypePatternClassFilter tpcf = new TypePatternClassFilter("org.springframework.beans.test.fixtures.beans.*"); + TypePatternClassFilter tpcf = new TypePatternClassFilter("org.springframework.beans.testfixture.beans.*"); assertThat(tpcf.matches(TestBean.class)).as("Must match: in package").isTrue(); assertThat(tpcf.matches(ITestBean.class)).as("Must match: in package").isTrue(); @@ -70,7 +70,7 @@ class TypePatternClassFilterTests { @Test void subclassMatching() { - TypePatternClassFilter tpcf = new TypePatternClassFilter("org.springframework.beans.test.fixtures.beans.ITestBean+"); + TypePatternClassFilter tpcf = new TypePatternClassFilter("org.springframework.beans.testfixture.beans.ITestBean+"); assertThat(tpcf.matches(TestBean.class)).as("Must match: in package").isTrue(); assertThat(tpcf.matches(ITestBean.class)).as("Must match: in package").isTrue(); @@ -98,8 +98,8 @@ class TypePatternClassFilterTests { @Test void testEquals() { - TypePatternClassFilter filter1 = new TypePatternClassFilter("org.springframework.beans.test.fixtures.beans.*"); - TypePatternClassFilter filter2 = new TypePatternClassFilter("org.springframework.beans.test.fixtures.beans.*"); + TypePatternClassFilter filter1 = new TypePatternClassFilter("org.springframework.beans.testfixture.beans.*"); + TypePatternClassFilter filter2 = new TypePatternClassFilter("org.springframework.beans.testfixture.beans.*"); TypePatternClassFilter filter3 = new TypePatternClassFilter("org.springframework.tests.*"); assertThat(filter1).isEqualTo(filter2); @@ -108,8 +108,8 @@ class TypePatternClassFilterTests { @Test void testHashCode() { - TypePatternClassFilter filter1 = new TypePatternClassFilter("org.springframework.beans.test.fixtures.beans.*"); - TypePatternClassFilter filter2 = new TypePatternClassFilter("org.springframework.beans.test.fixtures.beans.*"); + TypePatternClassFilter filter1 = new TypePatternClassFilter("org.springframework.beans.testfixture.beans.*"); + TypePatternClassFilter filter2 = new TypePatternClassFilter("org.springframework.beans.testfixture.beans.*"); TypePatternClassFilter filter3 = new TypePatternClassFilter("org.springframework.tests.*"); assertThat(filter1.hashCode()).isEqualTo(filter2.hashCode()); @@ -118,11 +118,11 @@ class TypePatternClassFilterTests { @Test void testToString() { - TypePatternClassFilter filter1 = new TypePatternClassFilter("org.springframework.beans.test.fixtures.beans.*"); - TypePatternClassFilter filter2 = new TypePatternClassFilter("org.springframework.beans.test.fixtures.beans.*"); + TypePatternClassFilter filter1 = new TypePatternClassFilter("org.springframework.beans.testfixture.beans.*"); + TypePatternClassFilter filter2 = new TypePatternClassFilter("org.springframework.beans.testfixture.beans.*"); assertThat(filter1.toString()) - .isEqualTo("org.springframework.aop.aspectj.TypePatternClassFilter: org.springframework.beans.test.fixtures.beans.*"); + .isEqualTo("org.springframework.aop.aspectj.TypePatternClassFilter: org.springframework.beans.testfixture.beans.*"); assertThat(filter1.toString()).isEqualTo(filter2.toString()); } diff --git a/spring-aop/src/test/java/org/springframework/aop/aspectj/annotation/AbstractAspectJAdvisorFactoryTests.java b/spring-aop/src/test/java/org/springframework/aop/aspectj/annotation/AbstractAspectJAdvisorFactoryTests.java index c71218f6384..88bfdfb30b9 100644 --- a/spring-aop/src/test/java/org/springframework/aop/aspectj/annotation/AbstractAspectJAdvisorFactoryTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/aspectj/annotation/AbstractAspectJAdvisorFactoryTests.java @@ -50,8 +50,8 @@ import org.springframework.aop.framework.AopConfigException; import org.springframework.aop.framework.ProxyFactory; import org.springframework.aop.interceptor.ExposeInvocationInterceptor; import org.springframework.aop.support.AopUtils; -import org.springframework.beans.test.fixtures.beans.ITestBean; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.ITestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.core.OrderComparator; import org.springframework.core.Ordered; import org.springframework.core.annotation.Order; @@ -590,7 +590,7 @@ public abstract class AbstractAspectJAdvisorFactoryTests { } - @Aspect("pertypewithin(org.springframework.beans.test.fixtures.beans.IOther+)") + @Aspect("pertypewithin(org.springframework.beans.testfixture.beans.IOther+)") public static class PerTypeWithinAspect { public int count; @@ -931,7 +931,7 @@ abstract class AbstractMakeModifiable { @Aspect class MakeITestBeanModifiable extends AbstractMakeModifiable { - @DeclareParents(value = "org.springframework.beans.test.fixtures.beans.ITestBean+", + @DeclareParents(value = "org.springframework.beans.testfixture.beans.ITestBean+", defaultImpl=ModifiableImpl.class) public static MutableModifiable mixin; diff --git a/spring-aop/src/test/java/org/springframework/aop/aspectj/annotation/ArgumentBindingTests.java b/spring-aop/src/test/java/org/springframework/aop/aspectj/annotation/ArgumentBindingTests.java index 432dfef3757..835f4a4f95c 100644 --- a/spring-aop/src/test/java/org/springframework/aop/aspectj/annotation/ArgumentBindingTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/aspectj/annotation/ArgumentBindingTests.java @@ -27,8 +27,8 @@ import org.aspectj.lang.annotation.Pointcut; import org.junit.jupiter.api.Test; import org.springframework.aop.aspectj.AspectJAdviceParameterNameDiscoverer; -import org.springframework.beans.test.fixtures.beans.ITestBean; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.ITestBean; +import org.springframework.beans.testfixture.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException; diff --git a/spring-aop/src/test/java/org/springframework/aop/aspectj/annotation/AspectJPointcutAdvisorTests.java b/spring-aop/src/test/java/org/springframework/aop/aspectj/annotation/AspectJPointcutAdvisorTests.java index 02345f25229..b944da483e0 100644 --- a/spring-aop/src/test/java/org/springframework/aop/aspectj/annotation/AspectJPointcutAdvisorTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/aspectj/annotation/AspectJPointcutAdvisorTests.java @@ -23,7 +23,7 @@ import org.springframework.aop.Pointcut; import org.springframework.aop.aspectj.AspectJExpressionPointcut; import org.springframework.aop.aspectj.AspectJExpressionPointcutTests; import org.springframework.aop.framework.AopConfigException; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; diff --git a/spring-aop/src/test/java/org/springframework/aop/aspectj/autoproxy/AspectJNamespaceHandlerTests.java b/spring-aop/src/test/java/org/springframework/aop/aspectj/autoproxy/AspectJNamespaceHandlerTests.java index c8188315f7e..a6ecf37304d 100644 --- a/spring-aop/src/test/java/org/springframework/aop/aspectj/autoproxy/AspectJNamespaceHandlerTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/aspectj/autoproxy/AspectJNamespaceHandlerTests.java @@ -29,7 +29,7 @@ import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.xml.ParserContext; import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; import org.springframework.beans.factory.xml.XmlReaderContext; -import org.springframework.beans.test.fixtures.beans.CollectingReaderEventListener; +import org.springframework.beans.testfixture.beans.CollectingReaderEventListener; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-aop/src/test/java/org/springframework/aop/config/AopNamespaceHandlerEventTests.java b/spring-aop/src/test/java/org/springframework/aop/config/AopNamespaceHandlerEventTests.java index c9d752c1699..d4c774424d0 100644 --- a/spring-aop/src/test/java/org/springframework/aop/config/AopNamespaceHandlerEventTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/config/AopNamespaceHandlerEventTests.java @@ -29,7 +29,7 @@ import org.springframework.beans.factory.parsing.ComponentDefinition; import org.springframework.beans.factory.parsing.CompositeComponentDefinition; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; -import org.springframework.beans.test.fixtures.beans.CollectingReaderEventListener; +import org.springframework.beans.testfixture.beans.CollectingReaderEventListener; import org.springframework.core.io.Resource; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-aop/src/test/java/org/springframework/aop/framework/AopProxyUtilsTests.java b/spring-aop/src/test/java/org/springframework/aop/framework/AopProxyUtilsTests.java index eaa9e7ff524..c8475794f33 100644 --- a/spring-aop/src/test/java/org/springframework/aop/framework/AopProxyUtilsTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/framework/AopProxyUtilsTests.java @@ -23,8 +23,8 @@ import java.util.List; import org.junit.jupiter.api.Test; import org.springframework.aop.SpringProxy; -import org.springframework.beans.test.fixtures.beans.ITestBean; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.ITestBean; +import org.springframework.beans.testfixture.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException; diff --git a/spring-aop/src/test/java/org/springframework/aop/framework/IntroductionBenchmarkTests.java b/spring-aop/src/test/java/org/springframework/aop/framework/IntroductionBenchmarkTests.java index 98493976ca4..d3defccfb42 100644 --- a/spring-aop/src/test/java/org/springframework/aop/framework/IntroductionBenchmarkTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/framework/IntroductionBenchmarkTests.java @@ -19,8 +19,8 @@ package org.springframework.aop.framework; import org.junit.jupiter.api.Test; import org.springframework.aop.support.DelegatingIntroductionInterceptor; -import org.springframework.beans.test.fixtures.beans.ITestBean; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.ITestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.util.StopWatch; /** diff --git a/spring-aop/src/test/java/org/springframework/aop/framework/MethodInvocationTests.java b/spring-aop/src/test/java/org/springframework/aop/framework/MethodInvocationTests.java index dbbaaf60af9..91091035aac 100644 --- a/spring-aop/src/test/java/org/springframework/aop/framework/MethodInvocationTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/framework/MethodInvocationTests.java @@ -23,7 +23,7 @@ import java.util.List; import org.aopalliance.intercept.MethodInterceptor; import org.junit.jupiter.api.Test; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-aop/src/test/java/org/springframework/aop/framework/ProxyFactoryTests.java b/spring-aop/src/test/java/org/springframework/aop/framework/ProxyFactoryTests.java index 39b93fe473c..033824508e2 100644 --- a/spring-aop/src/test/java/org/springframework/aop/framework/ProxyFactoryTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/framework/ProxyFactoryTests.java @@ -34,9 +34,9 @@ import org.springframework.aop.support.AopUtils; import org.springframework.aop.support.DefaultIntroductionAdvisor; import org.springframework.aop.support.DefaultPointcutAdvisor; import org.springframework.aop.support.DelegatingIntroductionInterceptor; -import org.springframework.beans.test.fixtures.beans.IOther; -import org.springframework.beans.test.fixtures.beans.ITestBean; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.IOther; +import org.springframework.beans.testfixture.beans.ITestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.core.annotation.AnnotationAwareOrderComparator; import org.springframework.core.annotation.Order; import org.springframework.core.testfixture.TimeStamped; diff --git a/spring-aop/src/test/java/org/springframework/aop/interceptor/ConcurrencyThrottleInterceptorTests.java b/spring-aop/src/test/java/org/springframework/aop/interceptor/ConcurrencyThrottleInterceptorTests.java index f06491d000b..43e4a93ded8 100644 --- a/spring-aop/src/test/java/org/springframework/aop/interceptor/ConcurrencyThrottleInterceptorTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/interceptor/ConcurrencyThrottleInterceptorTests.java @@ -22,9 +22,9 @@ import org.junit.jupiter.api.Test; import org.springframework.aop.framework.Advised; import org.springframework.aop.framework.ProxyFactory; -import org.springframework.beans.test.fixtures.beans.DerivedTestBean; -import org.springframework.beans.test.fixtures.beans.ITestBean; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.DerivedTestBean; +import org.springframework.beans.testfixture.beans.ITestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.core.testfixture.io.SerializationTestUtils; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-aop/src/test/java/org/springframework/aop/interceptor/ExposeBeanNameAdvisorsTests.java b/spring-aop/src/test/java/org/springframework/aop/interceptor/ExposeBeanNameAdvisorsTests.java index 2fb5200e4b4..9bd43d1aef3 100644 --- a/spring-aop/src/test/java/org/springframework/aop/interceptor/ExposeBeanNameAdvisorsTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/interceptor/ExposeBeanNameAdvisorsTests.java @@ -20,8 +20,8 @@ import org.junit.jupiter.api.Test; import org.springframework.aop.framework.ProxyFactory; import org.springframework.beans.factory.NamedBean; -import org.springframework.beans.test.fixtures.beans.ITestBean; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.ITestBean; +import org.springframework.beans.testfixture.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-aop/src/test/java/org/springframework/aop/interceptor/ExposeInvocationInterceptorTests.java b/spring-aop/src/test/java/org/springframework/aop/interceptor/ExposeInvocationInterceptorTests.java index e9f6a3f0cb8..40f266f6471 100644 --- a/spring-aop/src/test/java/org/springframework/aop/interceptor/ExposeInvocationInterceptorTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/interceptor/ExposeInvocationInterceptorTests.java @@ -21,8 +21,8 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; -import org.springframework.beans.test.fixtures.beans.ITestBean; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.ITestBean; +import org.springframework.beans.testfixture.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; import static org.springframework.core.testfixture.io.ResourceTestUtils.qualifiedResource; diff --git a/spring-aop/src/test/java/org/springframework/aop/support/AbstractRegexpMethodPointcutTests.java b/spring-aop/src/test/java/org/springframework/aop/support/AbstractRegexpMethodPointcutTests.java index 880757dcbf9..aa8cd95dc9a 100644 --- a/spring-aop/src/test/java/org/springframework/aop/support/AbstractRegexpMethodPointcutTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/support/AbstractRegexpMethodPointcutTests.java @@ -21,7 +21,7 @@ import java.io.IOException; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.core.testfixture.io.SerializationTestUtils; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-aop/src/test/java/org/springframework/aop/support/AopUtilsTests.java b/spring-aop/src/test/java/org/springframework/aop/support/AopUtilsTests.java index cf1e22c356b..eeeedd8efb9 100644 --- a/spring-aop/src/test/java/org/springframework/aop/support/AopUtilsTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/support/AopUtilsTests.java @@ -25,7 +25,7 @@ import org.springframework.aop.MethodMatcher; import org.springframework.aop.Pointcut; import org.springframework.aop.interceptor.ExposeInvocationInterceptor; import org.springframework.aop.target.EmptyTargetSource; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.core.testfixture.io.SerializationTestUtils; import org.springframework.lang.Nullable; import org.springframework.tests.aop.interceptor.NopInterceptor; diff --git a/spring-aop/src/test/java/org/springframework/aop/support/ClassFiltersTests.java b/spring-aop/src/test/java/org/springframework/aop/support/ClassFiltersTests.java index de4fecfecc2..db83a9424df 100644 --- a/spring-aop/src/test/java/org/springframework/aop/support/ClassFiltersTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/support/ClassFiltersTests.java @@ -19,8 +19,8 @@ package org.springframework.aop.support; import org.junit.jupiter.api.Test; import org.springframework.aop.ClassFilter; -import org.springframework.beans.test.fixtures.beans.ITestBean; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.ITestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.core.NestedRuntimeException; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-aop/src/test/java/org/springframework/aop/support/ClassUtilsTests.java b/spring-aop/src/test/java/org/springframework/aop/support/ClassUtilsTests.java index 5e07be7dd19..6eac64eb77b 100644 --- a/spring-aop/src/test/java/org/springframework/aop/support/ClassUtilsTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/support/ClassUtilsTests.java @@ -18,7 +18,7 @@ package org.springframework.aop.support; import org.junit.jupiter.api.Test; import org.springframework.aop.framework.ProxyFactory; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.util.ClassUtils; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-aop/src/test/java/org/springframework/aop/support/ComposablePointcutTests.java b/spring-aop/src/test/java/org/springframework/aop/support/ComposablePointcutTests.java index 769db77bf04..87b408222c2 100644 --- a/spring-aop/src/test/java/org/springframework/aop/support/ComposablePointcutTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/support/ComposablePointcutTests.java @@ -23,7 +23,7 @@ import org.junit.jupiter.api.Test; import org.springframework.aop.ClassFilter; import org.springframework.aop.MethodMatcher; import org.springframework.aop.Pointcut; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.core.NestedRuntimeException; import org.springframework.lang.Nullable; diff --git a/spring-aop/src/test/java/org/springframework/aop/support/ControlFlowPointcutTests.java b/spring-aop/src/test/java/org/springframework/aop/support/ControlFlowPointcutTests.java index 956143c3a3e..69251aaebc4 100644 --- a/spring-aop/src/test/java/org/springframework/aop/support/ControlFlowPointcutTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/support/ControlFlowPointcutTests.java @@ -20,8 +20,8 @@ import org.junit.jupiter.api.Test; import org.springframework.aop.Pointcut; import org.springframework.aop.framework.ProxyFactory; -import org.springframework.beans.test.fixtures.beans.ITestBean; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.ITestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.tests.aop.interceptor.NopInterceptor; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-aop/src/test/java/org/springframework/aop/support/DelegatingIntroductionInterceptorTests.java b/spring-aop/src/test/java/org/springframework/aop/support/DelegatingIntroductionInterceptorTests.java index 9cb1a04934b..b0330ff6821 100644 --- a/spring-aop/src/test/java/org/springframework/aop/support/DelegatingIntroductionInterceptorTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/support/DelegatingIntroductionInterceptorTests.java @@ -24,12 +24,12 @@ import org.junit.jupiter.api.Test; import org.springframework.aop.IntroductionAdvisor; import org.springframework.aop.IntroductionInterceptor; import org.springframework.aop.framework.ProxyFactory; -import org.springframework.beans.test.fixtures.beans.INestedTestBean; -import org.springframework.beans.test.fixtures.beans.ITestBean; -import org.springframework.beans.test.fixtures.beans.NestedTestBean; -import org.springframework.beans.test.fixtures.beans.Person; -import org.springframework.beans.test.fixtures.beans.SerializablePerson; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.INestedTestBean; +import org.springframework.beans.testfixture.beans.ITestBean; +import org.springframework.beans.testfixture.beans.NestedTestBean; +import org.springframework.beans.testfixture.beans.Person; +import org.springframework.beans.testfixture.beans.SerializablePerson; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.core.testfixture.TimeStamped; import org.springframework.core.testfixture.io.SerializationTestUtils; import org.springframework.tests.aop.interceptor.SerializableNopInterceptor; diff --git a/spring-aop/src/test/java/org/springframework/aop/support/MethodMatchersTests.java b/spring-aop/src/test/java/org/springframework/aop/support/MethodMatchersTests.java index df7b67dfaf2..d7d3a5ceb4c 100644 --- a/spring-aop/src/test/java/org/springframework/aop/support/MethodMatchersTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/support/MethodMatchersTests.java @@ -21,9 +21,9 @@ import java.lang.reflect.Method; import org.junit.jupiter.api.Test; import org.springframework.aop.MethodMatcher; -import org.springframework.beans.test.fixtures.beans.IOther; -import org.springframework.beans.test.fixtures.beans.ITestBean; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.IOther; +import org.springframework.beans.testfixture.beans.ITestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.core.testfixture.io.SerializationTestUtils; import org.springframework.lang.Nullable; diff --git a/spring-aop/src/test/java/org/springframework/aop/support/NameMatchMethodPointcutTests.java b/spring-aop/src/test/java/org/springframework/aop/support/NameMatchMethodPointcutTests.java index 8a9f1ec1e3e..e344536e21a 100644 --- a/spring-aop/src/test/java/org/springframework/aop/support/NameMatchMethodPointcutTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/support/NameMatchMethodPointcutTests.java @@ -21,8 +21,8 @@ import org.junit.jupiter.api.Test; import org.springframework.aop.framework.Advised; import org.springframework.aop.framework.ProxyFactory; -import org.springframework.beans.test.fixtures.beans.Person; -import org.springframework.beans.test.fixtures.beans.SerializablePerson; +import org.springframework.beans.testfixture.beans.Person; +import org.springframework.beans.testfixture.beans.SerializablePerson; import org.springframework.core.testfixture.io.SerializationTestUtils; import org.springframework.tests.aop.interceptor.NopInterceptor; import org.springframework.tests.aop.interceptor.SerializableNopInterceptor; diff --git a/spring-aop/src/test/java/org/springframework/aop/support/PointcutsTests.java b/spring-aop/src/test/java/org/springframework/aop/support/PointcutsTests.java index 0b913b97030..22940cf59f6 100644 --- a/spring-aop/src/test/java/org/springframework/aop/support/PointcutsTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/support/PointcutsTests.java @@ -22,7 +22,7 @@ import org.junit.jupiter.api.Test; import org.springframework.aop.ClassFilter; import org.springframework.aop.Pointcut; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.lang.Nullable; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-aop/src/test/java/org/springframework/aop/support/RegexpMethodPointcutAdvisorIntegrationTests.java b/spring-aop/src/test/java/org/springframework/aop/support/RegexpMethodPointcutAdvisorIntegrationTests.java index 1782124f278..00021faeb8f 100644 --- a/spring-aop/src/test/java/org/springframework/aop/support/RegexpMethodPointcutAdvisorIntegrationTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/support/RegexpMethodPointcutAdvisorIntegrationTests.java @@ -21,9 +21,9 @@ import org.junit.jupiter.api.Test; import org.springframework.aop.framework.Advised; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; -import org.springframework.beans.test.fixtures.beans.ITestBean; -import org.springframework.beans.test.fixtures.beans.Person; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.ITestBean; +import org.springframework.beans.testfixture.beans.Person; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.core.io.Resource; import org.springframework.core.testfixture.io.SerializationTestUtils; import org.springframework.tests.aop.interceptor.NopInterceptor; diff --git a/spring-aop/src/test/java/org/springframework/aop/support/RootClassFilterTests.java b/spring-aop/src/test/java/org/springframework/aop/support/RootClassFilterTests.java index 184858d27f0..e09344b35bc 100644 --- a/spring-aop/src/test/java/org/springframework/aop/support/RootClassFilterTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/support/RootClassFilterTests.java @@ -19,7 +19,7 @@ package org.springframework.aop.support; import org.junit.jupiter.api.Test; import org.springframework.aop.ClassFilter; -import org.springframework.beans.test.fixtures.beans.ITestBean; +import org.springframework.beans.testfixture.beans.ITestBean; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-aop/src/test/java/org/springframework/aop/target/CommonsPool2TargetSourceProxyTests.java b/spring-aop/src/test/java/org/springframework/aop/target/CommonsPool2TargetSourceProxyTests.java index 609f159a9da..6637815d058 100644 --- a/spring-aop/src/test/java/org/springframework/aop/target/CommonsPool2TargetSourceProxyTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/target/CommonsPool2TargetSourceProxyTests.java @@ -21,7 +21,7 @@ import org.junit.jupiter.api.Test; import org.springframework.aop.support.AopUtils; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; -import org.springframework.beans.test.fixtures.beans.ITestBean; +import org.springframework.beans.testfixture.beans.ITestBean; import org.springframework.core.io.Resource; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-aop/src/test/java/org/springframework/aop/target/HotSwappableTargetSourceTests.java b/spring-aop/src/test/java/org/springframework/aop/target/HotSwappableTargetSourceTests.java index d48d213f8d2..ca10d0f1b93 100644 --- a/spring-aop/src/test/java/org/springframework/aop/target/HotSwappableTargetSourceTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/target/HotSwappableTargetSourceTests.java @@ -25,9 +25,9 @@ import org.springframework.aop.framework.ProxyFactory; import org.springframework.aop.support.DefaultPointcutAdvisor; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; -import org.springframework.beans.test.fixtures.beans.Person; -import org.springframework.beans.test.fixtures.beans.SerializablePerson; -import org.springframework.beans.test.fixtures.beans.SideEffectBean; +import org.springframework.beans.testfixture.beans.Person; +import org.springframework.beans.testfixture.beans.SerializablePerson; +import org.springframework.beans.testfixture.beans.SideEffectBean; import org.springframework.core.testfixture.io.SerializationTestUtils; import org.springframework.tests.aop.interceptor.SerializableNopInterceptor; diff --git a/spring-aop/src/test/java/org/springframework/aop/target/LazyInitTargetSourceTests.java b/spring-aop/src/test/java/org/springframework/aop/target/LazyInitTargetSourceTests.java index 3a727692181..6c38a0f04fc 100644 --- a/spring-aop/src/test/java/org/springframework/aop/target/LazyInitTargetSourceTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/target/LazyInitTargetSourceTests.java @@ -22,7 +22,7 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; -import org.springframework.beans.test.fixtures.beans.ITestBean; +import org.springframework.beans.testfixture.beans.ITestBean; import org.springframework.core.io.Resource; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-aop/src/test/java/org/springframework/aop/target/PrototypeBasedTargetSourceTests.java b/spring-aop/src/test/java/org/springframework/aop/target/PrototypeBasedTargetSourceTests.java index dc3da8eff31..3a84193d50f 100644 --- a/spring-aop/src/test/java/org/springframework/aop/target/PrototypeBasedTargetSourceTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/target/PrototypeBasedTargetSourceTests.java @@ -23,8 +23,8 @@ import org.springframework.beans.MutablePropertyValues; import org.springframework.beans.factory.config.BeanDefinition; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.support.RootBeanDefinition; -import org.springframework.beans.test.fixtures.beans.SerializablePerson; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.SerializablePerson; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.core.testfixture.io.SerializationTestUtils; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-aop/src/test/java/org/springframework/aop/target/PrototypeTargetSourceTests.java b/spring-aop/src/test/java/org/springframework/aop/target/PrototypeTargetSourceTests.java index 4be4d16b5a3..7871e1072d1 100644 --- a/spring-aop/src/test/java/org/springframework/aop/target/PrototypeTargetSourceTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/target/PrototypeTargetSourceTests.java @@ -21,7 +21,7 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; -import org.springframework.beans.test.fixtures.beans.SideEffectBean; +import org.springframework.beans.testfixture.beans.SideEffectBean; import static org.assertj.core.api.Assertions.assertThat; import static org.springframework.core.testfixture.io.ResourceTestUtils.qualifiedResource; diff --git a/spring-aop/src/test/java/org/springframework/aop/target/ThreadLocalTargetSourceTests.java b/spring-aop/src/test/java/org/springframework/aop/target/ThreadLocalTargetSourceTests.java index 9cfa6d4848b..7cb788ed1ac 100644 --- a/spring-aop/src/test/java/org/springframework/aop/target/ThreadLocalTargetSourceTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/target/ThreadLocalTargetSourceTests.java @@ -21,8 +21,8 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; -import org.springframework.beans.test.fixtures.beans.ITestBean; -import org.springframework.beans.test.fixtures.beans.SideEffectBean; +import org.springframework.beans.testfixture.beans.ITestBean; +import org.springframework.beans.testfixture.beans.SideEffectBean; import static org.assertj.core.api.Assertions.assertThat; import static org.springframework.core.testfixture.io.ResourceTestUtils.qualifiedResource; diff --git a/spring-aop/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerEventTests-context.xml b/spring-aop/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerEventTests-context.xml index 745dbc3e40f..64f222cdd37 100644 --- a/spring-aop/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerEventTests-context.xml +++ b/spring-aop/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerEventTests-context.xml @@ -20,7 +20,7 @@ - + diff --git a/spring-aop/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerPointcutErrorTests-pointcutDuplication.xml b/spring-aop/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerPointcutErrorTests-pointcutDuplication.xml index 59bd49621c6..33693b7c1c4 100644 --- a/spring-aop/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerPointcutErrorTests-pointcutDuplication.xml +++ b/spring-aop/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerPointcutErrorTests-pointcutDuplication.xml @@ -14,7 +14,7 @@ - + diff --git a/spring-aop/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerPointcutErrorTests-pointcutMissing.xml b/spring-aop/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerPointcutErrorTests-pointcutMissing.xml index 955540049e9..3d2037805e4 100644 --- a/spring-aop/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerPointcutErrorTests-pointcutMissing.xml +++ b/spring-aop/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerPointcutErrorTests-pointcutMissing.xml @@ -14,7 +14,7 @@ - + diff --git a/spring-aop/src/test/resources/org/springframework/aop/support/RegexpMethodPointcutAdvisorIntegrationTests-context.xml b/spring-aop/src/test/resources/org/springframework/aop/support/RegexpMethodPointcutAdvisorIntegrationTests-context.xml index 7ce48dc01ed..b4e8fec10d2 100644 --- a/spring-aop/src/test/resources/org/springframework/aop/support/RegexpMethodPointcutAdvisorIntegrationTests-context.xml +++ b/spring-aop/src/test/resources/org/springframework/aop/support/RegexpMethodPointcutAdvisorIntegrationTests-context.xml @@ -4,7 +4,7 @@ - + custom 666 @@ -21,15 +21,15 @@ - org.springframework.beans.test.fixtures.beans.ITestBean + org.springframework.beans.testfixture.beans.ITestBean settersAdvisor - org.springframework.beans.test.fixtures.beans.Person + org.springframework.beans.testfixture.beans.Person - + serializableSettersAdvised @@ -48,7 +48,7 @@ - org.springframework.beans.test.fixtures.beans.ITestBean + org.springframework.beans.testfixture.beans.ITestBean true diff --git a/spring-aop/src/test/resources/org/springframework/aop/target/CommonsPool2TargetSourceProxyTests-context.xml b/spring-aop/src/test/resources/org/springframework/aop/target/CommonsPool2TargetSourceProxyTests-context.xml index a18634ee9ff..c0bbd2fe909 100644 --- a/spring-aop/src/test/resources/org/springframework/aop/target/CommonsPool2TargetSourceProxyTests-context.xml +++ b/spring-aop/src/test/resources/org/springframework/aop/target/CommonsPool2TargetSourceProxyTests-context.xml @@ -3,7 +3,7 @@ - + diff --git a/spring-aop/src/test/resources/org/springframework/aop/target/HotSwappableTargetSourceTests-context.xml b/spring-aop/src/test/resources/org/springframework/aop/target/HotSwappableTargetSourceTests-context.xml index a5d28ca2f8d..25f39f9f71d 100644 --- a/spring-aop/src/test/resources/org/springframework/aop/target/HotSwappableTargetSourceTests-context.xml +++ b/spring-aop/src/test/resources/org/springframework/aop/target/HotSwappableTargetSourceTests-context.xml @@ -4,11 +4,11 @@ - + 10 - + 20 diff --git a/spring-aop/src/test/resources/org/springframework/aop/target/LazyInitTargetSourceTests-customTarget.xml b/spring-aop/src/test/resources/org/springframework/aop/target/LazyInitTargetSourceTests-customTarget.xml index d48cdb08175..70f7406195d 100644 --- a/spring-aop/src/test/resources/org/springframework/aop/target/LazyInitTargetSourceTests-customTarget.xml +++ b/spring-aop/src/test/resources/org/springframework/aop/target/LazyInitTargetSourceTests-customTarget.xml @@ -3,7 +3,7 @@ - + 10 diff --git a/spring-aop/src/test/resources/org/springframework/aop/target/LazyInitTargetSourceTests-singleton.xml b/spring-aop/src/test/resources/org/springframework/aop/target/LazyInitTargetSourceTests-singleton.xml index 7f29fec4f78..e1098476026 100644 --- a/spring-aop/src/test/resources/org/springframework/aop/target/LazyInitTargetSourceTests-singleton.xml +++ b/spring-aop/src/test/resources/org/springframework/aop/target/LazyInitTargetSourceTests-singleton.xml @@ -3,7 +3,7 @@ - + 10 diff --git a/spring-aop/src/test/resources/org/springframework/aop/target/PrototypeTargetSourceTests-context.xml b/spring-aop/src/test/resources/org/springframework/aop/target/PrototypeTargetSourceTests-context.xml index 6b2801a1e9e..9689ba92e8f 100644 --- a/spring-aop/src/test/resources/org/springframework/aop/target/PrototypeTargetSourceTests-context.xml +++ b/spring-aop/src/test/resources/org/springframework/aop/target/PrototypeTargetSourceTests-context.xml @@ -4,11 +4,11 @@ - + 10 - + 10 diff --git a/spring-aop/src/test/resources/org/springframework/aop/target/ThreadLocalTargetSourceTests-context.xml b/spring-aop/src/test/resources/org/springframework/aop/target/ThreadLocalTargetSourceTests-context.xml index 5d71019c5fc..40f77d3f979 100644 --- a/spring-aop/src/test/resources/org/springframework/aop/target/ThreadLocalTargetSourceTests-context.xml +++ b/spring-aop/src/test/resources/org/springframework/aop/target/ThreadLocalTargetSourceTests-context.xml @@ -3,7 +3,7 @@ - + 10 @@ -34,12 +34,12 @@ - + Rod - + Kerry diff --git a/spring-beans/src/test/java/org/springframework/beans/AbstractPropertyAccessorTests.java b/spring-beans/src/test/java/org/springframework/beans/AbstractPropertyAccessorTests.java index 0b41d64982e..3cb51ae1eb8 100644 --- a/spring-beans/src/test/java/org/springframework/beans/AbstractPropertyAccessorTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/AbstractPropertyAccessorTests.java @@ -43,11 +43,11 @@ import org.springframework.beans.propertyeditors.CustomNumberEditor; import org.springframework.beans.propertyeditors.StringArrayPropertyEditor; import org.springframework.beans.propertyeditors.StringTrimmerEditor; import org.springframework.beans.support.DerivedFromProtectedBaseBean; -import org.springframework.beans.test.fixtures.beans.BooleanTestBean; -import org.springframework.beans.test.fixtures.beans.ITestBean; -import org.springframework.beans.test.fixtures.beans.IndexedTestBean; -import org.springframework.beans.test.fixtures.beans.NumberTestBean; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.BooleanTestBean; +import org.springframework.beans.testfixture.beans.ITestBean; +import org.springframework.beans.testfixture.beans.IndexedTestBean; +import org.springframework.beans.testfixture.beans.NumberTestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.core.convert.ConversionFailedException; import org.springframework.core.convert.TypeDescriptor; import org.springframework.core.convert.support.DefaultConversionService; diff --git a/spring-beans/src/test/java/org/springframework/beans/BeanUtilsTests.java b/spring-beans/src/test/java/org/springframework/beans/BeanUtilsTests.java index 948d1913f9b..e03707d9ab6 100644 --- a/spring-beans/src/test/java/org/springframework/beans/BeanUtilsTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/BeanUtilsTests.java @@ -34,9 +34,9 @@ import org.junit.jupiter.params.provider.ValueSource; import org.springframework.beans.factory.BeanFactory; import org.springframework.beans.propertyeditors.CustomDateEditor; -import org.springframework.beans.test.fixtures.beans.DerivedTestBean; -import org.springframework.beans.test.fixtures.beans.ITestBean; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.DerivedTestBean; +import org.springframework.beans.testfixture.beans.ITestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.core.io.Resource; import org.springframework.core.io.ResourceEditor; import org.springframework.lang.Nullable; diff --git a/spring-beans/src/test/java/org/springframework/beans/BeanWrapperEnumTests.java b/spring-beans/src/test/java/org/springframework/beans/BeanWrapperEnumTests.java index 492cb10d494..03ec1cd8384 100644 --- a/spring-beans/src/test/java/org/springframework/beans/BeanWrapperEnumTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/BeanWrapperEnumTests.java @@ -21,8 +21,8 @@ import java.util.Map; import org.junit.jupiter.api.Test; -import org.springframework.beans.test.fixtures.beans.CustomEnum; -import org.springframework.beans.test.fixtures.beans.GenericBean; +import org.springframework.beans.testfixture.beans.CustomEnum; +import org.springframework.beans.testfixture.beans.GenericBean; import org.springframework.core.convert.support.DefaultConversionService; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-beans/src/test/java/org/springframework/beans/BeanWrapperGenericsTests.java b/spring-beans/src/test/java/org/springframework/beans/BeanWrapperGenericsTests.java index 9e6f50e2cfd..6d582eff559 100644 --- a/spring-beans/src/test/java/org/springframework/beans/BeanWrapperGenericsTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/BeanWrapperGenericsTests.java @@ -33,10 +33,10 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.propertyeditors.CustomNumberEditor; import org.springframework.beans.propertyeditors.StringTrimmerEditor; -import org.springframework.beans.test.fixtures.beans.GenericBean; -import org.springframework.beans.test.fixtures.beans.GenericIntegerBean; -import org.springframework.beans.test.fixtures.beans.GenericSetOfIntegerBean; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.GenericBean; +import org.springframework.beans.testfixture.beans.GenericIntegerBean; +import org.springframework.beans.testfixture.beans.GenericSetOfIntegerBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.core.io.UrlResource; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-beans/src/test/java/org/springframework/beans/BeanWrapperTests.java b/spring-beans/src/test/java/org/springframework/beans/BeanWrapperTests.java index f9661e84492..0711189b5f5 100644 --- a/spring-beans/src/test/java/org/springframework/beans/BeanWrapperTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/BeanWrapperTests.java @@ -22,7 +22,7 @@ import java.util.Optional; import org.junit.jupiter.api.Test; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; diff --git a/spring-beans/src/test/java/org/springframework/beans/CachedIntrospectionResultsTests.java b/spring-beans/src/test/java/org/springframework/beans/CachedIntrospectionResultsTests.java index 78f2fdf5a73..cba7e4964a9 100644 --- a/spring-beans/src/test/java/org/springframework/beans/CachedIntrospectionResultsTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/CachedIntrospectionResultsTests.java @@ -22,7 +22,7 @@ import java.util.ArrayList; import org.junit.jupiter.api.Test; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.core.OverridingClassLoader; import static org.assertj.core.api.Assertions.assertThat; @@ -42,7 +42,7 @@ public class CachedIntrospectionResultsTests { assertThat(CachedIntrospectionResults.strongClassCache.containsKey(TestBean.class)).isTrue(); ClassLoader child = new OverridingClassLoader(getClass().getClassLoader()); - Class tbClass = child.loadClass("org.springframework.beans.test.fixtures.beans.TestBean"); + Class tbClass = child.loadClass("org.springframework.beans.testfixture.beans.TestBean"); assertThat(CachedIntrospectionResults.strongClassCache.containsKey(tbClass)).isFalse(); CachedIntrospectionResults.acceptClassLoader(child); bw = new BeanWrapperImpl(tbClass); diff --git a/spring-beans/src/test/java/org/springframework/beans/DirectFieldAccessorTests.java b/spring-beans/src/test/java/org/springframework/beans/DirectFieldAccessorTests.java index 9f7ff9dda23..1ca8ddc6029 100644 --- a/spring-beans/src/test/java/org/springframework/beans/DirectFieldAccessorTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/DirectFieldAccessorTests.java @@ -18,7 +18,7 @@ package org.springframework.beans; import org.junit.jupiter.api.Test; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-beans/src/test/java/org/springframework/beans/ExtendedBeanInfoTests.java b/spring-beans/src/test/java/org/springframework/beans/ExtendedBeanInfoTests.java index 732e61131a5..d9876729023 100644 --- a/spring-beans/src/test/java/org/springframework/beans/ExtendedBeanInfoTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/ExtendedBeanInfoTests.java @@ -25,7 +25,7 @@ import java.math.BigDecimal; import org.junit.jupiter.api.Test; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/BeanFactoryUtilsTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/BeanFactoryUtilsTests.java index dc214a2a425..104556d614c 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/BeanFactoryUtilsTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/BeanFactoryUtilsTests.java @@ -26,12 +26,12 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.support.StaticListableBeanFactory; import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; -import org.springframework.beans.test.fixtures.beans.AnnotatedBean; -import org.springframework.beans.test.fixtures.beans.ITestBean; -import org.springframework.beans.test.fixtures.beans.IndexedTestBean; -import org.springframework.beans.test.fixtures.beans.TestAnnotation; -import org.springframework.beans.test.fixtures.beans.TestBean; -import org.springframework.beans.test.fixtures.beans.factory.DummyFactory; +import org.springframework.beans.testfixture.beans.AnnotatedBean; +import org.springframework.beans.testfixture.beans.ITestBean; +import org.springframework.beans.testfixture.beans.IndexedTestBean; +import org.springframework.beans.testfixture.beans.TestAnnotation; +import org.springframework.beans.testfixture.beans.TestBean; +import org.springframework.beans.testfixture.beans.factory.DummyFactory; import org.springframework.cglib.proxy.NoOp; import org.springframework.core.io.Resource; import org.springframework.util.ObjectUtils; diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/DefaultListableBeanFactoryTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/DefaultListableBeanFactoryTests.java index da710e31a58..689dc04547a 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/DefaultListableBeanFactoryTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/DefaultListableBeanFactoryTests.java @@ -78,14 +78,14 @@ import org.springframework.beans.factory.support.PropertiesBeanDefinitionReader; import org.springframework.beans.factory.support.RootBeanDefinition; import org.springframework.beans.factory.xml.ConstructorDependenciesBean; import org.springframework.beans.propertyeditors.CustomNumberEditor; -import org.springframework.beans.test.fixtures.beans.DependenciesBean; -import org.springframework.beans.test.fixtures.beans.DerivedTestBean; -import org.springframework.beans.test.fixtures.beans.ITestBean; -import org.springframework.beans.test.fixtures.beans.LifecycleBean; -import org.springframework.beans.test.fixtures.beans.NestedTestBean; -import org.springframework.beans.test.fixtures.beans.SideEffectBean; -import org.springframework.beans.test.fixtures.beans.TestBean; -import org.springframework.beans.test.fixtures.beans.factory.DummyFactory; +import org.springframework.beans.testfixture.beans.DependenciesBean; +import org.springframework.beans.testfixture.beans.DerivedTestBean; +import org.springframework.beans.testfixture.beans.ITestBean; +import org.springframework.beans.testfixture.beans.LifecycleBean; +import org.springframework.beans.testfixture.beans.NestedTestBean; +import org.springframework.beans.testfixture.beans.SideEffectBean; +import org.springframework.beans.testfixture.beans.TestBean; +import org.springframework.beans.testfixture.beans.factory.DummyFactory; import org.springframework.core.MethodParameter; import org.springframework.core.ResolvableType; import org.springframework.core.annotation.AnnotationAwareOrderComparator; diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/annotation/AutowiredAnnotationBeanPostProcessorTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/annotation/AutowiredAnnotationBeanPostProcessorTests.java index 87dcbe72d31..69829b2eb2a 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/annotation/AutowiredAnnotationBeanPostProcessorTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/annotation/AutowiredAnnotationBeanPostProcessorTests.java @@ -64,10 +64,10 @@ import org.springframework.beans.factory.support.AutowireCandidateQualifier; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.support.GenericBeanDefinition; import org.springframework.beans.factory.support.RootBeanDefinition; -import org.springframework.beans.test.fixtures.beans.ITestBean; -import org.springframework.beans.test.fixtures.beans.IndexedTestBean; -import org.springframework.beans.test.fixtures.beans.NestedTestBean; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.ITestBean; +import org.springframework.beans.testfixture.beans.IndexedTestBean; +import org.springframework.beans.testfixture.beans.NestedTestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.core.Ordered; import org.springframework.core.ResolvableType; import org.springframework.core.annotation.AnnotationAwareOrderComparator; diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/annotation/InjectAnnotationBeanPostProcessorTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/annotation/InjectAnnotationBeanPostProcessorTests.java index a90d044209a..43e57e7d26a 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/annotation/InjectAnnotationBeanPostProcessorTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/annotation/InjectAnnotationBeanPostProcessorTests.java @@ -40,10 +40,10 @@ import org.springframework.beans.factory.support.AutowireCandidateQualifier; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.support.GenericBeanDefinition; import org.springframework.beans.factory.support.RootBeanDefinition; -import org.springframework.beans.test.fixtures.beans.ITestBean; -import org.springframework.beans.test.fixtures.beans.IndexedTestBean; -import org.springframework.beans.test.fixtures.beans.NestedTestBean; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.ITestBean; +import org.springframework.beans.testfixture.beans.IndexedTestBean; +import org.springframework.beans.testfixture.beans.NestedTestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.core.testfixture.io.SerializationTestUtils; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/annotation/LookupAnnotationTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/annotation/LookupAnnotationTests.java index d610040ed68..d9b198e3e35 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/annotation/LookupAnnotationTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/annotation/LookupAnnotationTests.java @@ -22,7 +22,7 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.factory.config.BeanDefinition; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.support.RootBeanDefinition; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/config/CustomEditorConfigurerTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/config/CustomEditorConfigurerTests.java index 3fa7f2b4e9a..a94425ccf1a 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/config/CustomEditorConfigurerTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/config/CustomEditorConfigurerTests.java @@ -33,7 +33,7 @@ import org.springframework.beans.PropertyEditorRegistry; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.support.RootBeanDefinition; import org.springframework.beans.propertyeditors.CustomDateEditor; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/config/FieldRetrievingFactoryBeanTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/config/FieldRetrievingFactoryBeanTests.java index 38ad12dc7eb..73c5cf258f5 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/config/FieldRetrievingFactoryBeanTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/config/FieldRetrievingFactoryBeanTests.java @@ -22,7 +22,7 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; import static org.springframework.core.testfixture.io.ResourceTestUtils.qualifiedResource; @@ -115,7 +115,7 @@ public class FieldRetrievingFactoryBeanTests { @Test public void testWithConstantOnClassWithPackageLevelVisibility() throws Exception { FieldRetrievingFactoryBean fr = new FieldRetrievingFactoryBean(); - fr.setBeanName("org.springframework.beans.test.fixtures.beans.PackageLevelVisibleBean.CONSTANT"); + fr.setBeanName("org.springframework.beans.testfixture.beans.PackageLevelVisibleBean.CONSTANT"); fr.afterPropertiesSet(); assertThat(fr.getObject()).isEqualTo("Wuby"); } diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/config/PropertyPathFactoryBeanTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/config/PropertyPathFactoryBeanTests.java index dd256ece36a..06e750168c4 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/config/PropertyPathFactoryBeanTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/config/PropertyPathFactoryBeanTests.java @@ -20,8 +20,8 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; -import org.springframework.beans.test.fixtures.beans.ITestBean; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.ITestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.core.io.Resource; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/config/PropertyPlaceholderConfigurerTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/config/PropertyPlaceholderConfigurerTests.java index b3efca4647f..13d8b138ff4 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/config/PropertyPlaceholderConfigurerTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/config/PropertyPlaceholderConfigurerTests.java @@ -24,7 +24,7 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.factory.support.AbstractBeanDefinition; import org.springframework.beans.factory.support.DefaultListableBeanFactory; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.Resource; diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/config/PropertyResourceConfigurerTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/config/PropertyResourceConfigurerTests.java index c85944480a1..999c2e4b244 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/config/PropertyResourceConfigurerTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/config/PropertyResourceConfigurerTests.java @@ -39,8 +39,8 @@ import org.springframework.beans.factory.support.ManagedList; 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.test.fixtures.beans.IndexedTestBean; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.IndexedTestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.core.io.Resource; import org.springframework.util.StringUtils; diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/config/SimpleScopeTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/config/SimpleScopeTests.java index a123a5721b8..38b10b562f5 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/config/SimpleScopeTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/config/SimpleScopeTests.java @@ -25,7 +25,7 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.factory.ObjectFactory; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; import static org.springframework.core.testfixture.io.ResourceTestUtils.qualifiedResource; diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/parsing/CustomProblemReporterTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/parsing/CustomProblemReporterTests.java index feb10d03633..34abf223af4 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/parsing/CustomProblemReporterTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/parsing/CustomProblemReporterTests.java @@ -24,7 +24,7 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; import static org.springframework.core.testfixture.io.ResourceTestUtils.qualifiedResource; diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/support/BeanDefinitionBuilderTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/support/BeanDefinitionBuilderTests.java index de163b96e34..ec157df512c 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/support/BeanDefinitionBuilderTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/support/BeanDefinitionBuilderTests.java @@ -21,7 +21,7 @@ import java.util.Arrays; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.config.BeanDefinition; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/support/BeanDefinitionTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/support/BeanDefinitionTests.java index e5fe0a0e868..16fc1a1e357 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/support/BeanDefinitionTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/support/BeanDefinitionTests.java @@ -19,7 +19,7 @@ package org.springframework.beans.factory.support; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.config.BeanDefinitionHolder; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/support/BeanFactoryGenericsTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/support/BeanFactoryGenericsTests.java index de938f38b74..fbd4d27d9ca 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/support/BeanFactoryGenericsTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/support/BeanFactoryGenericsTests.java @@ -43,10 +43,10 @@ import org.springframework.beans.factory.ObjectProvider; import org.springframework.beans.factory.config.TypedStringValue; import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; import org.springframework.beans.propertyeditors.CustomNumberEditor; -import org.springframework.beans.test.fixtures.beans.GenericBean; -import org.springframework.beans.test.fixtures.beans.GenericIntegerBean; -import org.springframework.beans.test.fixtures.beans.GenericSetOfIntegerBean; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.GenericBean; +import org.springframework.beans.testfixture.beans.GenericIntegerBean; +import org.springframework.beans.testfixture.beans.GenericSetOfIntegerBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.core.OverridingClassLoader; import org.springframework.core.ResolvableType; import org.springframework.core.annotation.AnnotationAwareOrderComparator; diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/support/DefaultSingletonBeanRegistryTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/support/DefaultSingletonBeanRegistryTests.java index a325c67a35e..6e3f8465e9e 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/support/DefaultSingletonBeanRegistryTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/support/DefaultSingletonBeanRegistryTests.java @@ -20,8 +20,8 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.BeansException; import org.springframework.beans.factory.ObjectFactory; -import org.springframework.beans.test.fixtures.beans.DerivedTestBean; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.DerivedTestBean; +import org.springframework.beans.testfixture.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/support/DefinitionMetadataEqualsHashCodeTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/support/DefinitionMetadataEqualsHashCodeTests.java index 866556a180c..1c469274c29 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/support/DefinitionMetadataEqualsHashCodeTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/support/DefinitionMetadataEqualsHashCodeTests.java @@ -20,7 +20,7 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.factory.config.BeanDefinition; import org.springframework.beans.factory.config.RuntimeBeanReference; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/support/LookupMethodTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/support/LookupMethodTests.java index e6781ed74d4..eeb34b6f8f1 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/support/LookupMethodTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/support/LookupMethodTests.java @@ -20,7 +20,7 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.core.io.ClassPathResource; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/support/PropertiesBeanDefinitionReaderTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/support/PropertiesBeanDefinitionReaderTests.java index 7efdfe4c001..dbb70e54b9b 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/support/PropertiesBeanDefinitionReaderTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/support/PropertiesBeanDefinitionReaderTests.java @@ -18,7 +18,7 @@ package org.springframework.beans.factory.support; import org.junit.jupiter.api.Test; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.core.io.ClassPathResource; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/wiring/BeanConfigurerSupportTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/wiring/BeanConfigurerSupportTests.java index 05fa60b0b4c..8ff2952fb11 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/wiring/BeanConfigurerSupportTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/wiring/BeanConfigurerSupportTests.java @@ -21,7 +21,7 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.factory.BeanFactory; import org.springframework.beans.factory.support.BeanDefinitionBuilder; import org.springframework.beans.factory.support.DefaultListableBeanFactory; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException; diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/xml/AutowireWithExclusionTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/xml/AutowireWithExclusionTests.java index f7c2542aecc..8ea0719a82b 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/xml/AutowireWithExclusionTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/xml/AutowireWithExclusionTests.java @@ -22,7 +22,7 @@ import org.springframework.beans.factory.config.PropertiesFactoryBean; import org.springframework.beans.factory.config.RuntimeBeanReference; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.support.RootBeanDefinition; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.core.io.ClassPathResource; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/xml/CollectionMergingTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/xml/CollectionMergingTests.java index bc119e2b183..04b82ca200a 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/xml/CollectionMergingTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/xml/CollectionMergingTests.java @@ -27,7 +27,7 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.factory.support.BeanDefinitionReader; import org.springframework.beans.factory.support.DefaultListableBeanFactory; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.core.io.ClassPathResource; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/xml/CollectionsWithDefaultTypesTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/xml/CollectionsWithDefaultTypesTests.java index e0ceb48a1ed..0c3ebedd170 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/xml/CollectionsWithDefaultTypesTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/xml/CollectionsWithDefaultTypesTests.java @@ -22,7 +22,7 @@ import java.util.Map; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.support.DefaultListableBeanFactory; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.core.io.ClassPathResource; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/xml/ConstructorDependenciesBean.java b/spring-beans/src/test/java/org/springframework/beans/factory/xml/ConstructorDependenciesBean.java index df644ab49cc..1d3c6286d31 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/xml/ConstructorDependenciesBean.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/xml/ConstructorDependenciesBean.java @@ -18,8 +18,8 @@ package org.springframework.beans.factory.xml; import java.io.Serializable; -import org.springframework.beans.test.fixtures.beans.IndexedTestBean; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.IndexedTestBean; +import org.springframework.beans.testfixture.beans.TestBean; /** * Simple bean used to check constructor dependency checking. diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/xml/CountingFactory.java b/spring-beans/src/test/java/org/springframework/beans/factory/xml/CountingFactory.java index 2d2720ff1e3..21ccf619b38 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/xml/CountingFactory.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/xml/CountingFactory.java @@ -17,7 +17,7 @@ package org.springframework.beans.factory.xml; import org.springframework.beans.factory.FactoryBean; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.TestBean; /** * @author Juergen Hoeller diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/xml/DummyReferencer.java b/spring-beans/src/test/java/org/springframework/beans/factory/xml/DummyReferencer.java index 2c1a8b99b5b..10bf54f5e07 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/xml/DummyReferencer.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/xml/DummyReferencer.java @@ -17,8 +17,8 @@ package org.springframework.beans.factory.xml; -import org.springframework.beans.test.fixtures.beans.TestBean; -import org.springframework.beans.test.fixtures.beans.factory.DummyFactory; +import org.springframework.beans.testfixture.beans.TestBean; +import org.springframework.beans.testfixture.beans.factory.DummyFactory; /** * @author Juergen Hoeller diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/xml/DuplicateBeanIdTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/xml/DuplicateBeanIdTests.java index 8f9a7154146..2520004ea3c 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/xml/DuplicateBeanIdTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/xml/DuplicateBeanIdTests.java @@ -19,7 +19,7 @@ package org.springframework.beans.factory.xml; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.support.DefaultListableBeanFactory; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.core.io.ClassPathResource; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/xml/EventPublicationTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/xml/EventPublicationTests.java index 0d872c14fa2..29e2561fc75 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/xml/EventPublicationTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/xml/EventPublicationTests.java @@ -30,7 +30,7 @@ import org.springframework.beans.factory.parsing.ComponentDefinition; import org.springframework.beans.factory.parsing.ImportDefinition; import org.springframework.beans.factory.parsing.PassThroughSourceExtractor; import org.springframework.beans.factory.support.DefaultListableBeanFactory; -import org.springframework.beans.test.fixtures.beans.CollectingReaderEventListener; +import org.springframework.beans.testfixture.beans.CollectingReaderEventListener; import org.springframework.core.io.ClassPathResource; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/xml/FactoryMethodTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/xml/FactoryMethodTests.java index f6ac02ae32a..3ae92e3c8e8 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/xml/FactoryMethodTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/xml/FactoryMethodTests.java @@ -25,7 +25,7 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.factory.BeanCreationException; import org.springframework.beans.factory.support.DefaultListableBeanFactory; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.core.io.ClassPathResource; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/xml/FactoryMethods.java b/spring-beans/src/test/java/org/springframework/beans/factory/xml/FactoryMethods.java index 80b7747d969..88b5321b893 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/xml/FactoryMethods.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/xml/FactoryMethods.java @@ -19,7 +19,7 @@ package org.springframework.beans.factory.xml; import java.util.Collections; import java.util.List; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.TestBean; /** * Test class for Spring's ability to create objects using static diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/xml/InstanceFactory.java b/spring-beans/src/test/java/org/springframework/beans/factory/xml/InstanceFactory.java index e5b1d4d24f3..3dd4cbd1467 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/xml/InstanceFactory.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/xml/InstanceFactory.java @@ -16,7 +16,7 @@ package org.springframework.beans.factory.xml; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.TestBean; /** * Test class for Spring's ability to create objects using diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/xml/NestedBeansElementAttributeRecursionTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/xml/NestedBeansElementAttributeRecursionTests.java index a5bc425d767..debeb353caf 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/xml/NestedBeansElementAttributeRecursionTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/xml/NestedBeansElementAttributeRecursionTests.java @@ -20,7 +20,7 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.factory.config.BeanDefinition; import org.springframework.beans.factory.support.DefaultListableBeanFactory; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.core.io.ClassPathResource; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/xml/SchemaValidationTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/xml/SchemaValidationTests.java index c1fa690bf5a..70199450995 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/xml/SchemaValidationTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/xml/SchemaValidationTests.java @@ -21,7 +21,7 @@ import org.xml.sax.SAXParseException; import org.springframework.beans.BeansException; import org.springframework.beans.factory.support.DefaultListableBeanFactory; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.core.io.ClassPathResource; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/xml/SimpleConstructorNamespaceHandlerTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/xml/SimpleConstructorNamespaceHandlerTests.java index b6eef0422c7..24a9d43e89b 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/xml/SimpleConstructorNamespaceHandlerTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/xml/SimpleConstructorNamespaceHandlerTests.java @@ -20,8 +20,8 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.factory.BeanDefinitionStoreException; import org.springframework.beans.factory.support.DefaultListableBeanFactory; -import org.springframework.beans.test.fixtures.beans.DummyBean; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.DummyBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.core.io.ClassPathResource; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/xml/SimplePropertyNamespaceHandlerTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/xml/SimplePropertyNamespaceHandlerTests.java index 054e51e95fc..68ef31d9a82 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/xml/SimplePropertyNamespaceHandlerTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/xml/SimplePropertyNamespaceHandlerTests.java @@ -20,8 +20,8 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.factory.BeanDefinitionStoreException; import org.springframework.beans.factory.support.DefaultListableBeanFactory; -import org.springframework.beans.test.fixtures.beans.ITestBean; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.ITestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.core.io.ClassPathResource; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/xml/TestBeanCreator.java b/spring-beans/src/test/java/org/springframework/beans/factory/xml/TestBeanCreator.java index cf6eb8aa42c..091a20290e7 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/xml/TestBeanCreator.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/xml/TestBeanCreator.java @@ -16,7 +16,7 @@ package org.springframework.beans.factory.xml; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.TestBean; /** * Test class for Spring's ability to create diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/xml/UtilNamespaceHandlerTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/xml/UtilNamespaceHandlerTests.java index 2e0bb5bb33c..2260a86c52e 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/xml/UtilNamespaceHandlerTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/xml/UtilNamespaceHandlerTests.java @@ -32,9 +32,9 @@ import org.springframework.beans.factory.config.PropertiesFactoryBean; import org.springframework.beans.factory.parsing.ComponentDefinition; import org.springframework.beans.factory.support.AbstractBeanDefinition; import org.springframework.beans.factory.support.DefaultListableBeanFactory; -import org.springframework.beans.test.fixtures.beans.CollectingReaderEventListener; -import org.springframework.beans.test.fixtures.beans.CustomEnum; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.CollectingReaderEventListener; +import org.springframework.beans.testfixture.beans.CustomEnum; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.core.io.ClassPathResource; import org.springframework.util.LinkedCaseInsensitiveMap; diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/xml/XmlBeanCollectionTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/xml/XmlBeanCollectionTests.java index 51200a52e47..e502695dd32 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/xml/XmlBeanCollectionTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/xml/XmlBeanCollectionTests.java @@ -38,8 +38,8 @@ import org.springframework.beans.factory.config.ListFactoryBean; import org.springframework.beans.factory.config.MapFactoryBean; import org.springframework.beans.factory.config.SetFactoryBean; import org.springframework.beans.factory.support.DefaultListableBeanFactory; -import org.springframework.beans.test.fixtures.beans.HasMap; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.HasMap; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.core.io.ClassPathResource; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/xml/XmlBeanDefinitionReaderTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/xml/XmlBeanDefinitionReaderTests.java index 34474e075da..69768da8278 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/xml/XmlBeanDefinitionReaderTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/xml/XmlBeanDefinitionReaderTests.java @@ -25,7 +25,7 @@ import org.springframework.beans.factory.BeanDefinitionStoreException; import org.springframework.beans.factory.support.BeanDefinitionRegistry; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.support.SimpleBeanDefinitionRegistry; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.InputStreamResource; import org.springframework.core.io.Resource; diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/xml/XmlListableBeanFactoryTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/xml/XmlListableBeanFactoryTests.java index e3f69d70bfd..d48b55f2cb8 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/xml/XmlListableBeanFactoryTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/xml/XmlListableBeanFactoryTests.java @@ -30,11 +30,11 @@ import org.springframework.beans.factory.BeanFactory; import org.springframework.beans.factory.config.BeanPostProcessor; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.support.RootBeanDefinition; -import org.springframework.beans.test.fixtures.beans.ITestBean; -import org.springframework.beans.test.fixtures.beans.LifecycleBean; -import org.springframework.beans.test.fixtures.beans.TestBean; -import org.springframework.beans.test.fixtures.beans.factory.DummyFactory; -import org.springframework.beans.test.fixtures.factory.xml.AbstractListableBeanFactoryTests; +import org.springframework.beans.testfixture.beans.ITestBean; +import org.springframework.beans.testfixture.beans.LifecycleBean; +import org.springframework.beans.testfixture.beans.TestBean; +import org.springframework.beans.testfixture.beans.factory.DummyFactory; +import org.springframework.beans.testfixture.factory.xml.AbstractListableBeanFactoryTests; import org.springframework.core.io.ClassPathResource; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-beans/src/test/java/org/springframework/beans/propertyeditors/CustomEditorTests.java b/spring-beans/src/test/java/org/springframework/beans/propertyeditors/CustomEditorTests.java index eb3c0b6d7f1..c6bbf52eb5d 100644 --- a/spring-beans/src/test/java/org/springframework/beans/propertyeditors/CustomEditorTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/propertyeditors/CustomEditorTests.java @@ -43,11 +43,11 @@ import org.springframework.beans.BeanWrapperImpl; import org.springframework.beans.BeansException; import org.springframework.beans.MutablePropertyValues; import org.springframework.beans.PropertyValue; -import org.springframework.beans.test.fixtures.beans.BooleanTestBean; -import org.springframework.beans.test.fixtures.beans.ITestBean; -import org.springframework.beans.test.fixtures.beans.IndexedTestBean; -import org.springframework.beans.test.fixtures.beans.NumberTestBean; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.BooleanTestBean; +import org.springframework.beans.testfixture.beans.ITestBean; +import org.springframework.beans.testfixture.beans.IndexedTestBean; +import org.springframework.beans.testfixture.beans.NumberTestBean; +import org.springframework.beans.testfixture.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; @@ -593,9 +593,9 @@ public class CustomEditorTests { @Test public void testClassEditorWithArray() { PropertyEditor classEditor = new ClassEditor(); - classEditor.setAsText("org.springframework.beans.test.fixtures.beans.TestBean[]"); + classEditor.setAsText("org.springframework.beans.testfixture.beans.TestBean[]"); assertThat(classEditor.getValue()).isEqualTo(TestBean[].class); - assertThat(classEditor.getAsText()).isEqualTo("org.springframework.beans.test.fixtures.beans.TestBean[]"); + assertThat(classEditor.getAsText()).isEqualTo("org.springframework.beans.testfixture.beans.TestBean[]"); } /* diff --git a/spring-beans/src/test/java/org/springframework/beans/support/PagedListHolderTests.java b/spring-beans/src/test/java/org/springframework/beans/support/PagedListHolderTests.java index e244830c1c5..0afce648344 100644 --- a/spring-beans/src/test/java/org/springframework/beans/support/PagedListHolderTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/support/PagedListHolderTests.java @@ -21,7 +21,7 @@ import java.util.List; import org.junit.jupiter.api.Test; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-beans/src/test/kotlin/org/springframework/beans/factory/annotation/KotlinAutowiredTests.kt b/spring-beans/src/test/kotlin/org/springframework/beans/factory/annotation/KotlinAutowiredTests.kt index 81c910b2b15..37d6793cad5 100644 --- a/spring-beans/src/test/kotlin/org/springframework/beans/factory/annotation/KotlinAutowiredTests.kt +++ b/spring-beans/src/test/kotlin/org/springframework/beans/factory/annotation/KotlinAutowiredTests.kt @@ -22,8 +22,8 @@ import org.junit.jupiter.api.Test import org.springframework.beans.factory.BeanCreationException import org.springframework.beans.factory.support.DefaultListableBeanFactory import org.springframework.beans.factory.support.RootBeanDefinition -import org.springframework.beans.test.fixtures.beans.Colour -import org.springframework.beans.test.fixtures.beans.TestBean +import org.springframework.beans.testfixture.beans.Colour +import org.springframework.beans.testfixture.beans.TestBean /** * Tests for Kotlin support with [Autowired]. diff --git a/spring-beans/src/test/resources/org/springframework/beans/factory/BeanFactoryUtilsTests-leaf.xml b/spring-beans/src/test/resources/org/springframework/beans/factory/BeanFactoryUtilsTests-leaf.xml index 08e3ff9ab39..435dcb06cbd 100644 --- a/spring-beans/src/test/resources/org/springframework/beans/factory/BeanFactoryUtilsTests-leaf.xml +++ b/spring-beans/src/test/resources/org/springframework/beans/factory/BeanFactoryUtilsTests-leaf.xml @@ -3,7 +3,7 @@ - + custom 25 diff --git a/spring-beans/src/test/resources/org/springframework/beans/factory/BeanFactoryUtilsTests-middle.xml b/spring-beans/src/test/resources/org/springframework/beans/factory/BeanFactoryUtilsTests-middle.xml index 29fdf9a8725..4804e44cf88 100644 --- a/spring-beans/src/test/resources/org/springframework/beans/factory/BeanFactoryUtilsTests-middle.xml +++ b/spring-beans/src/test/resources/org/springframework/beans/factory/BeanFactoryUtilsTests-middle.xml @@ -4,7 +4,7 @@ - + custom 666 @@ -13,7 +13,7 @@ Check that invoker is automatically added to wrap target. Non pointcut bean name should be wrapped in invoker. --> - + diff --git a/spring-beans/src/test/resources/org/springframework/beans/factory/BeanFactoryUtilsTests-root.xml b/spring-beans/src/test/resources/org/springframework/beans/factory/BeanFactoryUtilsTests-root.xml index 75ee49e0ee7..fea62a3791b 100644 --- a/spring-beans/src/test/resources/org/springframework/beans/factory/BeanFactoryUtilsTests-root.xml +++ b/spring-beans/src/test/resources/org/springframework/beans/factory/BeanFactoryUtilsTests-root.xml @@ -6,21 +6,21 @@ - + - + - + - + custom 25 - + - + false diff --git a/spring-beans/src/test/resources/org/springframework/beans/factory/config/FieldRetrievingFactoryBeanTests-context.xml b/spring-beans/src/test/resources/org/springframework/beans/factory/config/FieldRetrievingFactoryBeanTests-context.xml index 7cb6892b03d..35c854bdb0e 100644 --- a/spring-beans/src/test/resources/org/springframework/beans/factory/config/FieldRetrievingFactoryBeanTests-context.xml +++ b/spring-beans/src/test/resources/org/springframework/beans/factory/config/FieldRetrievingFactoryBeanTests-context.xml @@ -3,7 +3,7 @@ - + diff --git a/spring-beans/src/test/resources/org/springframework/beans/factory/config/PropertyPathFactoryBeanTests-context.xml b/spring-beans/src/test/resources/org/springframework/beans/factory/config/PropertyPathFactoryBeanTests-context.xml index 9b1e2953138..d9979e38339 100644 --- a/spring-beans/src/test/resources/org/springframework/beans/factory/config/PropertyPathFactoryBeanTests-context.xml +++ b/spring-beans/src/test/resources/org/springframework/beans/factory/config/PropertyPathFactoryBeanTests-context.xml @@ -3,19 +3,19 @@ - + 10 - + 11 - + 98 - + 99 @@ -23,7 +23,7 @@ - + 12 @@ -46,10 +46,10 @@ tb spouse - org.springframework.beans.test.fixtures.beans.TestBean + org.springframework.beans.testfixture.beans.TestBean - + @@ -59,11 +59,11 @@ - + - + diff --git a/spring-beans/src/test/resources/org/springframework/beans/factory/config/SimpleScopeTests-context.xml b/spring-beans/src/test/resources/org/springframework/beans/factory/config/SimpleScopeTests-context.xml index 22cfc5d272b..9ac321b0cc4 100644 --- a/spring-beans/src/test/resources/org/springframework/beans/factory/config/SimpleScopeTests-context.xml +++ b/spring-beans/src/test/resources/org/springframework/beans/factory/config/SimpleScopeTests-context.xml @@ -3,6 +3,6 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans-2.0.xsd"> - + diff --git a/spring-beans/src/test/resources/org/springframework/beans/factory/parsing/CustomProblemReporterTests-context.xml b/spring-beans/src/test/resources/org/springframework/beans/factory/parsing/CustomProblemReporterTests-context.xml index b1c5df805a9..1c6e22b5118 100644 --- a/spring-beans/src/test/resources/org/springframework/beans/factory/parsing/CustomProblemReporterTests-context.xml +++ b/spring-beans/src/test/resources/org/springframework/beans/factory/parsing/CustomProblemReporterTests-context.xml @@ -6,7 +6,7 @@ - + @@ -14,9 +14,9 @@ - + - + @@ -26,6 +26,6 @@ - + \ No newline at end of file diff --git a/spring-beans/src/test/resources/org/springframework/beans/factory/support/genericBeanTests.xml b/spring-beans/src/test/resources/org/springframework/beans/factory/support/genericBeanTests.xml index 37f949c079b..c610f9cf159 100644 --- a/spring-beans/src/test/resources/org/springframework/beans/factory/support/genericBeanTests.xml +++ b/spring-beans/src/test/resources/org/springframework/beans/factory/support/genericBeanTests.xml @@ -3,7 +3,7 @@ - + @@ -43,7 +43,7 @@ autowire="constructor"> - + @@ -53,7 +53,7 @@ - + diff --git a/spring-beans/src/test/resources/org/springframework/beans/factory/support/lookupMethodTests.xml b/spring-beans/src/test/resources/org/springframework/beans/factory/support/lookupMethodTests.xml index 2fb5d2204f5..a04f0e3beb4 100644 --- a/spring-beans/src/test/resources/org/springframework/beans/factory/support/lookupMethodTests.xml +++ b/spring-beans/src/test/resources/org/springframework/beans/factory/support/lookupMethodTests.xml @@ -13,9 +13,9 @@ - + - + diff --git a/spring-beans/src/test/resources/org/springframework/beans/factory/support/multiConstructorArgs.properties b/spring-beans/src/test/resources/org/springframework/beans/factory/support/multiConstructorArgs.properties index 529c97ce9e1..9cc82ac4493 100644 --- a/spring-beans/src/test/resources/org/springframework/beans/factory/support/multiConstructorArgs.properties +++ b/spring-beans/src/test/resources/org/springframework/beans/factory/support/multiConstructorArgs.properties @@ -1,3 +1,3 @@ -testBean.(class)=org.springframework.beans.test.fixtures.beans.TestBean +testBean.(class)=org.springframework.beans.testfixture.beans.TestBean testBean.$0=Rob Harrop testBean.$1=23 diff --git a/spring-beans/src/test/resources/org/springframework/beans/factory/support/refConstructorArg.properties b/spring-beans/src/test/resources/org/springframework/beans/factory/support/refConstructorArg.properties index ff4aff4552e..b1bb01e2a50 100644 --- a/spring-beans/src/test/resources/org/springframework/beans/factory/support/refConstructorArg.properties +++ b/spring-beans/src/test/resources/org/springframework/beans/factory/support/refConstructorArg.properties @@ -1,5 +1,5 @@ -sally.(class)=org.springframework.beans.test.fixtures.beans.TestBean +sally.(class)=org.springframework.beans.testfixture.beans.TestBean sally.name=Sally -rob.(class)=org.springframework.beans.test.fixtures.beans.TestBean +rob.(class)=org.springframework.beans.testfixture.beans.TestBean rob.$0(ref)=sally diff --git a/spring-beans/src/test/resources/org/springframework/beans/factory/support/simpleConstructorArg.properties b/spring-beans/src/test/resources/org/springframework/beans/factory/support/simpleConstructorArg.properties index 8d4246bba2b..bc39b1b018c 100644 --- a/spring-beans/src/test/resources/org/springframework/beans/factory/support/simpleConstructorArg.properties +++ b/spring-beans/src/test/resources/org/springframework/beans/factory/support/simpleConstructorArg.properties @@ -1,2 +1,2 @@ -testBean.(class)=org.springframework.beans.test.fixtures.beans.TestBean +testBean.(class)=org.springframework.beans.testfixture.beans.TestBean testBean.$0=Rob Harrop diff --git a/spring-beans/src/test/resources/org/springframework/beans/factory/xml/DuplicateBeanIdTests-multiLevel-context.xml b/spring-beans/src/test/resources/org/springframework/beans/factory/xml/DuplicateBeanIdTests-multiLevel-context.xml index ee803599bb6..0e326790f7f 100644 --- a/spring-beans/src/test/resources/org/springframework/beans/factory/xml/DuplicateBeanIdTests-multiLevel-context.xml +++ b/spring-beans/src/test/resources/org/springframework/beans/factory/xml/DuplicateBeanIdTests-multiLevel-context.xml @@ -4,12 +4,12 @@ xsi:schemaLocation="http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans-3.1.xsd"> - + - + diff --git a/spring-beans/src/test/resources/org/springframework/beans/factory/xml/DuplicateBeanIdTests-sameLevel-context.xml b/spring-beans/src/test/resources/org/springframework/beans/factory/xml/DuplicateBeanIdTests-sameLevel-context.xml index 58e3415afc8..40ecbec4ac9 100644 --- a/spring-beans/src/test/resources/org/springframework/beans/factory/xml/DuplicateBeanIdTests-sameLevel-context.xml +++ b/spring-beans/src/test/resources/org/springframework/beans/factory/xml/DuplicateBeanIdTests-sameLevel-context.xml @@ -4,12 +4,12 @@ xsi:schemaLocation="http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans-3.1.xsd"> - + - + diff --git a/spring-beans/src/test/resources/org/springframework/beans/factory/xml/NestedBeansElementAttributeRecursionTests-merge-context.xml b/spring-beans/src/test/resources/org/springframework/beans/factory/xml/NestedBeansElementAttributeRecursionTests-merge-context.xml index 10015b0fc0d..f3453c7bb94 100644 --- a/spring-beans/src/test/resources/org/springframework/beans/factory/xml/NestedBeansElementAttributeRecursionTests-merge-context.xml +++ b/spring-beans/src/test/resources/org/springframework/beans/factory/xml/NestedBeansElementAttributeRecursionTests-merge-context.xml @@ -5,7 +5,7 @@ https://www.springframework.org/schema/beans/spring-beans-3.1.xsd" default-merge="false"> - + alpha diff --git a/spring-beans/src/test/resources/org/springframework/beans/factory/xml/autowire-constructor-with-exclusion.xml b/spring-beans/src/test/resources/org/springframework/beans/factory/xml/autowire-constructor-with-exclusion.xml index 8f5f1b01b1e..2b251510309 100644 --- a/spring-beans/src/test/resources/org/springframework/beans/factory/xml/autowire-constructor-with-exclusion.xml +++ b/spring-beans/src/test/resources/org/springframework/beans/factory/xml/autowire-constructor-with-exclusion.xml @@ -3,9 +3,9 @@ - + - + diff --git a/spring-beans/src/test/resources/org/springframework/beans/factory/xml/autowire-with-exclusion.xml b/spring-beans/src/test/resources/org/springframework/beans/factory/xml/autowire-with-exclusion.xml index 26651d8bbbe..692cc7743f5 100644 --- a/spring-beans/src/test/resources/org/springframework/beans/factory/xml/autowire-with-exclusion.xml +++ b/spring-beans/src/test/resources/org/springframework/beans/factory/xml/autowire-with-exclusion.xml @@ -3,9 +3,9 @@ - + - + diff --git a/spring-beans/src/test/resources/org/springframework/beans/factory/xml/autowire-with-inclusion.xml b/spring-beans/src/test/resources/org/springframework/beans/factory/xml/autowire-with-inclusion.xml index 0b9bb1ceb03..f4090d14a71 100644 --- a/spring-beans/src/test/resources/org/springframework/beans/factory/xml/autowire-with-inclusion.xml +++ b/spring-beans/src/test/resources/org/springframework/beans/factory/xml/autowire-with-inclusion.xml @@ -4,9 +4,9 @@ xsi:schemaLocation="http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans-2.5.xsd" default-autowire-candidates=""> - + - + diff --git a/spring-beans/src/test/resources/org/springframework/beans/factory/xml/autowire-with-selective-inclusion.xml b/spring-beans/src/test/resources/org/springframework/beans/factory/xml/autowire-with-selective-inclusion.xml index d23d1888d21..d52ba19ec02 100644 --- a/spring-beans/src/test/resources/org/springframework/beans/factory/xml/autowire-with-selective-inclusion.xml +++ b/spring-beans/src/test/resources/org/springframework/beans/factory/xml/autowire-with-selective-inclusion.xml @@ -4,9 +4,9 @@ xsi:schemaLocation="http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans-2.5.xsd" default-autowire-candidates="props*,*ly"> - + - + diff --git a/spring-beans/src/test/resources/org/springframework/beans/factory/xml/beanEvents.xml b/spring-beans/src/test/resources/org/springframework/beans/factory/xml/beanEvents.xml index 7a5640559d3..2bdea186844 100644 --- a/spring-beans/src/test/resources/org/springframework/beans/factory/xml/beanEvents.xml +++ b/spring-beans/src/test/resources/org/springframework/beans/factory/xml/beanEvents.xml @@ -10,22 +10,22 @@ - + - + - + - + diff --git a/spring-beans/src/test/resources/org/springframework/beans/factory/xml/collectionMerging.xml b/spring-beans/src/test/resources/org/springframework/beans/factory/xml/collectionMerging.xml index 9243ec32bc4..d4576470794 100644 --- a/spring-beans/src/test/resources/org/springframework/beans/factory/xml/collectionMerging.xml +++ b/spring-beans/src/test/resources/org/springframework/beans/factory/xml/collectionMerging.xml @@ -3,7 +3,7 @@ - + Rob Harrop @@ -23,12 +23,12 @@ - + - + Rob Harrop @@ -47,14 +47,14 @@ - + - + @@ -76,7 +76,7 @@ - + @@ -84,7 +84,7 @@ - + Sall @@ -103,7 +103,7 @@ - + Rob Harrop @@ -123,12 +123,12 @@ - + - + Rob Harrop @@ -147,14 +147,14 @@ - + - + @@ -176,7 +176,7 @@ - + @@ -184,7 +184,7 @@ - + Sall diff --git a/spring-beans/src/test/resources/org/springframework/beans/factory/xml/collections.xml b/spring-beans/src/test/resources/org/springframework/beans/factory/xml/collections.xml index d245ac3afc3..5683b4fe490 100644 --- a/spring-beans/src/test/resources/org/springframework/beans/factory/xml/collections.xml +++ b/spring-beans/src/test/resources/org/springframework/beans/factory/xml/collections.xml @@ -3,7 +3,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans-3.2.xsd"> - + Jenny 30 @@ -12,7 +12,7 @@ - + Simple bean, without any collections. @@ -23,7 +23,7 @@ 27 - + Rod 32 @@ -35,7 +35,7 @@ - + Jenny 30 @@ -43,13 +43,13 @@ - + David 27 - + Rod 32 @@ -63,7 +63,7 @@ - + loner 26 @@ -101,26 +101,26 @@ - + verbose - + - + - + - + @@ -130,7 +130,7 @@ - + @@ -157,7 +157,7 @@ - + @@ -176,7 +176,7 @@ - + @@ -185,7 +185,7 @@ - + @@ -217,14 +217,14 @@ - + - + bar @@ -234,7 +234,7 @@ - + bar @@ -244,7 +244,7 @@ - + @@ -253,7 +253,7 @@ - + @@ -261,7 +261,7 @@ - + bar @@ -270,7 +270,7 @@ - + @@ -279,7 +279,7 @@ - + one @@ -288,7 +288,7 @@ - + 0 @@ -298,11 +298,11 @@ - + - + diff --git a/spring-beans/src/test/resources/org/springframework/beans/factory/xml/collectionsWithDefaultTypes.xml b/spring-beans/src/test/resources/org/springframework/beans/factory/xml/collectionsWithDefaultTypes.xml index e68a24410a7..a1a1ea378b1 100644 --- a/spring-beans/src/test/resources/org/springframework/beans/factory/xml/collectionsWithDefaultTypes.xml +++ b/spring-beans/src/test/resources/org/springframework/beans/factory/xml/collectionsWithDefaultTypes.xml @@ -3,7 +3,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans-3.0.xsd"> - + 1 @@ -28,7 +28,7 @@ - + diff --git a/spring-beans/src/test/resources/org/springframework/beans/factory/xml/factory-methods.xml b/spring-beans/src/test/resources/org/springframework/beans/factory/xml/factory-methods.xml index d9ba0aaeba6..dc328aa8884 100644 --- a/spring-beans/src/test/resources/org/springframework/beans/factory/xml/factory-methods.xml +++ b/spring-beans/src/test/resources/org/springframework/beans/factory/xml/factory-methods.xml @@ -107,7 +107,7 @@ - + Juergen @@ -130,7 +130,7 @@ - + diff --git a/spring-beans/src/test/resources/org/springframework/beans/factory/xml/schemaValidated.xml b/spring-beans/src/test/resources/org/springframework/beans/factory/xml/schemaValidated.xml index 5fc58aa6093..59b5ef71c3c 100644 --- a/spring-beans/src/test/resources/org/springframework/beans/factory/xml/schemaValidated.xml +++ b/spring-beans/src/test/resources/org/springframework/beans/factory/xml/schemaValidated.xml @@ -3,16 +3,16 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans-2.0.xsd"> - + - + - + - - + + diff --git a/spring-beans/src/test/resources/org/springframework/beans/factory/xml/simpleConstructorNamespaceHandlerTests.xml b/spring-beans/src/test/resources/org/springframework/beans/factory/xml/simpleConstructorNamespaceHandlerTests.xml index eab699ae5f6..c8adc6bdb3d 100644 --- a/spring-beans/src/test/resources/org/springframework/beans/factory/xml/simpleConstructorNamespaceHandlerTests.xml +++ b/spring-beans/src/test/resources/org/springframework/beans/factory/xml/simpleConstructorNamespaceHandlerTests.xml @@ -5,43 +5,43 @@ xsi:schemaLocation="http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd"> - + - + - + - + - + - + - + \ No newline at end of file diff --git a/spring-beans/src/test/resources/org/springframework/beans/factory/xml/simpleConstructorNamespaceHandlerTestsWithErrors.xml b/spring-beans/src/test/resources/org/springframework/beans/factory/xml/simpleConstructorNamespaceHandlerTestsWithErrors.xml index 037baf8b093..3dbfb5fae18 100644 --- a/spring-beans/src/test/resources/org/springframework/beans/factory/xml/simpleConstructorNamespaceHandlerTestsWithErrors.xml +++ b/spring-beans/src/test/resources/org/springframework/beans/factory/xml/simpleConstructorNamespaceHandlerTestsWithErrors.xml @@ -3,7 +3,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd"> - + diff --git a/spring-beans/src/test/resources/org/springframework/beans/factory/xml/simplePropertyNamespaceHandlerTests.xml b/spring-beans/src/test/resources/org/springframework/beans/factory/xml/simplePropertyNamespaceHandlerTests.xml index 82954f02b3a..83e74fad169 100644 --- a/spring-beans/src/test/resources/org/springframework/beans/factory/xml/simplePropertyNamespaceHandlerTests.xml +++ b/spring-beans/src/test/resources/org/springframework/beans/factory/xml/simplePropertyNamespaceHandlerTests.xml @@ -4,20 +4,20 @@ xmlns:p="http://www.springframework.org/schema/p" xsi:schemaLocation="http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd"> - + - + - + - + - + diff --git a/spring-beans/src/test/resources/org/springframework/beans/factory/xml/simplePropertyNamespaceHandlerTestsWithErrors.xml b/spring-beans/src/test/resources/org/springframework/beans/factory/xml/simplePropertyNamespaceHandlerTestsWithErrors.xml index a761f9e86a8..b64093d0fc8 100644 --- a/spring-beans/src/test/resources/org/springframework/beans/factory/xml/simplePropertyNamespaceHandlerTestsWithErrors.xml +++ b/spring-beans/src/test/resources/org/springframework/beans/factory/xml/simplePropertyNamespaceHandlerTestsWithErrors.xml @@ -4,10 +4,10 @@ xmlns:p="http://www.springframework.org/schema/p" xsi:schemaLocation="http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd"> - + - + diff --git a/spring-beans/src/test/resources/org/springframework/beans/factory/xml/test.xml b/spring-beans/src/test/resources/org/springframework/beans/factory/xml/test.xml index d1bf8660539..7c4c7596e79 100644 --- a/spring-beans/src/test/resources/org/springframework/beans/factory/xml/test.xml +++ b/spring-beans/src/test/resources/org/springframework/beans/factory/xml/test.xml @@ -3,7 +3,7 @@ - + I have no properties and I'm happy without them. @@ -12,7 +12,7 @@ - + aliased @@ -20,17 +20,17 @@ - + aliased - + aliased - + @@ -40,7 +40,7 @@ - + Rod 31 @@ -52,29 +52,29 @@ - + Kerry 34 - + Kathy 28 - + typeMismatch 34x - + - true @@ -85,10 +85,10 @@ - + - + false @@ -113,14 +113,14 @@ - + listenerVeto 66 - + - + this is a ]]> diff --git a/spring-beans/src/test/resources/org/springframework/beans/factory/xml/testUtilNamespace.xml b/spring-beans/src/test/resources/org/springframework/beans/factory/xml/testUtilNamespace.xml index 47bce335d18..972aabcd669 100644 --- a/spring-beans/src/test/resources/org/springframework/beans/factory/xml/testUtilNamespace.xml +++ b/spring-beans/src/test/resources/org/springframework/beans/factory/xml/testUtilNamespace.xml @@ -17,7 +17,7 @@ name "/> - + @@ -26,13 +26,13 @@ - + - + @@ -50,7 +50,7 @@ + key-type="java.lang.String" value-type="org.springframework.beans.testfixture.beans.TestBean"> @@ -72,7 +72,7 @@ Rob Harrop - + foo @@ -94,13 +94,13 @@ - + - + @@ -116,13 +116,13 @@ min - + - + @@ -152,7 +152,7 @@ - + diff --git a/spring-beans/src/test/resources/org/springframework/beans/factory/xml/validateWithDtd.xml b/spring-beans/src/test/resources/org/springframework/beans/factory/xml/validateWithDtd.xml index f58440bfa42..fbe7861e21c 100644 --- a/spring-beans/src/test/resources/org/springframework/beans/factory/xml/validateWithDtd.xml +++ b/spring-beans/src/test/resources/org/springframework/beans/factory/xml/validateWithDtd.xml @@ -9,5 +9,5 @@ This is a top level block comment - + \ No newline at end of file diff --git a/spring-beans/src/test/resources/org/springframework/beans/factory/xml/validateWithXsd.xml b/spring-beans/src/test/resources/org/springframework/beans/factory/xml/validateWithXsd.xml index 61598070814..1e467348ea1 100644 --- a/spring-beans/src/test/resources/org/springframework/beans/factory/xml/validateWithXsd.xml +++ b/spring-beans/src/test/resources/org/springframework/beans/factory/xml/validateWithXsd.xml @@ -7,5 +7,5 @@ This is a top level block comment the parser now --> - + \ No newline at end of file diff --git a/spring-beans/src/test/resources/org/springframework/beans/factory/xml/withMeta.xml b/spring-beans/src/test/resources/org/springframework/beans/factory/xml/withMeta.xml index 4148dffe92a..5f738817772 100644 --- a/spring-beans/src/test/resources/org/springframework/beans/factory/xml/withMeta.xml +++ b/spring-beans/src/test/resources/org/springframework/beans/factory/xml/withMeta.xml @@ -4,15 +4,15 @@ xmlns:spring="http://www.springframework.org/schema/beans" xsi:schemaLocation="http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans-2.5.xsd"> - + - + - + diff --git a/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/AgeHolder.java b/spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/AgeHolder.java similarity index 93% rename from spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/AgeHolder.java rename to spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/AgeHolder.java index e48d4ff7250..722cea94964 100644 --- a/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/AgeHolder.java +++ b/spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/AgeHolder.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.beans.test.fixtures.beans; +package org.springframework.beans.testfixture.beans; public interface AgeHolder { diff --git a/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/AnnotatedBean.java b/spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/AnnotatedBean.java similarity index 92% rename from spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/AnnotatedBean.java rename to spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/AnnotatedBean.java index 9a071690a35..985cf64de8a 100644 --- a/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/AnnotatedBean.java +++ b/spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/AnnotatedBean.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.beans.test.fixtures.beans; +package org.springframework.beans.testfixture.beans; /** * @author Stephane Nicoll diff --git a/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/BooleanTestBean.java b/spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/BooleanTestBean.java similarity index 94% rename from spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/BooleanTestBean.java rename to spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/BooleanTestBean.java index 52375b01138..5edbd304edd 100644 --- a/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/BooleanTestBean.java +++ b/spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/BooleanTestBean.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.beans.test.fixtures.beans; +package org.springframework.beans.testfixture.beans; /** * @author Juergen Hoeller diff --git a/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/CollectingReaderEventListener.java b/spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/CollectingReaderEventListener.java similarity index 98% rename from spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/CollectingReaderEventListener.java rename to spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/CollectingReaderEventListener.java index 2145e26679f..63e2e20a426 100644 --- a/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/CollectingReaderEventListener.java +++ b/spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/CollectingReaderEventListener.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.beans.test.fixtures.beans; +package org.springframework.beans.testfixture.beans; import java.util.ArrayList; import java.util.Collection; diff --git a/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/Colour.java b/spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/Colour.java similarity index 95% rename from spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/Colour.java rename to spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/Colour.java index 011dbf0edb3..53114900519 100644 --- a/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/Colour.java +++ b/spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/Colour.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.beans.test.fixtures.beans; +package org.springframework.beans.testfixture.beans; /** * @author Rob Harrop diff --git a/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/CountingTestBean.java b/spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/CountingTestBean.java similarity index 93% rename from spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/CountingTestBean.java rename to spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/CountingTestBean.java index 892f71d5305..aa9083a88e1 100644 --- a/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/CountingTestBean.java +++ b/spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/CountingTestBean.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.beans.test.fixtures.beans; +package org.springframework.beans.testfixture.beans; /** diff --git a/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/CustomEnum.java b/spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/CustomEnum.java similarity index 93% rename from spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/CustomEnum.java rename to spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/CustomEnum.java index 5bb56eaf26f..de0d721943d 100644 --- a/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/CustomEnum.java +++ b/spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/CustomEnum.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.beans.test.fixtures.beans; +package org.springframework.beans.testfixture.beans; /** * @author Juergen Hoeller diff --git a/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/DependenciesBean.java b/spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/DependenciesBean.java similarity index 96% rename from spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/DependenciesBean.java rename to spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/DependenciesBean.java index cb81eb3b169..f990781e11d 100644 --- a/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/DependenciesBean.java +++ b/spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/DependenciesBean.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.beans.test.fixtures.beans; +package org.springframework.beans.testfixture.beans; import org.springframework.beans.factory.BeanFactory; import org.springframework.beans.factory.BeanFactoryAware; diff --git a/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/DerivedTestBean.java b/spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/DerivedTestBean.java similarity index 97% rename from spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/DerivedTestBean.java rename to spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/DerivedTestBean.java index 6851deb9973..c0e9c2e1dca 100644 --- a/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/DerivedTestBean.java +++ b/spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/DerivedTestBean.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.beans.test.fixtures.beans; +package org.springframework.beans.testfixture.beans; import java.io.Serializable; diff --git a/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/DummyBean.java b/spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/DummyBean.java similarity index 96% rename from spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/DummyBean.java rename to spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/DummyBean.java index caa0a461b5b..cac5cced1c8 100644 --- a/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/DummyBean.java +++ b/spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/DummyBean.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.springframework.beans.test.fixtures.beans; +package org.springframework.beans.testfixture.beans; /** * @author Costin Leau diff --git a/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/DummyFactory.java b/spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/DummyFactory.java similarity index 98% rename from spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/DummyFactory.java rename to spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/DummyFactory.java index 623884a8acc..2cf683a7c5f 100644 --- a/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/DummyFactory.java +++ b/spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/DummyFactory.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.beans.test.fixtures.beans; +package org.springframework.beans.testfixture.beans; import org.springframework.beans.BeansException; import org.springframework.beans.factory.BeanFactory; diff --git a/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/Employee.java b/spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/Employee.java similarity index 94% rename from spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/Employee.java rename to spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/Employee.java index eaf350ed1e3..3e9da7609e3 100644 --- a/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/Employee.java +++ b/spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/Employee.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.beans.test.fixtures.beans; +package org.springframework.beans.testfixture.beans; public class Employee extends TestBean { diff --git a/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/GenericBean.java b/spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/GenericBean.java similarity index 99% rename from spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/GenericBean.java rename to spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/GenericBean.java index 6946e890f8f..2ad5ece17f5 100644 --- a/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/GenericBean.java +++ b/spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/GenericBean.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.beans.test.fixtures.beans; +package org.springframework.beans.testfixture.beans; import java.util.ArrayList; import java.util.Collection; diff --git a/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/GenericIntegerBean.java b/spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/GenericIntegerBean.java similarity index 92% rename from spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/GenericIntegerBean.java rename to spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/GenericIntegerBean.java index 375d57fac97..69fd56d1747 100644 --- a/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/GenericIntegerBean.java +++ b/spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/GenericIntegerBean.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.beans.test.fixtures.beans; +package org.springframework.beans.testfixture.beans; /** diff --git a/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/GenericSetOfIntegerBean.java b/spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/GenericSetOfIntegerBean.java similarity index 93% rename from spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/GenericSetOfIntegerBean.java rename to spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/GenericSetOfIntegerBean.java index d39f9078b79..c0439f9fb66 100644 --- a/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/GenericSetOfIntegerBean.java +++ b/spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/GenericSetOfIntegerBean.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.beans.test.fixtures.beans; +package org.springframework.beans.testfixture.beans; import java.util.Set; diff --git a/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/HasMap.java b/spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/HasMap.java similarity index 97% rename from spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/HasMap.java rename to spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/HasMap.java index 02cf25b1ca8..c874077bd1b 100644 --- a/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/HasMap.java +++ b/spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/HasMap.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.beans.test.fixtures.beans; +package org.springframework.beans.testfixture.beans; import java.util.IdentityHashMap; import java.util.List; diff --git a/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/INestedTestBean.java b/spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/INestedTestBean.java similarity index 92% rename from spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/INestedTestBean.java rename to spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/INestedTestBean.java index ab83dd23224..3107e6b5f21 100644 --- a/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/INestedTestBean.java +++ b/spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/INestedTestBean.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.beans.test.fixtures.beans; +package org.springframework.beans.testfixture.beans; public interface INestedTestBean { diff --git a/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/IOther.java b/spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/IOther.java similarity index 92% rename from spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/IOther.java rename to spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/IOther.java index 36d287fc9aa..05059bcf687 100644 --- a/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/IOther.java +++ b/spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/IOther.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.beans.test.fixtures.beans; +package org.springframework.beans.testfixture.beans; public interface IOther { diff --git a/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/ITestBean.java b/spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/ITestBean.java similarity index 92% rename from spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/ITestBean.java rename to spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/ITestBean.java index 9572e1265e0..742b39c4ea7 100644 --- a/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/ITestBean.java +++ b/spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/ITestBean.java @@ -14,12 +14,12 @@ * limitations under the License. */ -package org.springframework.beans.test.fixtures.beans; +package org.springframework.beans.testfixture.beans; import java.io.IOException; /** - * Interface used for {@link org.springframework.beans.test.fixtures.beans.TestBean}. + * Interface used for {@link org.springframework.beans.testfixture.beans.TestBean}. * *

Two methods are the same as on Person, but if this * extends person it breaks quite a few tests.. diff --git a/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/IndexedTestBean.java b/spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/IndexedTestBean.java similarity index 98% rename from spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/IndexedTestBean.java rename to spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/IndexedTestBean.java index 92de9d36780..02948f7eb85 100644 --- a/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/IndexedTestBean.java +++ b/spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/IndexedTestBean.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.beans.test.fixtures.beans; +package org.springframework.beans.testfixture.beans; import java.util.ArrayList; import java.util.Collection; diff --git a/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/LifecycleBean.java b/spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/LifecycleBean.java similarity index 98% rename from spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/LifecycleBean.java rename to spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/LifecycleBean.java index 3a070b01e52..b2e54028270 100644 --- a/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/LifecycleBean.java +++ b/spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/LifecycleBean.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.beans.test.fixtures.beans; +package org.springframework.beans.testfixture.beans; import org.springframework.beans.BeansException; import org.springframework.beans.factory.BeanFactory; diff --git a/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/MustBeInitialized.java b/spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/MustBeInitialized.java similarity index 96% rename from spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/MustBeInitialized.java rename to spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/MustBeInitialized.java index 39309643620..2e53ce2f885 100644 --- a/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/MustBeInitialized.java +++ b/spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/MustBeInitialized.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.beans.test.fixtures.beans; +package org.springframework.beans.testfixture.beans; import org.springframework.beans.factory.InitializingBean; diff --git a/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/NestedTestBean.java b/spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/NestedTestBean.java similarity index 96% rename from spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/NestedTestBean.java rename to spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/NestedTestBean.java index 179fa2a561d..ea26ec0072c 100644 --- a/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/NestedTestBean.java +++ b/spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/NestedTestBean.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.beans.test.fixtures.beans; +package org.springframework.beans.testfixture.beans; /** * Simple nested test bean used for testing bean factories, AOP framework etc. diff --git a/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/NumberTestBean.java b/spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/NumberTestBean.java similarity index 97% rename from spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/NumberTestBean.java rename to spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/NumberTestBean.java index e8874a2f92e..224965b5c7a 100644 --- a/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/NumberTestBean.java +++ b/spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/NumberTestBean.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.beans.test.fixtures.beans; +package org.springframework.beans.testfixture.beans; import java.math.BigDecimal; import java.math.BigInteger; diff --git a/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/PackageLevelVisibleBean.java b/spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/PackageLevelVisibleBean.java similarity index 93% rename from spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/PackageLevelVisibleBean.java rename to spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/PackageLevelVisibleBean.java index 1a7300325d8..73a0bd3b935 100644 --- a/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/PackageLevelVisibleBean.java +++ b/spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/PackageLevelVisibleBean.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.beans.test.fixtures.beans; +package org.springframework.beans.testfixture.beans; /** * @see org.springframework.beans.factory.config.FieldRetrievingFactoryBeanTests diff --git a/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/Person.java b/spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/Person.java similarity index 94% rename from spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/Person.java rename to spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/Person.java index 37f5a55a9cb..d57a8ca4267 100644 --- a/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/Person.java +++ b/spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/Person.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.beans.test.fixtures.beans; +package org.springframework.beans.testfixture.beans; /** * diff --git a/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/Pet.java b/spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/Pet.java similarity index 95% rename from spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/Pet.java rename to spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/Pet.java index 44073a367c7..661eff92feb 100644 --- a/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/Pet.java +++ b/spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/Pet.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.beans.test.fixtures.beans; +package org.springframework.beans.testfixture.beans; /** * @author Rob Harrop diff --git a/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/SerializablePerson.java b/spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/SerializablePerson.java similarity index 96% rename from spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/SerializablePerson.java rename to spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/SerializablePerson.java index e9d9398deff..6f9436906cc 100644 --- a/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/SerializablePerson.java +++ b/spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/SerializablePerson.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.beans.test.fixtures.beans; +package org.springframework.beans.testfixture.beans; import java.io.Serializable; diff --git a/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/SideEffectBean.java b/spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/SideEffectBean.java similarity index 94% rename from spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/SideEffectBean.java rename to spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/SideEffectBean.java index cc1333610ed..36911bdedcf 100644 --- a/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/SideEffectBean.java +++ b/spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/SideEffectBean.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.beans.test.fixtures.beans; +package org.springframework.beans.testfixture.beans; /** * Bean that changes state on a business invocation, so that diff --git a/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/TestAnnotation.java b/spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/TestAnnotation.java similarity index 93% rename from spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/TestAnnotation.java rename to spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/TestAnnotation.java index 83090e6bb83..379c87419b5 100644 --- a/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/TestAnnotation.java +++ b/spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/TestAnnotation.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.beans.test.fixtures.beans; +package org.springframework.beans.testfixture.beans; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; diff --git a/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/TestBean.java b/spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/TestBean.java similarity index 96% rename from spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/TestBean.java rename to spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/TestBean.java index 9cd31e42f00..10431c03425 100644 --- a/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/TestBean.java +++ b/spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/TestBean.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.beans.test.fixtures.beans; +package org.springframework.beans.testfixture.beans; import java.io.IOException; import java.util.ArrayList; @@ -421,7 +421,7 @@ public class TestBean implements BeanNameAware, BeanFactoryAware, ITestBean, IOt /** - * @see org.springframework.beans.test.fixtures.beans.ITestBean#exceptional(Throwable) + * @see org.springframework.beans.testfixture.beans.ITestBean#exceptional(Throwable) */ @Override public void exceptional(Throwable t) throws Throwable { @@ -435,7 +435,7 @@ public class TestBean implements BeanNameAware, BeanFactoryAware, ITestBean, IOt throw new IOException(); } /** - * @see org.springframework.beans.test.fixtures.beans.ITestBean#returnsThis() + * @see org.springframework.beans.testfixture.beans.ITestBean#returnsThis() */ @Override public Object returnsThis() { @@ -443,7 +443,7 @@ public class TestBean implements BeanNameAware, BeanFactoryAware, ITestBean, IOt } /** - * @see org.springframework.beans.test.fixtures.beans.IOther#absquatulate() + * @see org.springframework.beans.testfixture.beans.IOther#absquatulate() */ @Override public void absquatulate() { diff --git a/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/factory/DummyFactory.java b/spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/factory/DummyFactory.java similarity index 97% rename from spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/factory/DummyFactory.java rename to spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/factory/DummyFactory.java index ea27e526d17..9e3d8b6511a 100644 --- a/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/factory/DummyFactory.java +++ b/spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/factory/DummyFactory.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.beans.test.fixtures.beans.factory; +package org.springframework.beans.testfixture.beans.factory; import org.springframework.beans.BeansException; import org.springframework.beans.factory.BeanFactory; @@ -24,7 +24,7 @@ import org.springframework.beans.factory.DisposableBean; import org.springframework.beans.factory.FactoryBean; import org.springframework.beans.factory.InitializingBean; import org.springframework.beans.factory.config.AutowireCapableBeanFactory; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.TestBean; /** * Simple factory to allow testing of FactoryBean support in AbstractBeanFactory. diff --git a/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/package-info.java b/spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/package-info.java similarity index 55% rename from spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/package-info.java rename to spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/package-info.java index 010c228ef82..14a1870d42b 100644 --- a/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/package-info.java +++ b/spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/package-info.java @@ -1,4 +1,4 @@ /** * General purpose sample beans that can be used with tests. */ -package org.springframework.beans.test.fixtures.beans; +package org.springframework.beans.testfixture.beans; diff --git a/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/subpkg/DeepBean.java b/spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/subpkg/DeepBean.java similarity index 93% rename from spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/subpkg/DeepBean.java rename to spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/subpkg/DeepBean.java index fb5950c205c..50fc891ad83 100644 --- a/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/beans/subpkg/DeepBean.java +++ b/spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/subpkg/DeepBean.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.beans.test.fixtures.beans.subpkg; +package org.springframework.beans.testfixture.beans.subpkg; /** * Used for testing pointcut matching. diff --git a/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/factory/xml/AbstractBeanFactoryTests.java b/spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/factory/xml/AbstractBeanFactoryTests.java similarity index 96% rename from spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/factory/xml/AbstractBeanFactoryTests.java rename to spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/factory/xml/AbstractBeanFactoryTests.java index 5695b05d4aa..307a9d64c12 100644 --- a/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/factory/xml/AbstractBeanFactoryTests.java +++ b/spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/factory/xml/AbstractBeanFactoryTests.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.beans.test.fixtures.factory.xml; +package org.springframework.beans.testfixture.factory.xml; import java.beans.PropertyEditorSupport; import java.util.StringTokenizer; @@ -29,10 +29,10 @@ import org.springframework.beans.factory.BeanIsNotAFactoryException; import org.springframework.beans.factory.BeanNotOfRequiredTypeException; import org.springframework.beans.factory.NoSuchBeanDefinitionException; import org.springframework.beans.factory.config.ConfigurableBeanFactory; -import org.springframework.beans.test.fixtures.beans.LifecycleBean; -import org.springframework.beans.test.fixtures.beans.MustBeInitialized; -import org.springframework.beans.test.fixtures.beans.TestBean; -import org.springframework.beans.test.fixtures.beans.factory.DummyFactory; +import org.springframework.beans.testfixture.beans.LifecycleBean; +import org.springframework.beans.testfixture.beans.MustBeInitialized; +import org.springframework.beans.testfixture.beans.TestBean; +import org.springframework.beans.testfixture.beans.factory.DummyFactory; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; diff --git a/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/factory/xml/AbstractListableBeanFactoryTests.java b/spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/factory/xml/AbstractListableBeanFactoryTests.java similarity index 90% rename from spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/factory/xml/AbstractListableBeanFactoryTests.java rename to spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/factory/xml/AbstractListableBeanFactoryTests.java index 2d319fe47f1..0717f8a4936 100644 --- a/spring-beans/src/testFixtures/java/org/springframework/beans/test/fixtures/factory/xml/AbstractListableBeanFactoryTests.java +++ b/spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/factory/xml/AbstractListableBeanFactoryTests.java @@ -14,14 +14,14 @@ * limitations under the License. */ -package org.springframework.beans.test.fixtures.factory.xml; +package org.springframework.beans.testfixture.factory.xml; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.BeanFactory; import org.springframework.beans.factory.FactoryBean; import org.springframework.beans.factory.ListableBeanFactory; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; @@ -55,13 +55,13 @@ public abstract class AbstractListableBeanFactoryTests extends AbstractBeanFacto protected void assertTestBeanCount(int count) { String[] defNames = getListableBeanFactory().getBeanNamesForType(TestBean.class, true, false); - assertThat(defNames.length == count).as("We should have " + count + " beans for class org.springframework.beans.test.fixtures.beans.TestBean, not " + + assertThat(defNames.length == count).as("We should have " + count + " beans for class org.springframework.beans.testfixture.beans.TestBean, not " + defNames.length).isTrue(); int countIncludingFactoryBeans = count + 2; String[] names = getListableBeanFactory().getBeanNamesForType(TestBean.class, true, true); assertThat(names.length == countIncludingFactoryBeans).as("We should have " + countIncludingFactoryBeans + - " beans for class org.springframework.beans.test.fixtures.beans.TestBean, not " + names.length).isTrue(); + " beans for class org.springframework.beans.testfixture.beans.TestBean, not " + names.length).isTrue(); } @Test diff --git a/spring-context-support/src/test/java/org/springframework/scheduling/quartz/QuartzSupportTests.java b/spring-context-support/src/test/java/org/springframework/scheduling/quartz/QuartzSupportTests.java index d8e4506c516..a30b1c29121 100644 --- a/spring-context-support/src/test/java/org/springframework/scheduling/quartz/QuartzSupportTests.java +++ b/spring-context-support/src/test/java/org/springframework/scheduling/quartz/QuartzSupportTests.java @@ -34,7 +34,7 @@ import org.quartz.impl.SchedulerRepository; import org.springframework.beans.factory.config.BeanDefinition; import org.springframework.beans.factory.support.BeanDefinitionBuilder; import org.springframework.beans.factory.support.RootBeanDefinition; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.context.support.ClassPathXmlApplicationContext; import org.springframework.context.support.StaticApplicationContext; import org.springframework.core.task.TaskExecutor; diff --git a/spring-context-support/src/test/java/org/springframework/validation/beanvalidation2/BeanValidationPostProcessorTests.java b/spring-context-support/src/test/java/org/springframework/validation/beanvalidation2/BeanValidationPostProcessorTests.java index 39c6aae3808..4d014707077 100644 --- a/spring-context-support/src/test/java/org/springframework/validation/beanvalidation2/BeanValidationPostProcessorTests.java +++ b/spring-context-support/src/test/java/org/springframework/validation/beanvalidation2/BeanValidationPostProcessorTests.java @@ -24,7 +24,7 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.factory.BeanCreationException; import org.springframework.beans.factory.support.RootBeanDefinition; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.context.annotation.CommonAnnotationBeanPostProcessor; import org.springframework.context.support.GenericApplicationContext; import org.springframework.validation.beanvalidation.BeanValidationPostProcessor; diff --git a/spring-context/src/test/java/org/springframework/aop/aspectj/AfterAdviceBindingTests.java b/spring-context/src/test/java/org/springframework/aop/aspectj/AfterAdviceBindingTests.java index b5046caae51..036a78c7adf 100644 --- a/spring-context/src/test/java/org/springframework/aop/aspectj/AfterAdviceBindingTests.java +++ b/spring-context/src/test/java/org/springframework/aop/aspectj/AfterAdviceBindingTests.java @@ -22,8 +22,8 @@ import org.junit.jupiter.api.Test; import org.springframework.aop.aspectj.AdviceBindingTestAspect.AdviceBindingCollaborator; import org.springframework.aop.framework.Advised; import org.springframework.aop.support.AopUtils; -import org.springframework.beans.test.fixtures.beans.ITestBean; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.ITestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.context.support.ClassPathXmlApplicationContext; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-context/src/test/java/org/springframework/aop/aspectj/AfterReturningAdviceBindingTests.java b/spring-context/src/test/java/org/springframework/aop/aspectj/AfterReturningAdviceBindingTests.java index 224e749c670..1ea6cecb4d9 100644 --- a/spring-context/src/test/java/org/springframework/aop/aspectj/AfterReturningAdviceBindingTests.java +++ b/spring-context/src/test/java/org/springframework/aop/aspectj/AfterReturningAdviceBindingTests.java @@ -22,8 +22,8 @@ import org.junit.jupiter.api.Test; import org.springframework.aop.aspectj.AfterReturningAdviceBindingTestAspect.AfterReturningAdviceBindingCollaborator; import org.springframework.aop.framework.Advised; import org.springframework.aop.support.AopUtils; -import org.springframework.beans.test.fixtures.beans.ITestBean; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.ITestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.context.support.ClassPathXmlApplicationContext; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-context/src/test/java/org/springframework/aop/aspectj/AfterThrowingAdviceBindingTests.java b/spring-context/src/test/java/org/springframework/aop/aspectj/AfterThrowingAdviceBindingTests.java index 95829f7c96e..000a9f3efbb 100644 --- a/spring-context/src/test/java/org/springframework/aop/aspectj/AfterThrowingAdviceBindingTests.java +++ b/spring-context/src/test/java/org/springframework/aop/aspectj/AfterThrowingAdviceBindingTests.java @@ -20,7 +20,7 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.springframework.aop.aspectj.AfterThrowingAdviceBindingTestAspect.AfterThrowingAdviceBindingCollaborator; -import org.springframework.beans.test.fixtures.beans.ITestBean; +import org.springframework.beans.testfixture.beans.ITestBean; import org.springframework.context.support.ClassPathXmlApplicationContext; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; diff --git a/spring-context/src/test/java/org/springframework/aop/aspectj/AroundAdviceBindingTests.java b/spring-context/src/test/java/org/springframework/aop/aspectj/AroundAdviceBindingTests.java index f01b706f3ac..c3404c7662b 100644 --- a/spring-context/src/test/java/org/springframework/aop/aspectj/AroundAdviceBindingTests.java +++ b/spring-context/src/test/java/org/springframework/aop/aspectj/AroundAdviceBindingTests.java @@ -23,8 +23,8 @@ import org.junit.jupiter.api.Test; import org.springframework.aop.aspectj.AroundAdviceBindingTestAspect.AroundAdviceBindingCollaborator; import org.springframework.aop.framework.Advised; import org.springframework.aop.support.AopUtils; -import org.springframework.beans.test.fixtures.beans.ITestBean; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.ITestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; diff --git a/spring-context/src/test/java/org/springframework/aop/aspectj/AspectAndAdvicePrecedenceTests.java b/spring-context/src/test/java/org/springframework/aop/aspectj/AspectAndAdvicePrecedenceTests.java index 159d40ef02b..e813f37c899 100644 --- a/spring-context/src/test/java/org/springframework/aop/aspectj/AspectAndAdvicePrecedenceTests.java +++ b/spring-context/src/test/java/org/springframework/aop/aspectj/AspectAndAdvicePrecedenceTests.java @@ -24,7 +24,7 @@ import org.junit.jupiter.api.Test; import org.springframework.aop.MethodBeforeAdvice; import org.springframework.beans.factory.BeanNameAware; -import org.springframework.beans.test.fixtures.beans.ITestBean; +import org.springframework.beans.testfixture.beans.ITestBean; import org.springframework.context.support.ClassPathXmlApplicationContext; import org.springframework.core.Ordered; import org.springframework.lang.Nullable; diff --git a/spring-context/src/test/java/org/springframework/aop/aspectj/AspectJExpressionPointcutAdvisorTests.java b/spring-context/src/test/java/org/springframework/aop/aspectj/AspectJExpressionPointcutAdvisorTests.java index 53441e6f852..cb59c1a8d8d 100644 --- a/spring-context/src/test/java/org/springframework/aop/aspectj/AspectJExpressionPointcutAdvisorTests.java +++ b/spring-context/src/test/java/org/springframework/aop/aspectj/AspectJExpressionPointcutAdvisorTests.java @@ -21,7 +21,7 @@ import org.aopalliance.intercept.MethodInvocation; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; -import org.springframework.beans.test.fixtures.beans.ITestBean; +import org.springframework.beans.testfixture.beans.ITestBean; import org.springframework.context.support.ClassPathXmlApplicationContext; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-context/src/test/java/org/springframework/aop/aspectj/BeanNamePointcutAtAspectTests.java b/spring-context/src/test/java/org/springframework/aop/aspectj/BeanNamePointcutAtAspectTests.java index 60de4114d9d..3329cec3bd2 100644 --- a/spring-context/src/test/java/org/springframework/aop/aspectj/BeanNamePointcutAtAspectTests.java +++ b/spring-context/src/test/java/org/springframework/aop/aspectj/BeanNamePointcutAtAspectTests.java @@ -22,8 +22,8 @@ import org.junit.jupiter.api.Test; import org.springframework.aop.aspectj.annotation.AspectJProxyFactory; import org.springframework.aop.framework.Advised; -import org.springframework.beans.test.fixtures.beans.ITestBean; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.ITestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.context.support.ClassPathXmlApplicationContext; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-context/src/test/java/org/springframework/aop/aspectj/BeanNamePointcutTests.java b/spring-context/src/test/java/org/springframework/aop/aspectj/BeanNamePointcutTests.java index f315b7643b1..a56014324e0 100644 --- a/spring-context/src/test/java/org/springframework/aop/aspectj/BeanNamePointcutTests.java +++ b/spring-context/src/test/java/org/springframework/aop/aspectj/BeanNamePointcutTests.java @@ -25,7 +25,7 @@ import org.junit.jupiter.api.Test; import org.springframework.aop.MethodBeforeAdvice; import org.springframework.aop.framework.Advised; import org.springframework.beans.factory.FactoryBean; -import org.springframework.beans.test.fixtures.beans.ITestBean; +import org.springframework.beans.testfixture.beans.ITestBean; import org.springframework.context.support.ClassPathXmlApplicationContext; import org.springframework.lang.Nullable; diff --git a/spring-context/src/test/java/org/springframework/aop/aspectj/BeforeAdviceBindingTests.java b/spring-context/src/test/java/org/springframework/aop/aspectj/BeforeAdviceBindingTests.java index e3be4ccc200..90c5879aaa6 100644 --- a/spring-context/src/test/java/org/springframework/aop/aspectj/BeforeAdviceBindingTests.java +++ b/spring-context/src/test/java/org/springframework/aop/aspectj/BeforeAdviceBindingTests.java @@ -22,8 +22,8 @@ import org.junit.jupiter.api.Test; import org.springframework.aop.aspectj.AdviceBindingTestAspect.AdviceBindingCollaborator; import org.springframework.aop.framework.Advised; import org.springframework.aop.support.AopUtils; -import org.springframework.beans.test.fixtures.beans.ITestBean; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.ITestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.context.support.ClassPathXmlApplicationContext; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-context/src/test/java/org/springframework/aop/aspectj/DeclareParentsTests.java b/spring-context/src/test/java/org/springframework/aop/aspectj/DeclareParentsTests.java index ce1c128623f..c1bf87d2556 100644 --- a/spring-context/src/test/java/org/springframework/aop/aspectj/DeclareParentsTests.java +++ b/spring-context/src/test/java/org/springframework/aop/aspectj/DeclareParentsTests.java @@ -21,7 +21,7 @@ import org.junit.jupiter.api.Test; import test.mixin.Lockable; import org.springframework.aop.support.AopUtils; -import org.springframework.beans.test.fixtures.beans.ITestBean; +import org.springframework.beans.testfixture.beans.ITestBean; import org.springframework.context.support.ClassPathXmlApplicationContext; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-context/src/test/java/org/springframework/aop/aspectj/ImplicitJPArgumentMatchingAtAspectJTests.java b/spring-context/src/test/java/org/springframework/aop/aspectj/ImplicitJPArgumentMatchingAtAspectJTests.java index 0ac74719adc..fc9970bc091 100644 --- a/spring-context/src/test/java/org/springframework/aop/aspectj/ImplicitJPArgumentMatchingAtAspectJTests.java +++ b/spring-context/src/test/java/org/springframework/aop/aspectj/ImplicitJPArgumentMatchingAtAspectJTests.java @@ -21,7 +21,7 @@ import org.aspectj.lang.annotation.Around; import org.aspectj.lang.annotation.Aspect; import org.junit.jupiter.api.Test; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.context.support.ClassPathXmlApplicationContext; /** @@ -42,7 +42,7 @@ public class ImplicitJPArgumentMatchingAtAspectJTests { @Aspect static class CounterAtAspectJAspect { - @Around(value="execution(* org.springframework.beans.test.fixtures.beans.TestBean.*(..)) and this(bean) and args(argument)", + @Around(value="execution(* org.springframework.beans.testfixture.beans.TestBean.*(..)) and this(bean) and args(argument)", argNames="bean,argument") public void increment(ProceedingJoinPoint pjp, TestBean bean, Object argument) throws Throwable { pjp.proceed(); diff --git a/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/AspectImplementingInterfaceTests.java b/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/AspectImplementingInterfaceTests.java index f4b650f8da6..dc67e2e9002 100644 --- a/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/AspectImplementingInterfaceTests.java +++ b/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/AspectImplementingInterfaceTests.java @@ -20,7 +20,7 @@ import org.aspectj.lang.ProceedingJoinPoint; import org.junit.jupiter.api.Test; import org.springframework.aop.framework.Advised; -import org.springframework.beans.test.fixtures.beans.ITestBean; +import org.springframework.beans.testfixture.beans.ITestBean; import org.springframework.context.support.ClassPathXmlApplicationContext; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorAndLazyInitTargetSourceTests.java b/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorAndLazyInitTargetSourceTests.java index 43c9226c995..82b6fbb4d44 100644 --- a/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorAndLazyInitTargetSourceTests.java +++ b/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorAndLazyInitTargetSourceTests.java @@ -18,8 +18,8 @@ package org.springframework.aop.aspectj.autoproxy; import org.junit.jupiter.api.Test; -import org.springframework.beans.test.fixtures.beans.ITestBean; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.ITestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.context.support.ClassPathXmlApplicationContext; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests.java b/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests.java index b93e6448046..152c9a128d3 100644 --- a/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests.java +++ b/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests.java @@ -43,10 +43,10 @@ import org.springframework.beans.factory.config.MethodInvokingFactoryBean; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.support.RootBeanDefinition; import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; -import org.springframework.beans.test.fixtures.beans.INestedTestBean; -import org.springframework.beans.test.fixtures.beans.ITestBean; -import org.springframework.beans.test.fixtures.beans.NestedTestBean; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.INestedTestBean; +import org.springframework.beans.testfixture.beans.ITestBean; +import org.springframework.beans.testfixture.beans.NestedTestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; import org.springframework.context.support.GenericApplicationContext; diff --git a/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/AtAspectJAfterThrowingTests.java b/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/AtAspectJAfterThrowingTests.java index eb254e8dd1c..13bd4d38c0e 100644 --- a/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/AtAspectJAfterThrowingTests.java +++ b/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/AtAspectJAfterThrowingTests.java @@ -23,7 +23,7 @@ import org.aspectj.lang.annotation.Aspect; import org.junit.jupiter.api.Test; import org.springframework.aop.support.AopUtils; -import org.springframework.beans.test.fixtures.beans.ITestBean; +import org.springframework.beans.testfixture.beans.ITestBean; import org.springframework.context.support.ClassPathXmlApplicationContext; import static org.assertj.core.api.Assertions.assertThat; @@ -64,7 +64,7 @@ class ExceptionHandlingAspect { public IOException lastException; - @AfterThrowing(pointcut = "within(org.springframework.beans.test.fixtures.beans.ITestBean+)", throwing = "ex") + @AfterThrowing(pointcut = "within(org.springframework.beans.testfixture.beans.ITestBean+)", throwing = "ex") public void handleIOException(IOException ex) { handled++; lastException = ex; diff --git a/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/benchmark/BenchmarkTests.java b/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/benchmark/BenchmarkTests.java index 0ed10779ddc..c26ed5e6b89 100644 --- a/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/benchmark/BenchmarkTests.java +++ b/spring-context/src/test/java/org/springframework/aop/aspectj/autoproxy/benchmark/BenchmarkTests.java @@ -32,7 +32,7 @@ import org.springframework.aop.framework.Advised; import org.springframework.aop.support.AopUtils; import org.springframework.aop.support.DefaultPointcutAdvisor; import org.springframework.aop.support.StaticMethodMatcherPointcut; -import org.springframework.beans.test.fixtures.beans.ITestBean; +import org.springframework.beans.testfixture.beans.ITestBean; import org.springframework.context.support.ClassPathXmlApplicationContext; import org.springframework.util.StopWatch; diff --git a/spring-context/src/test/java/org/springframework/aop/aspectj/generic/AfterReturningGenericTypeMatchingTests.java b/spring-context/src/test/java/org/springframework/aop/aspectj/generic/AfterReturningGenericTypeMatchingTests.java index 2b37c428ab1..55507fec377 100644 --- a/spring-context/src/test/java/org/springframework/aop/aspectj/generic/AfterReturningGenericTypeMatchingTests.java +++ b/spring-context/src/test/java/org/springframework/aop/aspectj/generic/AfterReturningGenericTypeMatchingTests.java @@ -25,8 +25,8 @@ import org.aspectj.lang.annotation.Pointcut; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; -import org.springframework.beans.test.fixtures.beans.Employee; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.Employee; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.context.support.ClassPathXmlApplicationContext; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-context/src/test/java/org/springframework/aop/config/AopNamespaceHandlerProxyTargetClassTests.java b/spring-context/src/test/java/org/springframework/aop/config/AopNamespaceHandlerProxyTargetClassTests.java index a57e1113e3a..d295b1d1edc 100644 --- a/spring-context/src/test/java/org/springframework/aop/config/AopNamespaceHandlerProxyTargetClassTests.java +++ b/spring-context/src/test/java/org/springframework/aop/config/AopNamespaceHandlerProxyTargetClassTests.java @@ -20,7 +20,7 @@ import org.junit.jupiter.api.Test; import org.springframework.aop.framework.Advised; import org.springframework.aop.support.AopUtils; -import org.springframework.beans.test.fixtures.beans.ITestBean; +import org.springframework.beans.testfixture.beans.ITestBean; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-context/src/test/java/org/springframework/aop/config/AopNamespaceHandlerTests.java b/spring-context/src/test/java/org/springframework/aop/config/AopNamespaceHandlerTests.java index 3b5af8a87a4..4e71cd31771 100644 --- a/spring-context/src/test/java/org/springframework/aop/config/AopNamespaceHandlerTests.java +++ b/spring-context/src/test/java/org/springframework/aop/config/AopNamespaceHandlerTests.java @@ -23,8 +23,8 @@ import org.junit.jupiter.api.Test; import org.springframework.aop.Advisor; import org.springframework.aop.framework.Advised; import org.springframework.aop.support.AopUtils; -import org.springframework.beans.test.fixtures.beans.ITestBean; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.ITestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; import org.springframework.tests.aop.advice.CountingBeforeAdvice; diff --git a/spring-context/src/test/java/org/springframework/aop/framework/AbstractAopProxyTests.java b/spring-context/src/test/java/org/springframework/aop/framework/AbstractAopProxyTests.java index 94b08b3ff02..c1bcc57b52d 100644 --- a/spring-context/src/test/java/org/springframework/aop/framework/AbstractAopProxyTests.java +++ b/spring-context/src/test/java/org/springframework/aop/framework/AbstractAopProxyTests.java @@ -57,11 +57,11 @@ import org.springframework.aop.support.Pointcuts; import org.springframework.aop.support.StaticMethodMatcherPointcutAdvisor; import org.springframework.aop.target.HotSwappableTargetSource; import org.springframework.aop.target.SingletonTargetSource; -import org.springframework.beans.test.fixtures.beans.IOther; -import org.springframework.beans.test.fixtures.beans.ITestBean; -import org.springframework.beans.test.fixtures.beans.Person; -import org.springframework.beans.test.fixtures.beans.SerializablePerson; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.IOther; +import org.springframework.beans.testfixture.beans.ITestBean; +import org.springframework.beans.testfixture.beans.Person; +import org.springframework.beans.testfixture.beans.SerializablePerson; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.core.testfixture.EnabledForTestGroups; import org.springframework.core.testfixture.TestGroup; import org.springframework.core.testfixture.TimeStamped; diff --git a/spring-context/src/test/java/org/springframework/aop/framework/CglibProxyTests.java b/spring-context/src/test/java/org/springframework/aop/framework/CglibProxyTests.java index aec81a331e8..60b0e73c419 100644 --- a/spring-context/src/test/java/org/springframework/aop/framework/CglibProxyTests.java +++ b/spring-context/src/test/java/org/springframework/aop/framework/CglibProxyTests.java @@ -28,8 +28,8 @@ import org.springframework.aop.MethodMatcher; import org.springframework.aop.Pointcut; import org.springframework.aop.support.AopUtils; import org.springframework.aop.support.DefaultPointcutAdvisor; -import org.springframework.beans.test.fixtures.beans.ITestBean; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.ITestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContextException; import org.springframework.context.support.ClassPathXmlApplicationContext; diff --git a/spring-context/src/test/java/org/springframework/aop/framework/JdkDynamicProxyTests.java b/spring-context/src/test/java/org/springframework/aop/framework/JdkDynamicProxyTests.java index d34ac00a3ad..1488d384715 100644 --- a/spring-context/src/test/java/org/springframework/aop/framework/JdkDynamicProxyTests.java +++ b/spring-context/src/test/java/org/springframework/aop/framework/JdkDynamicProxyTests.java @@ -24,9 +24,9 @@ import org.junit.jupiter.api.Test; import org.springframework.aop.interceptor.ExposeInvocationInterceptor; import org.springframework.aop.support.AopUtils; -import org.springframework.beans.test.fixtures.beans.IOther; -import org.springframework.beans.test.fixtures.beans.ITestBean; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.IOther; +import org.springframework.beans.testfixture.beans.ITestBean; +import org.springframework.beans.testfixture.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException; diff --git a/spring-context/src/test/java/org/springframework/aop/framework/ProxyFactoryBeanTests.java b/spring-context/src/test/java/org/springframework/aop/framework/ProxyFactoryBeanTests.java index 040687e30ad..dd8e884664d 100644 --- a/spring-context/src/test/java/org/springframework/aop/framework/ProxyFactoryBeanTests.java +++ b/spring-context/src/test/java/org/springframework/aop/framework/ProxyFactoryBeanTests.java @@ -45,10 +45,10 @@ import org.springframework.beans.factory.support.BeanDefinitionRegistry; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.support.RootBeanDefinition; import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; -import org.springframework.beans.test.fixtures.beans.ITestBean; -import org.springframework.beans.test.fixtures.beans.Person; -import org.springframework.beans.test.fixtures.beans.SideEffectBean; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.ITestBean; +import org.springframework.beans.testfixture.beans.Person; +import org.springframework.beans.testfixture.beans.SideEffectBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.context.ApplicationListener; import org.springframework.context.test.fixtures.beans.TestApplicationListener; import org.springframework.core.io.ClassPathResource; diff --git a/spring-context/src/test/java/org/springframework/aop/framework/adapter/AdvisorAdapterRegistrationTests.java b/spring-context/src/test/java/org/springframework/aop/framework/adapter/AdvisorAdapterRegistrationTests.java index cb71798c54f..6fc225979e1 100644 --- a/spring-context/src/test/java/org/springframework/aop/framework/adapter/AdvisorAdapterRegistrationTests.java +++ b/spring-context/src/test/java/org/springframework/aop/framework/adapter/AdvisorAdapterRegistrationTests.java @@ -28,7 +28,7 @@ import org.junit.jupiter.api.Test; import org.springframework.aop.Advisor; import org.springframework.aop.BeforeAdvice; import org.springframework.aop.framework.Advised; -import org.springframework.beans.test.fixtures.beans.ITestBean; +import org.springframework.beans.testfixture.beans.ITestBean; import org.springframework.context.support.ClassPathXmlApplicationContext; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-context/src/test/java/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorTests.java b/spring-context/src/test/java/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorTests.java index 1b83b1680d1..db7fb5fb25e 100644 --- a/spring-context/src/test/java/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorTests.java +++ b/spring-context/src/test/java/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorTests.java @@ -31,8 +31,8 @@ import org.springframework.aop.target.LazyInitTargetSource; import org.springframework.aop.target.PrototypeTargetSource; import org.springframework.aop.target.ThreadLocalTargetSource; import org.springframework.beans.factory.BeanFactory; -import org.springframework.beans.test.fixtures.beans.CountingTestBean; -import org.springframework.beans.test.fixtures.beans.ITestBean; +import org.springframework.beans.testfixture.beans.CountingTestBean; +import org.springframework.beans.testfixture.beans.ITestBean; import org.springframework.context.support.ClassPathXmlApplicationContext; import org.springframework.tests.aop.advice.CountingBeforeAdvice; import org.springframework.tests.aop.interceptor.NopInterceptor; diff --git a/spring-context/src/test/java/org/springframework/aop/framework/autoproxy/AutoProxyCreatorTests.java b/spring-context/src/test/java/org/springframework/aop/framework/autoproxy/AutoProxyCreatorTests.java index e2565bde791..b0fde5f2be9 100644 --- a/spring-context/src/test/java/org/springframework/aop/framework/autoproxy/AutoProxyCreatorTests.java +++ b/spring-context/src/test/java/org/springframework/aop/framework/autoproxy/AutoProxyCreatorTests.java @@ -37,10 +37,10 @@ import org.springframework.beans.factory.FactoryBean; import org.springframework.beans.factory.InitializingBean; import org.springframework.beans.factory.config.BeanDefinitionHolder; import org.springframework.beans.factory.support.RootBeanDefinition; -import org.springframework.beans.test.fixtures.beans.ITestBean; -import org.springframework.beans.test.fixtures.beans.IndexedTestBean; -import org.springframework.beans.test.fixtures.beans.TestBean; -import org.springframework.beans.test.fixtures.beans.factory.DummyFactory; +import org.springframework.beans.testfixture.beans.ITestBean; +import org.springframework.beans.testfixture.beans.IndexedTestBean; +import org.springframework.beans.testfixture.beans.TestBean; +import org.springframework.beans.testfixture.beans.factory.DummyFactory; import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContextAware; import org.springframework.context.MessageSource; diff --git a/spring-context/src/test/java/org/springframework/aop/framework/autoproxy/BeanNameAutoProxyCreatorInitTests.java b/spring-context/src/test/java/org/springframework/aop/framework/autoproxy/BeanNameAutoProxyCreatorInitTests.java index 2374a56fcbb..71d49ff2c06 100644 --- a/spring-context/src/test/java/org/springframework/aop/framework/autoproxy/BeanNameAutoProxyCreatorInitTests.java +++ b/spring-context/src/test/java/org/springframework/aop/framework/autoproxy/BeanNameAutoProxyCreatorInitTests.java @@ -21,7 +21,7 @@ import java.lang.reflect.Method; import org.junit.jupiter.api.Test; import org.springframework.aop.MethodBeforeAdvice; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.context.support.ClassPathXmlApplicationContext; import org.springframework.lang.Nullable; diff --git a/spring-context/src/test/java/org/springframework/aop/framework/autoproxy/BeanNameAutoProxyCreatorTests.java b/spring-context/src/test/java/org/springframework/aop/framework/autoproxy/BeanNameAutoProxyCreatorTests.java index cbd7ba5aff7..5167ba3f089 100644 --- a/spring-context/src/test/java/org/springframework/aop/framework/autoproxy/BeanNameAutoProxyCreatorTests.java +++ b/spring-context/src/test/java/org/springframework/aop/framework/autoproxy/BeanNameAutoProxyCreatorTests.java @@ -25,8 +25,8 @@ import org.springframework.aop.framework.Advised; import org.springframework.aop.support.AopUtils; import org.springframework.beans.factory.BeanFactory; import org.springframework.beans.factory.FactoryBean; -import org.springframework.beans.test.fixtures.beans.ITestBean; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.ITestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.context.support.ClassPathXmlApplicationContext; import org.springframework.core.testfixture.TimeStamped; import org.springframework.tests.aop.advice.CountingBeforeAdvice; diff --git a/spring-context/src/test/java/org/springframework/aop/scope/ScopedProxyTests.java b/spring-context/src/test/java/org/springframework/aop/scope/ScopedProxyTests.java index 246863726d3..7b6cb703a7b 100644 --- a/spring-context/src/test/java/org/springframework/aop/scope/ScopedProxyTests.java +++ b/spring-context/src/test/java/org/springframework/aop/scope/ScopedProxyTests.java @@ -25,8 +25,8 @@ import org.junit.jupiter.api.Test; import org.springframework.aop.support.AopUtils; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; -import org.springframework.beans.test.fixtures.beans.ITestBean; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.ITestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.context.support.GenericApplicationContext; import org.springframework.context.test.fixtures.SimpleMapScope; import org.springframework.core.io.ClassPathResource; diff --git a/spring-context/src/test/java/org/springframework/aop/target/CommonsPool2TargetSourceTests.java b/spring-context/src/test/java/org/springframework/aop/target/CommonsPool2TargetSourceTests.java index 68f75103a80..ebfc29c8fd5 100644 --- a/spring-context/src/test/java/org/springframework/aop/target/CommonsPool2TargetSourceTests.java +++ b/spring-context/src/test/java/org/springframework/aop/target/CommonsPool2TargetSourceTests.java @@ -25,9 +25,9 @@ import org.junit.jupiter.api.Test; import org.springframework.aop.framework.Advised; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; -import org.springframework.beans.test.fixtures.beans.Person; -import org.springframework.beans.test.fixtures.beans.SerializablePerson; -import org.springframework.beans.test.fixtures.beans.SideEffectBean; +import org.springframework.beans.testfixture.beans.Person; +import org.springframework.beans.testfixture.beans.SerializablePerson; +import org.springframework.beans.testfixture.beans.SideEffectBean; import org.springframework.context.support.StaticApplicationContext; import org.springframework.core.io.ClassPathResource; import org.springframework.core.testfixture.io.SerializationTestUtils; diff --git a/spring-context/src/test/java/org/springframework/beans/factory/xml/LookupMethodWrappedByCglibProxyTests.java b/spring-context/src/test/java/org/springframework/beans/factory/xml/LookupMethodWrappedByCglibProxyTests.java index 275ddd9fcbb..e65b730e693 100644 --- a/spring-context/src/test/java/org/springframework/beans/factory/xml/LookupMethodWrappedByCglibProxyTests.java +++ b/spring-context/src/test/java/org/springframework/beans/factory/xml/LookupMethodWrappedByCglibProxyTests.java @@ -20,7 +20,7 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.springframework.aop.interceptor.DebugInterceptor; -import org.springframework.beans.test.fixtures.beans.ITestBean; +import org.springframework.beans.testfixture.beans.ITestBean; import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; diff --git a/spring-context/src/test/java/org/springframework/beans/factory/xml/SimplePropertyNamespaceHandlerWithExpressionLanguageTests.java b/spring-context/src/test/java/org/springframework/beans/factory/xml/SimplePropertyNamespaceHandlerWithExpressionLanguageTests.java index 18ef636ee13..954cf1f6dbf 100644 --- a/spring-context/src/test/java/org/springframework/beans/factory/xml/SimplePropertyNamespaceHandlerWithExpressionLanguageTests.java +++ b/spring-context/src/test/java/org/springframework/beans/factory/xml/SimplePropertyNamespaceHandlerWithExpressionLanguageTests.java @@ -18,7 +18,7 @@ package org.springframework.beans.factory.xml; import org.junit.jupiter.api.Test; -import org.springframework.beans.test.fixtures.beans.ITestBean; +import org.springframework.beans.testfixture.beans.ITestBean; import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; diff --git a/spring-context/src/test/java/org/springframework/beans/factory/xml/XmlBeanFactoryTestTypes.java b/spring-context/src/test/java/org/springframework/beans/factory/xml/XmlBeanFactoryTestTypes.java index 936981add7b..1ac5e555bad 100644 --- a/spring-context/src/test/java/org/springframework/beans/factory/xml/XmlBeanFactoryTestTypes.java +++ b/spring-context/src/test/java/org/springframework/beans/factory/xml/XmlBeanFactoryTestTypes.java @@ -33,10 +33,10 @@ import org.springframework.beans.factory.DisposableBean; import org.springframework.beans.factory.InitializingBean; import org.springframework.beans.factory.config.BeanPostProcessor; import org.springframework.beans.factory.support.MethodReplacer; -import org.springframework.beans.test.fixtures.beans.ITestBean; -import org.springframework.beans.test.fixtures.beans.IndexedTestBean; -import org.springframework.beans.test.fixtures.beans.TestBean; -import org.springframework.beans.test.fixtures.beans.factory.DummyFactory; +import org.springframework.beans.testfixture.beans.ITestBean; +import org.springframework.beans.testfixture.beans.IndexedTestBean; +import org.springframework.beans.testfixture.beans.TestBean; +import org.springframework.beans.testfixture.beans.factory.DummyFactory; /** * Types used by {@link XmlBeanFactoryTests} and its attendant XML config files. diff --git a/spring-context/src/test/java/org/springframework/beans/factory/xml/XmlBeanFactoryTests.java b/spring-context/src/test/java/org/springframework/beans/factory/xml/XmlBeanFactoryTests.java index 70c6116e7c6..4a66ed91ef0 100644 --- a/spring-context/src/test/java/org/springframework/beans/factory/xml/XmlBeanFactoryTests.java +++ b/spring-context/src/test/java/org/springframework/beans/factory/xml/XmlBeanFactoryTests.java @@ -51,12 +51,12 @@ import org.springframework.beans.factory.support.AbstractBeanDefinition; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.support.MethodReplacer; import org.springframework.beans.factory.support.RootBeanDefinition; -import org.springframework.beans.test.fixtures.beans.DependenciesBean; -import org.springframework.beans.test.fixtures.beans.DerivedTestBean; -import org.springframework.beans.test.fixtures.beans.ITestBean; -import org.springframework.beans.test.fixtures.beans.IndexedTestBean; -import org.springframework.beans.test.fixtures.beans.TestBean; -import org.springframework.beans.test.fixtures.beans.factory.DummyFactory; +import org.springframework.beans.testfixture.beans.DependenciesBean; +import org.springframework.beans.testfixture.beans.DerivedTestBean; +import org.springframework.beans.testfixture.beans.ITestBean; +import org.springframework.beans.testfixture.beans.IndexedTestBean; +import org.springframework.beans.testfixture.beans.TestBean; +import org.springframework.beans.testfixture.beans.factory.DummyFactory; import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.FileSystemResource; import org.springframework.core.io.UrlResource; diff --git a/spring-context/src/test/java/org/springframework/beans/factory/xml/support/CustomNamespaceHandlerTests.java b/spring-context/src/test/java/org/springframework/beans/factory/xml/support/CustomNamespaceHandlerTests.java index a03a18f4a1e..e623102553c 100644 --- a/spring-context/src/test/java/org/springframework/beans/factory/xml/support/CustomNamespaceHandlerTests.java +++ b/spring-context/src/test/java/org/springframework/beans/factory/xml/support/CustomNamespaceHandlerTests.java @@ -51,8 +51,8 @@ import org.springframework.beans.factory.xml.NamespaceHandlerSupport; import org.springframework.beans.factory.xml.ParserContext; import org.springframework.beans.factory.xml.PluggableSchemaResolver; import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; -import org.springframework.beans.test.fixtures.beans.ITestBean; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.ITestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.context.ApplicationListener; import org.springframework.context.support.GenericApplicationContext; import org.springframework.core.io.ClassPathResource; diff --git a/spring-context/src/test/java/org/springframework/cache/CacheReproTests.java b/spring-context/src/test/java/org/springframework/cache/CacheReproTests.java index 4ade8ae382a..05e82151140 100644 --- a/spring-context/src/test/java/org/springframework/cache/CacheReproTests.java +++ b/spring-context/src/test/java/org/springframework/cache/CacheReproTests.java @@ -24,7 +24,7 @@ import java.util.Optional; import org.junit.jupiter.api.Test; import org.mockito.Mockito; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.cache.annotation.CachePut; import org.springframework.cache.annotation.Cacheable; import org.springframework.cache.annotation.Caching; diff --git a/spring-context/src/test/java/org/springframework/context/LifecycleContextBean.java b/spring-context/src/test/java/org/springframework/context/LifecycleContextBean.java index c6e1fe0b194..1f04eb182cc 100644 --- a/spring-context/src/test/java/org/springframework/context/LifecycleContextBean.java +++ b/spring-context/src/test/java/org/springframework/context/LifecycleContextBean.java @@ -18,7 +18,7 @@ package org.springframework.context; import org.springframework.beans.BeansException; import org.springframework.beans.factory.BeanFactory; -import org.springframework.beans.test.fixtures.beans.LifecycleBean; +import org.springframework.beans.testfixture.beans.LifecycleBean; /** * Simple bean to test ApplicationContext lifecycle methods for beans diff --git a/spring-context/src/test/java/org/springframework/context/annotation/AbstractCircularImportDetectionTests.java b/spring-context/src/test/java/org/springframework/context/annotation/AbstractCircularImportDetectionTests.java index 3ad2a49c70a..28808939e39 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/AbstractCircularImportDetectionTests.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/AbstractCircularImportDetectionTests.java @@ -19,7 +19,7 @@ package org.springframework.context.annotation; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.parsing.BeanDefinitionParsingException; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-context/src/test/java/org/springframework/context/annotation/AnnotationProcessorPerformanceTests.java b/spring-context/src/test/java/org/springframework/context/annotation/AnnotationProcessorPerformanceTests.java index b0a89c07e96..4b564506fa8 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/AnnotationProcessorPerformanceTests.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/AnnotationProcessorPerformanceTests.java @@ -33,8 +33,8 @@ import org.springframework.beans.factory.config.BeanDefinition; import org.springframework.beans.factory.config.RuntimeBeanReference; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.support.RootBeanDefinition; -import org.springframework.beans.test.fixtures.beans.ITestBean; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.ITestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.context.support.GenericApplicationContext; import org.springframework.core.testfixture.Assume; import org.springframework.core.testfixture.EnabledForTestGroups; diff --git a/spring-context/src/test/java/org/springframework/context/annotation/ClassPathBeanDefinitionScannerTests.java b/spring-context/src/test/java/org/springframework/context/annotation/ClassPathBeanDefinitionScannerTests.java index f569b9e252d..225a6fc7440 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/ClassPathBeanDefinitionScannerTests.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/ClassPathBeanDefinitionScannerTests.java @@ -31,7 +31,7 @@ import org.springframework.beans.factory.config.BeanDefinition; import org.springframework.beans.factory.support.BeanDefinitionRegistry; import org.springframework.beans.factory.support.RootBeanDefinition; import org.springframework.beans.factory.support.StaticListableBeanFactory; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.context.MessageSource; import org.springframework.context.annotation2.NamedStubDao2; import org.springframework.context.support.GenericApplicationContext; diff --git a/spring-context/src/test/java/org/springframework/context/annotation/ClassPathFactoryBeanDefinitionScannerTests.java b/spring-context/src/test/java/org/springframework/context/annotation/ClassPathFactoryBeanDefinitionScannerTests.java index b8cd73c5b04..a15cc4c7687 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/ClassPathFactoryBeanDefinitionScannerTests.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/ClassPathFactoryBeanDefinitionScannerTests.java @@ -23,7 +23,7 @@ import org.springframework.aop.support.AopUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.beans.factory.support.RootBeanDefinition; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.context.annotation4.DependencyBean; import org.springframework.context.annotation4.FactoryMethodComponent; import org.springframework.context.support.AbstractApplicationContext; diff --git a/spring-context/src/test/java/org/springframework/context/annotation/CommonAnnotationBeanPostProcessorTests.java b/spring-context/src/test/java/org/springframework/context/annotation/CommonAnnotationBeanPostProcessorTests.java index 44af70d9b10..7c1fa7016aa 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/CommonAnnotationBeanPostProcessorTests.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/CommonAnnotationBeanPostProcessorTests.java @@ -36,10 +36,10 @@ import org.springframework.beans.factory.config.DestructionAwareBeanPostProcesso import org.springframework.beans.factory.config.PropertyPlaceholderConfigurer; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.support.RootBeanDefinition; -import org.springframework.beans.test.fixtures.beans.INestedTestBean; -import org.springframework.beans.test.fixtures.beans.ITestBean; -import org.springframework.beans.test.fixtures.beans.NestedTestBean; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.INestedTestBean; +import org.springframework.beans.testfixture.beans.ITestBean; +import org.springframework.beans.testfixture.beans.NestedTestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.context.support.GenericApplicationContext; import org.springframework.context.test.fixtures.jndi.ExpectedLookupTemplate; import org.springframework.core.testfixture.io.SerializationTestUtils; diff --git a/spring-context/src/test/java/org/springframework/context/annotation/ConfigurationClassAndBFPPTests.java b/spring-context/src/test/java/org/springframework/context/annotation/ConfigurationClassAndBFPPTests.java index 4eb979370fe..21324a769ed 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/ConfigurationClassAndBFPPTests.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/ConfigurationClassAndBFPPTests.java @@ -22,7 +22,7 @@ import org.springframework.beans.BeansException; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.config.BeanFactoryPostProcessor; import org.springframework.beans.factory.config.ConfigurableListableBeanFactory; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-context/src/test/java/org/springframework/context/annotation/ConfigurationClassPostConstructAndAutowiringTests.java b/spring-context/src/test/java/org/springframework/context/annotation/ConfigurationClassPostConstructAndAutowiringTests.java index 5d8fe0c6e1f..0aaf4c00a06 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/ConfigurationClassPostConstructAndAutowiringTests.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/ConfigurationClassPostConstructAndAutowiringTests.java @@ -21,7 +21,7 @@ import javax.annotation.PostConstruct; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-context/src/test/java/org/springframework/context/annotation/ConfigurationClassPostProcessorTests.java b/spring-context/src/test/java/org/springframework/context/annotation/ConfigurationClassPostProcessorTests.java index f6ac667ba90..a99e16e530c 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/ConfigurationClassPostProcessorTests.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/ConfigurationClassPostProcessorTests.java @@ -53,8 +53,8 @@ import org.springframework.beans.factory.support.BeanDefinitionRegistryPostProce import org.springframework.beans.factory.support.ChildBeanDefinition; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.support.RootBeanDefinition; -import org.springframework.beans.test.fixtures.beans.ITestBean; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.ITestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.context.ApplicationContext; import org.springframework.context.annotation.componentscan.simple.SimpleComponent; import org.springframework.core.ResolvableType; diff --git a/spring-context/src/test/java/org/springframework/context/annotation/FooServiceDependentConverter.java b/spring-context/src/test/java/org/springframework/context/annotation/FooServiceDependentConverter.java index b2f5d054444..34af301685b 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/FooServiceDependentConverter.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/FooServiceDependentConverter.java @@ -23,7 +23,7 @@ import org.springframework.core.convert.converter.Converter; /** * @author Juergen Hoeller */ -public class FooServiceDependentConverter implements Converter { +public class FooServiceDependentConverter implements Converter { @SuppressWarnings("unused") private FooService fooService; @@ -33,8 +33,8 @@ public class FooServiceDependentConverter implements Converter m = new HashMap<>(); m.put("name", "Roderick"); - parent.registerPrototype("rod", org.springframework.beans.test.fixtures.beans.TestBean.class, new MutablePropertyValues(m)); + parent.registerPrototype("rod", org.springframework.beans.testfixture.beans.TestBean.class, new MutablePropertyValues(m)); m.put("name", "Albert"); - parent.registerPrototype("father", org.springframework.beans.test.fixtures.beans.TestBean.class, new MutablePropertyValues(m)); + parent.registerPrototype("father", org.springframework.beans.testfixture.beans.TestBean.class, new MutablePropertyValues(m)); parent.refresh(); parent.addApplicationListener(parentListener); diff --git a/spring-context/src/test/java/org/springframework/ejb/config/JeeNamespaceHandlerEventTests.java b/spring-context/src/test/java/org/springframework/ejb/config/JeeNamespaceHandlerEventTests.java index 214f1b53163..dc0e81943f3 100644 --- a/spring-context/src/test/java/org/springframework/ejb/config/JeeNamespaceHandlerEventTests.java +++ b/spring-context/src/test/java/org/springframework/ejb/config/JeeNamespaceHandlerEventTests.java @@ -23,7 +23,7 @@ import org.springframework.beans.factory.parsing.BeanComponentDefinition; import org.springframework.beans.factory.parsing.ComponentDefinition; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; -import org.springframework.beans.test.fixtures.beans.CollectingReaderEventListener; +import org.springframework.beans.testfixture.beans.CollectingReaderEventListener; import org.springframework.core.io.ClassPathResource; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-context/src/test/java/org/springframework/ejb/config/JeeNamespaceHandlerTests.java b/spring-context/src/test/java/org/springframework/ejb/config/JeeNamespaceHandlerTests.java index ac91f812a0e..2b4ac0d08c0 100644 --- a/spring-context/src/test/java/org/springframework/ejb/config/JeeNamespaceHandlerTests.java +++ b/spring-context/src/test/java/org/springframework/ejb/config/JeeNamespaceHandlerTests.java @@ -23,7 +23,7 @@ import org.springframework.beans.factory.config.BeanDefinition; import org.springframework.beans.factory.config.ConfigurableListableBeanFactory; import org.springframework.beans.factory.config.RuntimeBeanReference; import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; -import org.springframework.beans.test.fixtures.beans.ITestBean; +import org.springframework.beans.testfixture.beans.ITestBean; import org.springframework.context.support.GenericApplicationContext; import org.springframework.core.io.ClassPathResource; import org.springframework.ejb.access.LocalStatelessSessionProxyFactoryBean; @@ -126,7 +126,7 @@ public class JeeNamespaceHandlerTests { assertPropertyValue(beanDefinition, "lookupHomeOnStartup", "true"); assertPropertyValue(beanDefinition, "resourceRef", "true"); assertPropertyValue(beanDefinition, "jndiEnvironment", "foo=bar"); - assertPropertyValue(beanDefinition, "homeInterface", "org.springframework.beans.test.fixtures.beans.ITestBean"); + assertPropertyValue(beanDefinition, "homeInterface", "org.springframework.beans.testfixture.beans.ITestBean"); assertPropertyValue(beanDefinition, "refreshHomeOnConnectFailure", "true"); assertPropertyValue(beanDefinition, "cacheSessionBean", "true"); } diff --git a/spring-context/src/test/java/org/springframework/jmx/export/MBeanExporterTests.java b/spring-context/src/test/java/org/springframework/jmx/export/MBeanExporterTests.java index c743b5d7f71..e172dfd61d6 100644 --- a/spring-context/src/test/java/org/springframework/jmx/export/MBeanExporterTests.java +++ b/spring-context/src/test/java/org/springframework/jmx/export/MBeanExporterTests.java @@ -42,7 +42,7 @@ import org.springframework.beans.factory.FactoryBean; import org.springframework.beans.factory.support.BeanDefinitionBuilder; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.support.RootBeanDefinition; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.context.ConfigurableApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; import org.springframework.jmx.AbstractMBeanServerTests; diff --git a/spring-context/src/test/java/org/springframework/jndi/JndiObjectFactoryBeanTests.java b/spring-context/src/test/java/org/springframework/jndi/JndiObjectFactoryBeanTests.java index 368b7b68ac7..f7660b85815 100644 --- a/spring-context/src/test/java/org/springframework/jndi/JndiObjectFactoryBeanTests.java +++ b/spring-context/src/test/java/org/springframework/jndi/JndiObjectFactoryBeanTests.java @@ -22,9 +22,9 @@ import javax.naming.NamingException; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.support.DefaultListableBeanFactory; -import org.springframework.beans.test.fixtures.beans.DerivedTestBean; -import org.springframework.beans.test.fixtures.beans.ITestBean; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.DerivedTestBean; +import org.springframework.beans.testfixture.beans.ITestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.context.test.fixtures.jndi.ExpectedLookupTemplate; import static org.assertj.core.api.Assertions.assertThat; @@ -365,7 +365,7 @@ public class JndiObjectFactoryBeanTests { jof.setProxyInterface(ITestBean.class); assertThatExceptionOfType(NamingException.class).isThrownBy( jof::afterPropertiesSet) - .withMessageContaining("org.springframework.beans.test.fixtures.beans.DerivedTestBean"); + .withMessageContaining("org.springframework.beans.testfixture.beans.DerivedTestBean"); } @Test diff --git a/spring-context/src/test/java/org/springframework/scripting/ContextScriptBean.java b/spring-context/src/test/java/org/springframework/scripting/ContextScriptBean.java index b811e3a8293..b5033666dd2 100644 --- a/spring-context/src/test/java/org/springframework/scripting/ContextScriptBean.java +++ b/spring-context/src/test/java/org/springframework/scripting/ContextScriptBean.java @@ -16,7 +16,7 @@ package org.springframework.scripting; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.context.ApplicationContext; /** diff --git a/spring-context/src/test/java/org/springframework/scripting/TestBeanAwareMessenger.java b/spring-context/src/test/java/org/springframework/scripting/TestBeanAwareMessenger.java index 94a5492a9da..5edefe5c7ad 100644 --- a/spring-context/src/test/java/org/springframework/scripting/TestBeanAwareMessenger.java +++ b/spring-context/src/test/java/org/springframework/scripting/TestBeanAwareMessenger.java @@ -16,7 +16,7 @@ package org.springframework.scripting; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.TestBean; /** * @author Juergen Hoeller diff --git a/spring-context/src/test/java/org/springframework/scripting/bsh/BshScriptFactoryTests.java b/spring-context/src/test/java/org/springframework/scripting/bsh/BshScriptFactoryTests.java index 088c1b55399..39459719073 100644 --- a/spring-context/src/test/java/org/springframework/scripting/bsh/BshScriptFactoryTests.java +++ b/spring-context/src/test/java/org/springframework/scripting/bsh/BshScriptFactoryTests.java @@ -24,7 +24,7 @@ import org.junit.jupiter.api.Test; import org.springframework.aop.support.AopUtils; import org.springframework.aop.target.dynamic.Refreshable; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationEvent; import org.springframework.context.support.ClassPathXmlApplicationContext; diff --git a/spring-context/src/test/java/org/springframework/scripting/groovy/GroovyScriptFactoryTests.java b/spring-context/src/test/java/org/springframework/scripting/groovy/GroovyScriptFactoryTests.java index 66e18acce54..c657c9ec1ea 100644 --- a/spring-context/src/test/java/org/springframework/scripting/groovy/GroovyScriptFactoryTests.java +++ b/spring-context/src/test/java/org/springframework/scripting/groovy/GroovyScriptFactoryTests.java @@ -29,7 +29,7 @@ import org.springframework.aop.target.dynamic.Refreshable; import org.springframework.beans.factory.BeanCreationException; import org.springframework.beans.factory.FactoryBean; import org.springframework.beans.factory.config.BeanDefinition; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; import org.springframework.core.NestedRuntimeException; diff --git a/spring-context/src/test/java/org/springframework/tests/sample/beans/FieldAccessBean.java b/spring-context/src/test/java/org/springframework/tests/sample/beans/FieldAccessBean.java index c1453a0d045..e9a2ea500b9 100644 --- a/spring-context/src/test/java/org/springframework/tests/sample/beans/FieldAccessBean.java +++ b/spring-context/src/test/java/org/springframework/tests/sample/beans/FieldAccessBean.java @@ -16,7 +16,7 @@ package org.springframework.tests.sample.beans; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.TestBean; /** * @author Juergen Hoeller diff --git a/spring-context/src/test/java/org/springframework/ui/ModelMapTests.java b/spring-context/src/test/java/org/springframework/ui/ModelMapTests.java index cee193825b8..376d8a13107 100644 --- a/spring-context/src/test/java/org/springframework/ui/ModelMapTests.java +++ b/spring-context/src/test/java/org/springframework/ui/ModelMapTests.java @@ -30,7 +30,7 @@ import java.util.Map; import org.junit.jupiter.api.Test; import org.springframework.aop.framework.ProxyFactory; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.util.ClassUtils; import org.springframework.util.StringUtils; diff --git a/spring-context/src/test/java/org/springframework/validation/DataBinderFieldAccessTests.java b/spring-context/src/test/java/org/springframework/validation/DataBinderFieldAccessTests.java index 4f1a60ad675..60245476004 100644 --- a/spring-context/src/test/java/org/springframework/validation/DataBinderFieldAccessTests.java +++ b/spring-context/src/test/java/org/springframework/validation/DataBinderFieldAccessTests.java @@ -25,7 +25,7 @@ import org.springframework.beans.MutablePropertyValues; import org.springframework.beans.NotWritablePropertyException; import org.springframework.beans.NullValueInNestedPathException; import org.springframework.beans.PropertyValue; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.tests.sample.beans.FieldAccessBean; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-context/src/test/java/org/springframework/validation/DataBinderTests.java b/spring-context/src/test/java/org/springframework/validation/DataBinderTests.java index 0c6b8ba82e9..67af3f30b97 100644 --- a/spring-context/src/test/java/org/springframework/validation/DataBinderTests.java +++ b/spring-context/src/test/java/org/springframework/validation/DataBinderTests.java @@ -48,11 +48,11 @@ import org.springframework.beans.TypeMismatchException; import org.springframework.beans.propertyeditors.CustomCollectionEditor; import org.springframework.beans.propertyeditors.CustomNumberEditor; import org.springframework.beans.propertyeditors.StringTrimmerEditor; -import org.springframework.beans.test.fixtures.beans.DerivedTestBean; -import org.springframework.beans.test.fixtures.beans.ITestBean; -import org.springframework.beans.test.fixtures.beans.IndexedTestBean; -import org.springframework.beans.test.fixtures.beans.SerializablePerson; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.DerivedTestBean; +import org.springframework.beans.testfixture.beans.ITestBean; +import org.springframework.beans.testfixture.beans.IndexedTestBean; +import org.springframework.beans.testfixture.beans.SerializablePerson; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.context.i18n.LocaleContextHolder; import org.springframework.context.support.ResourceBundleMessageSource; import org.springframework.context.support.StaticMessageSource; @@ -1578,7 +1578,7 @@ public class DataBinderTests { assertThat(errors.getFieldError("array[0]").getCodes()[1]).isEqualTo("NOT_ROD.tb.array"); assertThat(errors.getFieldError("array[0]").getCodes()[2]).isEqualTo("NOT_ROD.array[0]"); assertThat(errors.getFieldError("array[0]").getCodes()[3]).isEqualTo("NOT_ROD.array"); - assertThat(errors.getFieldError("array[0]").getCodes()[4]).isEqualTo("NOT_ROD.org.springframework.beans.test.fixtures.beans.DerivedTestBean"); + assertThat(errors.getFieldError("array[0]").getCodes()[4]).isEqualTo("NOT_ROD.org.springframework.beans.testfixture.beans.DerivedTestBean"); assertThat(errors.getFieldError("array[0]").getCodes()[5]).isEqualTo("NOT_ROD"); assertThat(errors.getFieldValue("array[0]")).isEqualTo("arraya"); @@ -1588,7 +1588,7 @@ public class DataBinderTests { assertThat(errors.getFieldError("map[key1]").getCodes()[1]).isEqualTo("NOT_ROD.tb.map"); assertThat(errors.getFieldError("map[key1]").getCodes()[2]).isEqualTo("NOT_ROD.map[key1]"); assertThat(errors.getFieldError("map[key1]").getCodes()[3]).isEqualTo("NOT_ROD.map"); - assertThat(errors.getFieldError("map[key1]").getCodes()[4]).isEqualTo("NOT_ROD.org.springframework.beans.test.fixtures.beans.TestBean"); + assertThat(errors.getFieldError("map[key1]").getCodes()[4]).isEqualTo("NOT_ROD.org.springframework.beans.testfixture.beans.TestBean"); assertThat(errors.getFieldError("map[key1]").getCodes()[5]).isEqualTo("NOT_ROD"); assertThat(errors.getFieldErrorCount("map[key0]")).isEqualTo(1); @@ -1627,7 +1627,7 @@ public class DataBinderTests { assertThat(errors.getFieldError("map[key0]").getCodes()[3]).isEqualTo("NOT_NULL.map"); // This next code is only generated because of the registered editor, using the // registered type of the editor as guess for the content type of the collection. - assertThat(errors.getFieldError("map[key0]").getCodes()[4]).isEqualTo("NOT_NULL.org.springframework.beans.test.fixtures.beans.TestBean"); + assertThat(errors.getFieldError("map[key0]").getCodes()[4]).isEqualTo("NOT_NULL.org.springframework.beans.testfixture.beans.TestBean"); assertThat(errors.getFieldError("map[key0]").getCodes()[5]).isEqualTo("NOT_NULL"); } @@ -1658,7 +1658,7 @@ public class DataBinderTests { assertThat(errors.getFieldError("map[key0]").getCodes()[3]).isEqualTo("NOT_NULL.map"); // This next code is only generated because of the registered editor, using the // registered type of the editor as guess for the content type of the collection. - assertThat(errors.getFieldError("map[key0]").getCodes()[4]).isEqualTo("NOT_NULL.org.springframework.beans.test.fixtures.beans.TestBean"); + assertThat(errors.getFieldError("map[key0]").getCodes()[4]).isEqualTo("NOT_NULL.org.springframework.beans.testfixture.beans.TestBean"); assertThat(errors.getFieldError("map[key0]").getCodes()[5]).isEqualTo("NOT_NULL"); } @@ -1691,7 +1691,7 @@ public class DataBinderTests { assertThat(errors.getFieldError("array[0]").getCodes()[1]).isEqualTo("NOT_ROD.tb.array"); assertThat(errors.getFieldError("array[0]").getCodes()[2]).isEqualTo("NOT_ROD.array[0]"); assertThat(errors.getFieldError("array[0]").getCodes()[3]).isEqualTo("NOT_ROD.array"); - assertThat(errors.getFieldError("array[0]").getCodes()[4]).isEqualTo("NOT_ROD.org.springframework.beans.test.fixtures.beans.DerivedTestBean"); + assertThat(errors.getFieldError("array[0]").getCodes()[4]).isEqualTo("NOT_ROD.org.springframework.beans.testfixture.beans.DerivedTestBean"); assertThat(errors.getFieldError("array[0]").getCodes()[5]).isEqualTo("NOT_ROD"); assertThat(errors.getFieldValue("array[0]")).isEqualTo("arraya"); } @@ -1783,6 +1783,7 @@ public class DataBinderTests { } @Test + @SuppressWarnings("unchecked") public void testBindingWithResortedList() { IndexedTestBean tb = new IndexedTestBean(); DataBinder binder = new DataBinder(tb, "tb"); @@ -2077,6 +2078,7 @@ public class DataBinderTests { return Title; } + @SuppressWarnings("unused") public void setTitle(String title) { Title = title; } @@ -2085,6 +2087,7 @@ public class DataBinderTests { return ISBN; } + @SuppressWarnings("unused") public void setISBN(String ISBN) { this.ISBN = ISBN; } @@ -2093,6 +2096,7 @@ public class DataBinderTests { return nInStock; } + @SuppressWarnings("unused") public void setNInStock(int nInStock) { this.nInStock = nInStock; } @@ -2109,6 +2113,7 @@ public class DataBinderTests { return id; } + @SuppressWarnings("unused") public void setId(String id) { this.id = id; } @@ -2117,6 +2122,7 @@ public class DataBinderTests { return name; } + @SuppressWarnings("unused") public void setName(Optional name) { this.name = name; } diff --git a/spring-context/src/test/java/org/springframework/validation/DefaultMessageCodesResolverTests.java b/spring-context/src/test/java/org/springframework/validation/DefaultMessageCodesResolverTests.java index 91b1e993575..01c06157a4b 100644 --- a/spring-context/src/test/java/org/springframework/validation/DefaultMessageCodesResolverTests.java +++ b/spring-context/src/test/java/org/springframework/validation/DefaultMessageCodesResolverTests.java @@ -18,7 +18,7 @@ package org.springframework.validation; import org.junit.jupiter.api.Test; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.validation.DefaultMessageCodesResolver.Format; import static org.assertj.core.api.Assertions.assertThat; @@ -47,7 +47,7 @@ public class DefaultMessageCodesResolverTests { assertThat(codes).containsExactly( "errorCode.objectName.field", "errorCode.field", - "errorCode.org.springframework.beans.test.fixtures.beans.TestBean", + "errorCode.org.springframework.beans.testfixture.beans.TestBean", "errorCode"); } @@ -63,7 +63,7 @@ public class DefaultMessageCodesResolverTests { "errorCode.a.b[3].c.d", "errorCode.a.b.c.d", "errorCode.d", - "errorCode.org.springframework.beans.test.fixtures.beans.TestBean", + "errorCode.org.springframework.beans.testfixture.beans.TestBean", "errorCode"); } @@ -84,7 +84,7 @@ public class DefaultMessageCodesResolverTests { assertThat(codes).containsExactly( "prefix.errorCode.objectName.field", "prefix.errorCode.field", - "prefix.errorCode.org.springframework.beans.test.fixtures.beans.TestBean", + "prefix.errorCode.org.springframework.beans.testfixture.beans.TestBean", "prefix.errorCode"); } @@ -96,7 +96,7 @@ public class DefaultMessageCodesResolverTests { assertThat(codes).containsExactly( "errorCode.objectName.field", "errorCode.field", - "errorCode.org.springframework.beans.test.fixtures.beans.TestBean", + "errorCode.org.springframework.beans.testfixture.beans.TestBean", "errorCode"); } @@ -107,7 +107,7 @@ public class DefaultMessageCodesResolverTests { assertThat(codes).containsExactly( "errorCode.objectName.field[", "errorCode.field[", - "errorCode.org.springframework.beans.test.fixtures.beans.TestBean", + "errorCode.org.springframework.beans.testfixture.beans.TestBean", "errorCode"); } @@ -138,7 +138,7 @@ public class DefaultMessageCodesResolverTests { assertThat(codes).containsExactly( "objectName.field.errorCode", "field.errorCode", - "org.springframework.beans.test.fixtures.beans.TestBean.errorCode", + "org.springframework.beans.testfixture.beans.TestBean.errorCode", "errorCode"); } diff --git a/spring-context/src/test/java/org/springframework/validation/ValidationUtilsTests.java b/spring-context/src/test/java/org/springframework/validation/ValidationUtilsTests.java index b7cf77ba620..0a027b95df4 100644 --- a/spring-context/src/test/java/org/springframework/validation/ValidationUtilsTests.java +++ b/spring-context/src/test/java/org/springframework/validation/ValidationUtilsTests.java @@ -18,7 +18,7 @@ package org.springframework.validation; import org.junit.jupiter.api.Test; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.lang.Nullable; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-context/src/test/java/org/springframework/validation/beanvalidation/BeanValidationPostProcessorTests.java b/spring-context/src/test/java/org/springframework/validation/beanvalidation/BeanValidationPostProcessorTests.java index 57556388158..1af2d6dd3ba 100644 --- a/spring-context/src/test/java/org/springframework/validation/beanvalidation/BeanValidationPostProcessorTests.java +++ b/spring-context/src/test/java/org/springframework/validation/beanvalidation/BeanValidationPostProcessorTests.java @@ -25,7 +25,7 @@ import org.junit.jupiter.api.Test; import org.springframework.aop.framework.autoproxy.DefaultAdvisorAutoProxyCreator; import org.springframework.beans.factory.BeanCreationException; import org.springframework.beans.factory.support.RootBeanDefinition; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.context.annotation.CommonAnnotationBeanPostProcessor; import org.springframework.context.support.GenericApplicationContext; import org.springframework.scheduling.annotation.Async; diff --git a/spring-context/src/test/java/test/aspect/TwoAdviceAspect.java b/spring-context/src/test/java/test/aspect/TwoAdviceAspect.java index a1426d6aafb..3e544072e4e 100644 --- a/spring-context/src/test/java/test/aspect/TwoAdviceAspect.java +++ b/spring-context/src/test/java/test/aspect/TwoAdviceAspect.java @@ -26,12 +26,12 @@ public class TwoAdviceAspect { private int totalCalls; - @Around("execution(* org.springframework.beans.test.fixtures.beans.ITestBean.age())") + @Around("execution(* org.springframework.beans.testfixture.beans.ITestBean.age())") public int returnCallCount(ProceedingJoinPoint pjp) throws Exception { return totalCalls; } - @Before("execution(* org.springframework.beans.test.fixtures.beans.ITestBean.setAge(int)) && args(newAge)") + @Before("execution(* org.springframework.beans.testfixture.beans.ITestBean.setAge(int)) && args(newAge)") public void countSet(int newAge) throws Exception { ++totalCalls; } diff --git a/spring-context/src/test/resources/org/springframework/aop/aspectj/AfterAdviceBindingTests.xml b/spring-context/src/test/resources/org/springframework/aop/aspectj/AfterAdviceBindingTests.xml index 5ecde6ca491..7b7b2f8808d 100644 --- a/spring-context/src/test/resources/org/springframework/aop/aspectj/AfterAdviceBindingTests.xml +++ b/spring-context/src/test/resources/org/springframework/aop/aspectj/AfterAdviceBindingTests.xml @@ -19,6 +19,6 @@ - + diff --git a/spring-context/src/test/resources/org/springframework/aop/aspectj/AfterReturningAdviceBindingTests.xml b/spring-context/src/test/resources/org/springframework/aop/aspectj/AfterReturningAdviceBindingTests.xml index 5cc51680df5..796fcd4986c 100644 --- a/spring-context/src/test/resources/org/springframework/aop/aspectj/AfterReturningAdviceBindingTests.xml +++ b/spring-context/src/test/resources/org/springframework/aop/aspectj/AfterReturningAdviceBindingTests.xml @@ -18,7 +18,7 @@ + pointcut="execution(org.springframework.beans.testfixture.beans.ITestBean[] *(..))"/> @@ -30,6 +30,6 @@ - + diff --git a/spring-context/src/test/resources/org/springframework/aop/aspectj/AfterThrowingAdviceBindingTests.xml b/spring-context/src/test/resources/org/springframework/aop/aspectj/AfterThrowingAdviceBindingTests.xml index e665e035250..8e821461736 100644 --- a/spring-context/src/test/resources/org/springframework/aop/aspectj/AfterThrowingAdviceBindingTests.xml +++ b/spring-context/src/test/resources/org/springframework/aop/aspectj/AfterThrowingAdviceBindingTests.xml @@ -37,6 +37,6 @@ - + \ No newline at end of file diff --git a/spring-context/src/test/resources/org/springframework/aop/aspectj/AroundAdviceBindingTests.xml b/spring-context/src/test/resources/org/springframework/aop/aspectj/AroundAdviceBindingTests.xml index 8e68af9d141..2aa4754ffa0 100644 --- a/spring-context/src/test/resources/org/springframework/aop/aspectj/AroundAdviceBindingTests.xml +++ b/spring-context/src/test/resources/org/springframework/aop/aspectj/AroundAdviceBindingTests.xml @@ -17,6 +17,6 @@ - + diff --git a/spring-context/src/test/resources/org/springframework/aop/aspectj/AroundAdviceCircularTests.xml b/spring-context/src/test/resources/org/springframework/aop/aspectj/AroundAdviceCircularTests.xml index f410271d7b3..e2380f0179b 100644 --- a/spring-context/src/test/resources/org/springframework/aop/aspectj/AroundAdviceCircularTests.xml +++ b/spring-context/src/test/resources/org/springframework/aop/aspectj/AroundAdviceCircularTests.xml @@ -17,11 +17,11 @@ - + - + diff --git a/spring-context/src/test/resources/org/springframework/aop/aspectj/AspectAndAdvicePrecedenceTests.xml b/spring-context/src/test/resources/org/springframework/aop/aspectj/AspectAndAdvicePrecedenceTests.xml index 1b140f9632a..424716d9f1d 100644 --- a/spring-context/src/test/resources/org/springframework/aop/aspectj/AspectAndAdvicePrecedenceTests.xml +++ b/spring-context/src/test/resources/org/springframework/aop/aspectj/AspectAndAdvicePrecedenceTests.xml @@ -85,6 +85,6 @@ - + diff --git a/spring-context/src/test/resources/org/springframework/aop/aspectj/AspectJExpressionPointcutAdvisorTests.xml b/spring-context/src/test/resources/org/springframework/aop/aspectj/AspectJExpressionPointcutAdvisorTests.xml index baad9c68b56..056c8eff1ba 100644 --- a/spring-context/src/test/resources/org/springframework/aop/aspectj/AspectJExpressionPointcutAdvisorTests.xml +++ b/spring-context/src/test/resources/org/springframework/aop/aspectj/AspectJExpressionPointcutAdvisorTests.xml @@ -5,11 +5,11 @@ - + + value="execution(org.springframework.beans.testfixture.beans.ITestBean[] org.springframework.beans.testfixture.beans.ITestBean.*(..))"/> diff --git a/spring-context/src/test/resources/org/springframework/aop/aspectj/BeanNamePointcutAtAspectTests.xml b/spring-context/src/test/resources/org/springframework/aop/aspectj/BeanNamePointcutAtAspectTests.xml index 2cfba0956be..3e3e9a69f6f 100644 --- a/spring-context/src/test/resources/org/springframework/aop/aspectj/BeanNamePointcutAtAspectTests.xml +++ b/spring-context/src/test/resources/org/springframework/aop/aspectj/BeanNamePointcutAtAspectTests.xml @@ -7,9 +7,9 @@ - - - + + + diff --git a/spring-context/src/test/resources/org/springframework/aop/aspectj/BeanNamePointcutTests.xml b/spring-context/src/test/resources/org/springframework/aop/aspectj/BeanNamePointcutTests.xml index 9f41524e6d3..a60d6c0727a 100644 --- a/spring-context/src/test/resources/org/springframework/aop/aspectj/BeanNamePointcutTests.xml +++ b/spring-context/src/test/resources/org/springframework/aop/aspectj/BeanNamePointcutTests.xml @@ -21,15 +21,15 @@ - + - + - + - + @@ -55,9 +55,9 @@ - + - + diff --git a/spring-context/src/test/resources/org/springframework/aop/aspectj/BeforeAdviceBindingTests.xml b/spring-context/src/test/resources/org/springframework/aop/aspectj/BeforeAdviceBindingTests.xml index 19c4ce3bc8f..bd0da186ebb 100644 --- a/spring-context/src/test/resources/org/springframework/aop/aspectj/BeforeAdviceBindingTests.xml +++ b/spring-context/src/test/resources/org/springframework/aop/aspectj/BeforeAdviceBindingTests.xml @@ -26,7 +26,7 @@ - + diff --git a/spring-context/src/test/resources/org/springframework/aop/aspectj/DeclareParentsTests.xml b/spring-context/src/test/resources/org/springframework/aop/aspectj/DeclareParentsTests.xml index 7f74e47c7cf..96779df3338 100644 --- a/spring-context/src/test/resources/org/springframework/aop/aspectj/DeclareParentsTests.xml +++ b/spring-context/src/test/resources/org/springframework/aop/aspectj/DeclareParentsTests.xml @@ -8,7 +8,7 @@ @@ -22,6 +22,6 @@ - + diff --git a/spring-context/src/test/resources/org/springframework/aop/aspectj/ImplicitJPArgumentMatchingAtAspectJTests.xml b/spring-context/src/test/resources/org/springframework/aop/aspectj/ImplicitJPArgumentMatchingAtAspectJTests.xml index 7c46bcce08e..ade5ce1961b 100644 --- a/spring-context/src/test/resources/org/springframework/aop/aspectj/ImplicitJPArgumentMatchingAtAspectJTests.xml +++ b/spring-context/src/test/resources/org/springframework/aop/aspectj/ImplicitJPArgumentMatchingAtAspectJTests.xml @@ -5,7 +5,7 @@ xsi:schemaLocation="http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://www.springframework.org/schema/aop https://www.springframework.org/schema/aop/spring-aop-2.0.xsd"> - + diff --git a/spring-context/src/test/resources/org/springframework/aop/aspectj/ImplicitJPArgumentMatchingTests.xml b/spring-context/src/test/resources/org/springframework/aop/aspectj/ImplicitJPArgumentMatchingTests.xml index ac966540837..b146694936e 100644 --- a/spring-context/src/test/resources/org/springframework/aop/aspectj/ImplicitJPArgumentMatchingTests.xml +++ b/spring-context/src/test/resources/org/springframework/aop/aspectj/ImplicitJPArgumentMatchingTests.xml @@ -8,12 +8,12 @@ + expression="execution(* org.springframework.beans.testfixture.beans.TestBean.*(..)) and this(bean) and args(argument)"/> - + diff --git a/spring-context/src/test/resources/org/springframework/aop/aspectj/OverloadedAdviceTests-ambiguous.xml b/spring-context/src/test/resources/org/springframework/aop/aspectj/OverloadedAdviceTests-ambiguous.xml index 0b5aa6944cc..ff428b87185 100644 --- a/spring-context/src/test/resources/org/springframework/aop/aspectj/OverloadedAdviceTests-ambiguous.xml +++ b/spring-context/src/test/resources/org/springframework/aop/aspectj/OverloadedAdviceTests-ambiguous.xml @@ -15,6 +15,6 @@ - + \ No newline at end of file diff --git a/spring-context/src/test/resources/org/springframework/aop/aspectj/OverloadedAdviceTests.xml b/spring-context/src/test/resources/org/springframework/aop/aspectj/OverloadedAdviceTests.xml index 13e4f86a983..df9bfadc8eb 100644 --- a/spring-context/src/test/resources/org/springframework/aop/aspectj/OverloadedAdviceTests.xml +++ b/spring-context/src/test/resources/org/springframework/aop/aspectj/OverloadedAdviceTests.xml @@ -16,6 +16,6 @@ - + \ No newline at end of file diff --git a/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/AspectImplementingInterfaceTests-context.xml b/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/AspectImplementingInterfaceTests-context.xml index 002466ec29a..ffe4eac1aa1 100644 --- a/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/AspectImplementingInterfaceTests-context.xml +++ b/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/AspectImplementingInterfaceTests-context.xml @@ -13,7 +13,7 @@ - + diff --git a/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests-aspects.xml b/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests-aspects.xml index c6a0ff0a777..e390f073739 100644 --- a/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests-aspects.xml +++ b/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests-aspects.xml @@ -23,11 +23,11 @@ - + - + diff --git a/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests-aspectsPlusAdvisor.xml b/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests-aspectsPlusAdvisor.xml index ecd344e78e9..62515c21814 100644 --- a/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests-aspectsPlusAdvisor.xml +++ b/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests-aspectsPlusAdvisor.xml @@ -9,17 +9,17 @@ - + - + - + diff --git a/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests-aspectsWithAbstractBean.xml b/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests-aspectsWithAbstractBean.xml index be0cb20777a..d4d66d8c9bc 100644 --- a/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests-aspectsWithAbstractBean.xml +++ b/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests-aspectsWithAbstractBean.xml @@ -19,7 +19,7 @@ - + diff --git a/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests-aspectsWithOrdering.xml b/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests-aspectsWithOrdering.xml index e29fb7e2854..7760c65cc01 100644 --- a/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests-aspectsWithOrdering.xml +++ b/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests-aspectsWithOrdering.xml @@ -17,7 +17,7 @@ - + diff --git a/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests-pertarget.xml b/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests-pertarget.xml index dc1f1bb0787..8f9d9bdd695 100644 --- a/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests-pertarget.xml +++ b/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests-pertarget.xml @@ -10,12 +10,12 @@ - + - + diff --git a/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests-perthis.xml b/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests-perthis.xml index eb7eed64d40..231038cafc5 100644 --- a/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests-perthis.xml +++ b/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests-perthis.xml @@ -7,7 +7,7 @@ - + diff --git a/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests-twoAdviceAspect.xml b/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests-twoAdviceAspect.xml index f113cfe7169..c8dcfe9ee96 100644 --- a/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests-twoAdviceAspect.xml +++ b/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests-twoAdviceAspect.xml @@ -9,7 +9,7 @@ - + diff --git a/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests-twoAdviceAspectPrototype.xml b/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests-twoAdviceAspectPrototype.xml index d2064c69863..5bb345353ce 100644 --- a/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests-twoAdviceAspectPrototype.xml +++ b/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests-twoAdviceAspectPrototype.xml @@ -7,7 +7,7 @@ - + diff --git a/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests-twoAdviceAspectSingleton.xml b/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests-twoAdviceAspectSingleton.xml index 9df7f552b09..9202f08e820 100644 --- a/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests-twoAdviceAspectSingleton.xml +++ b/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests-twoAdviceAspectSingleton.xml @@ -7,7 +7,7 @@ - + diff --git a/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests-usesInclude.xml b/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests-usesInclude.xml index 5d804f663a0..b63bf5f5da9 100644 --- a/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests-usesInclude.xml +++ b/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests-usesInclude.xml @@ -18,7 +18,7 @@ - + diff --git a/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests-usesJoinPointAspect.xml b/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests-usesJoinPointAspect.xml index 9b3669425e5..1babdf85bb3 100644 --- a/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests-usesJoinPointAspect.xml +++ b/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/AspectJAutoProxyCreatorTests-usesJoinPointAspect.xml @@ -7,7 +7,7 @@ - + diff --git a/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/AtAspectJAfterThrowingTests-context.xml b/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/AtAspectJAfterThrowingTests-context.xml index 50415ee7377..4e5a8f826d3 100644 --- a/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/AtAspectJAfterThrowingTests-context.xml +++ b/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/AtAspectJAfterThrowingTests-context.xml @@ -5,7 +5,7 @@ - + diff --git a/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/benchmark/BenchmarkTests-aspectj.xml b/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/benchmark/BenchmarkTests-aspectj.xml index 231c290f60e..aec87459fdd 100644 --- a/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/benchmark/BenchmarkTests-aspectj.xml +++ b/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/benchmark/BenchmarkTests-aspectj.xml @@ -22,7 +22,7 @@ class="org.springframework.aop.aspectj.autoproxy.benchmark.TraceAspect" > - + diff --git a/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/benchmark/BenchmarkTests-springAop.xml b/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/benchmark/BenchmarkTests-springAop.xml index 486d65bfc52..ec543f9b718 100644 --- a/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/benchmark/BenchmarkTests-springAop.xml +++ b/spring-context/src/test/resources/org/springframework/aop/aspectj/autoproxy/benchmark/BenchmarkTests-springAop.xml @@ -31,7 +31,7 @@ - + diff --git a/spring-context/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerAdviceTypeTests-error.xml b/spring-context/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerAdviceTypeTests-error.xml index c3358ad7bfb..a400f711808 100644 --- a/spring-context/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerAdviceTypeTests-error.xml +++ b/spring-context/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerAdviceTypeTests-error.xml @@ -19,7 +19,7 @@ - + diff --git a/spring-context/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerAdviceTypeTests-ok.xml b/spring-context/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerAdviceTypeTests-ok.xml index b9f74dac0c9..4a290477bb9 100644 --- a/spring-context/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerAdviceTypeTests-ok.xml +++ b/spring-context/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerAdviceTypeTests-ok.xml @@ -20,7 +20,7 @@ - + diff --git a/spring-context/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerArgNamesTests-error.xml b/spring-context/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerArgNamesTests-error.xml index dcbc2f7e181..d91aeeb0fe5 100644 --- a/spring-context/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerArgNamesTests-error.xml +++ b/spring-context/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerArgNamesTests-error.xml @@ -16,7 +16,7 @@ - + diff --git a/spring-context/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerArgNamesTests-ok.xml b/spring-context/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerArgNamesTests-ok.xml index b6fbab330c9..fd3825157fc 100644 --- a/spring-context/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerArgNamesTests-ok.xml +++ b/spring-context/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerArgNamesTests-ok.xml @@ -16,7 +16,7 @@ - + diff --git a/spring-context/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerProxyTargetClassTests-context.xml b/spring-context/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerProxyTargetClassTests-context.xml index 83a496efa5b..e64f25a3fc2 100644 --- a/spring-context/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerProxyTargetClassTests-context.xml +++ b/spring-context/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerProxyTargetClassTests-context.xml @@ -23,7 +23,7 @@ - + diff --git a/spring-context/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerReturningTests-error.xml b/spring-context/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerReturningTests-error.xml index aff7923afb0..7fdfd981e51 100644 --- a/spring-context/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerReturningTests-error.xml +++ b/spring-context/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerReturningTests-error.xml @@ -15,7 +15,7 @@ - + diff --git a/spring-context/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerReturningTests-ok.xml b/spring-context/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerReturningTests-ok.xml index 1d16230fdf8..d50e3d862b0 100644 --- a/spring-context/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerReturningTests-ok.xml +++ b/spring-context/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerReturningTests-ok.xml @@ -15,7 +15,7 @@ - + diff --git a/spring-context/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerTests-context.xml b/spring-context/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerTests-context.xml index 0757bdc261e..3929abd3076 100644 --- a/spring-context/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerTests-context.xml +++ b/spring-context/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerTests-context.xml @@ -23,7 +23,7 @@ - + diff --git a/spring-context/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerThrowingTests-error.xml b/spring-context/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerThrowingTests-error.xml index 19151e25d9b..3a940b46a48 100644 --- a/spring-context/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerThrowingTests-error.xml +++ b/spring-context/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerThrowingTests-error.xml @@ -15,7 +15,7 @@ - + diff --git a/spring-context/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerThrowingTests-ok.xml b/spring-context/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerThrowingTests-ok.xml index 69bda253a19..a203d781163 100644 --- a/spring-context/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerThrowingTests-ok.xml +++ b/spring-context/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerThrowingTests-ok.xml @@ -15,7 +15,7 @@ - + diff --git a/spring-context/src/test/resources/org/springframework/aop/config/PrototypeProxyTests-context.xml b/spring-context/src/test/resources/org/springframework/aop/config/PrototypeProxyTests-context.xml index 31327e7da58..9d25bab0594 100644 --- a/spring-context/src/test/resources/org/springframework/aop/config/PrototypeProxyTests-context.xml +++ b/spring-context/src/test/resources/org/springframework/aop/config/PrototypeProxyTests-context.xml @@ -5,13 +5,13 @@ xsi:schemaLocation="http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://www.springframework.org/schema/aop https://www.springframework.org/schema/aop/spring-aop-2.0.xsd"> - + - + - + @@ -20,7 +20,7 @@ - + diff --git a/spring-context/src/test/resources/org/springframework/aop/framework/ProxyFactoryBeanTests-autowiring.xml b/spring-context/src/test/resources/org/springframework/aop/framework/ProxyFactoryBeanTests-autowiring.xml index ff14f489b7d..190687da043 100644 --- a/spring-context/src/test/resources/org/springframework/aop/framework/ProxyFactoryBeanTests-autowiring.xml +++ b/spring-context/src/test/resources/org/springframework/aop/framework/ProxyFactoryBeanTests-autowiring.xml @@ -8,7 +8,7 @@ - + diff --git a/spring-context/src/test/resources/org/springframework/aop/framework/ProxyFactoryBeanTests-context.xml b/spring-context/src/test/resources/org/springframework/aop/framework/ProxyFactoryBeanTests-context.xml index edd3e72571f..b7eaa18ef82 100644 --- a/spring-context/src/test/resources/org/springframework/aop/framework/ProxyFactoryBeanTests-context.xml +++ b/spring-context/src/test/resources/org/springframework/aop/framework/ProxyFactoryBeanTests-context.xml @@ -4,7 +4,7 @@ - + custom 666 @@ -12,7 +12,7 @@ - org.springframework.beans.test.fixtures.beans.ITestBean + org.springframework.beans.testfixture.beans.ITestBean debugInterceptor @@ -27,7 +27,7 @@ Aspect interfaces don't need to be included here. They may, for example, be added by global interceptors. --> - org.springframework.beans.test.fixtures.beans.ITestBean + org.springframework.beans.testfixture.beans.ITestBean countingBeforeAdvice,adamTargetSource @@ -42,7 +42,7 @@ - org.springframework.beans.test.fixtures.beans.ITestBean + org.springframework.beans.testfixture.beans.ITestBean adam diff --git a/spring-context/src/test/resources/org/springframework/aop/framework/ProxyFactoryBeanTests-frozen.xml b/spring-context/src/test/resources/org/springframework/aop/framework/ProxyFactoryBeanTests-frozen.xml index e365c73fd9d..a8883db6820 100644 --- a/spring-context/src/test/resources/org/springframework/aop/framework/ProxyFactoryBeanTests-frozen.xml +++ b/spring-context/src/test/resources/org/springframework/aop/framework/ProxyFactoryBeanTests-frozen.xml @@ -4,7 +4,7 @@ - + custom 666 @@ -16,7 +16,7 @@ - org.springframework.beans.test.fixtures.beans.ITestBean + org.springframework.beans.testfixture.beans.ITestBean debugInterceptor diff --git a/spring-context/src/test/resources/org/springframework/aop/framework/ProxyFactoryBeanTests-inner-bean-target.xml b/spring-context/src/test/resources/org/springframework/aop/framework/ProxyFactoryBeanTests-inner-bean-target.xml index 67345999ad2..9d73fe7899d 100644 --- a/spring-context/src/test/resources/org/springframework/aop/framework/ProxyFactoryBeanTests-inner-bean-target.xml +++ b/spring-context/src/test/resources/org/springframework/aop/framework/ProxyFactoryBeanTests-inner-bean-target.xml @@ -16,7 +16,7 @@ class="org.springframework.aop.framework.ProxyFactoryBean" > - + innerBeanTarget diff --git a/spring-context/src/test/resources/org/springframework/aop/framework/ProxyFactoryBeanTests-invalid.xml b/spring-context/src/test/resources/org/springframework/aop/framework/ProxyFactoryBeanTests-invalid.xml index ed2ba7dc1cb..0224d4c823e 100644 --- a/spring-context/src/test/resources/org/springframework/aop/framework/ProxyFactoryBeanTests-invalid.xml +++ b/spring-context/src/test/resources/org/springframework/aop/framework/ProxyFactoryBeanTests-invalid.xml @@ -5,7 +5,7 @@ - org.springframework.beans.test.fixtures.beans.ITestBean + org.springframework.beans.testfixture.beans.ITestBean @@ -14,7 +14,7 @@ Must have target after *. --> - org.springframework.beans.test.fixtures.beans.ITestBean + org.springframework.beans.testfixture.beans.ITestBean global* diff --git a/spring-context/src/test/resources/org/springframework/aop/framework/ProxyFactoryBeanTests-notlast-targetsource.xml b/spring-context/src/test/resources/org/springframework/aop/framework/ProxyFactoryBeanTests-notlast-targetsource.xml index 3141c7ffc83..88a2d4cc718 100644 --- a/spring-context/src/test/resources/org/springframework/aop/framework/ProxyFactoryBeanTests-notlast-targetsource.xml +++ b/spring-context/src/test/resources/org/springframework/aop/framework/ProxyFactoryBeanTests-notlast-targetsource.xml @@ -9,7 +9,7 @@ - + Adam @@ -23,7 +23,7 @@ --> - org.springframework.beans.test.fixtures.beans.ITestBean + org.springframework.beans.testfixture.beans.ITestBean adam,countingBeforeAdvice diff --git a/spring-context/src/test/resources/org/springframework/aop/framework/ProxyFactoryBeanTests-prototype.xml b/spring-context/src/test/resources/org/springframework/aop/framework/ProxyFactoryBeanTests-prototype.xml index fa09e6b416c..f66cd13a477 100644 --- a/spring-context/src/test/resources/org/springframework/aop/framework/ProxyFactoryBeanTests-prototype.xml +++ b/spring-context/src/test/resources/org/springframework/aop/framework/ProxyFactoryBeanTests-prototype.xml @@ -7,11 +7,11 @@ - + 10 - + 10 diff --git a/spring-context/src/test/resources/org/springframework/aop/framework/ProxyFactoryBeanTests-serialization.xml b/spring-context/src/test/resources/org/springframework/aop/framework/ProxyFactoryBeanTests-serialization.xml index 86933697ba8..b8416580d69 100644 --- a/spring-context/src/test/resources/org/springframework/aop/framework/ProxyFactoryBeanTests-serialization.xml +++ b/spring-context/src/test/resources/org/springframework/aop/framework/ProxyFactoryBeanTests-serialization.xml @@ -12,28 +12,28 @@ serializableNopInterceptor - org.springframework.beans.test.fixtures.beans.Person + org.springframework.beans.testfixture.beans.Person - + serializableSingleton - + serializablePrototype serializableNopInterceptor,prototypeTarget - org.springframework.beans.test.fixtures.beans.Person + org.springframework.beans.testfixture.beans.Person false nopInterceptor - + diff --git a/spring-context/src/test/resources/org/springframework/aop/framework/ProxyFactoryBeanTests-targetsource.xml b/spring-context/src/test/resources/org/springframework/aop/framework/ProxyFactoryBeanTests-targetsource.xml index e4df8653c77..46fb7b112d3 100644 --- a/spring-context/src/test/resources/org/springframework/aop/framework/ProxyFactoryBeanTests-targetsource.xml +++ b/spring-context/src/test/resources/org/springframework/aop/framework/ProxyFactoryBeanTests-targetsource.xml @@ -8,7 +8,7 @@ - + Adam @@ -49,7 +49,7 @@ --> - org.springframework.beans.test.fixtures.beans.ITestBean + org.springframework.beans.testfixture.beans.ITestBean nopInterceptor,unsupportedInterceptor diff --git a/spring-context/src/test/resources/org/springframework/aop/framework/adapter/AdvisorAdapterRegistrationTests-with-bpp.xml b/spring-context/src/test/resources/org/springframework/aop/framework/adapter/AdvisorAdapterRegistrationTests-with-bpp.xml index 7d66aec5847..358f8303563 100644 --- a/spring-context/src/test/resources/org/springframework/aop/framework/adapter/AdvisorAdapterRegistrationTests-with-bpp.xml +++ b/spring-context/src/test/resources/org/springframework/aop/framework/adapter/AdvisorAdapterRegistrationTests-with-bpp.xml @@ -3,7 +3,7 @@ - + @@ -12,7 +12,7 @@ - org.springframework.beans.test.fixtures.beans.ITestBean + org.springframework.beans.testfixture.beans.ITestBean simpleBeforeAdviceAdvisor,testBeanTarget diff --git a/spring-context/src/test/resources/org/springframework/aop/framework/adapter/AdvisorAdapterRegistrationTests-without-bpp.xml b/spring-context/src/test/resources/org/springframework/aop/framework/adapter/AdvisorAdapterRegistrationTests-without-bpp.xml index a6b51baf38b..418c8955cb2 100644 --- a/spring-context/src/test/resources/org/springframework/aop/framework/adapter/AdvisorAdapterRegistrationTests-without-bpp.xml +++ b/spring-context/src/test/resources/org/springframework/aop/framework/adapter/AdvisorAdapterRegistrationTests-without-bpp.xml @@ -3,7 +3,7 @@ - + @@ -12,7 +12,7 @@ - org.springframework.beans.test.fixtures.beans.ITestBean + org.springframework.beans.testfixture.beans.ITestBean simpleBeforeAdviceAdvisor,testBeanTarget diff --git a/spring-context/src/test/resources/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorTests-common-interceptors.xml b/spring-context/src/test/resources/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorTests-common-interceptors.xml index 2a06a46d7d2..b5db44fbac4 100644 --- a/spring-context/src/test/resources/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorTests-common-interceptors.xml +++ b/spring-context/src/test/resources/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorTests-common-interceptors.xml @@ -33,11 +33,11 @@ - + - + diff --git a/spring-context/src/test/resources/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorTests-custom-targetsource.xml b/spring-context/src/test/resources/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorTests-custom-targetsource.xml index ddabde322af..a596c404ef4 100644 --- a/spring-context/src/test/resources/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorTests-custom-targetsource.xml +++ b/spring-context/src/test/resources/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorTests-custom-targetsource.xml @@ -12,22 +12,22 @@ - + Rod - + Rod - + Rod - + Kerry diff --git a/spring-context/src/test/resources/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorTests-optimized.xml b/spring-context/src/test/resources/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorTests-optimized.xml index 8c2df4bcb02..20adb97333c 100644 --- a/spring-context/src/test/resources/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorTests-optimized.xml +++ b/spring-context/src/test/resources/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorTests-optimized.xml @@ -3,7 +3,7 @@ - + diff --git a/spring-context/src/test/resources/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorTests-quick-targetsource.xml b/spring-context/src/test/resources/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorTests-quick-targetsource.xml index 8294fff16be..6b34f797528 100644 --- a/spring-context/src/test/resources/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorTests-quick-targetsource.xml +++ b/spring-context/src/test/resources/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorTests-quick-targetsource.xml @@ -14,29 +14,29 @@ - + Rod - + Kerry - + Rod - + Rod - + Rod diff --git a/spring-context/src/test/resources/org/springframework/aop/framework/autoproxy/BeanNameAutoProxyCreatorInitTests-context.xml b/spring-context/src/test/resources/org/springframework/aop/framework/autoproxy/BeanNameAutoProxyCreatorInitTests-context.xml index c5a497646f0..f6d20969867 100644 --- a/spring-context/src/test/resources/org/springframework/aop/framework/autoproxy/BeanNameAutoProxyCreatorInitTests-context.xml +++ b/spring-context/src/test/resources/org/springframework/aop/framework/autoproxy/BeanNameAutoProxyCreatorInitTests-context.xml @@ -24,6 +24,6 @@ - + diff --git a/spring-context/src/test/resources/org/springframework/aop/framework/autoproxy/BeanNameAutoProxyCreatorTests-context.xml b/spring-context/src/test/resources/org/springframework/aop/framework/autoproxy/BeanNameAutoProxyCreatorTests-context.xml index 9b9c9bd2e9e..3a228ff01db 100644 --- a/spring-context/src/test/resources/org/springframework/aop/framework/autoproxy/BeanNameAutoProxyCreatorTests-context.xml +++ b/spring-context/src/test/resources/org/springframework/aop/framework/autoproxy/BeanNameAutoProxyCreatorTests-context.xml @@ -73,11 +73,11 @@ - + introductionUsingJdk - + second-introductionUsingJdk @@ -88,29 +88,29 @@ lazy-init="true"> - + jdk1 - + - + cglib1 - + onlyJdk - + doubleJdk - + noproxy diff --git a/spring-context/src/test/resources/org/springframework/aop/scope/ScopedProxyTests-list.xml b/spring-context/src/test/resources/org/springframework/aop/scope/ScopedProxyTests-list.xml index 72c913aad66..011fad243ad 100644 --- a/spring-context/src/test/resources/org/springframework/aop/scope/ScopedProxyTests-list.xml +++ b/spring-context/src/test/resources/org/springframework/aop/scope/ScopedProxyTests-list.xml @@ -9,7 +9,7 @@ - + diff --git a/spring-context/src/test/resources/org/springframework/aop/scope/ScopedProxyTests-override.xml b/spring-context/src/test/resources/org/springframework/aop/scope/ScopedProxyTests-override.xml index ac7df01af81..26892681e27 100644 --- a/spring-context/src/test/resources/org/springframework/aop/scope/ScopedProxyTests-override.xml +++ b/spring-context/src/test/resources/org/springframework/aop/scope/ScopedProxyTests-override.xml @@ -5,7 +5,7 @@ xsi:schemaLocation="http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans-2.5.xsd http://www.springframework.org/schema/aop https://www.springframework.org/schema/aop/spring-aop-2.5.xsd"> - + diff --git a/spring-context/src/test/resources/org/springframework/aop/scope/ScopedProxyTests-testbean.xml b/spring-context/src/test/resources/org/springframework/aop/scope/ScopedProxyTests-testbean.xml index c580a34580b..62e23b517ac 100644 --- a/spring-context/src/test/resources/org/springframework/aop/scope/ScopedProxyTests-testbean.xml +++ b/spring-context/src/test/resources/org/springframework/aop/scope/ScopedProxyTests-testbean.xml @@ -3,7 +3,7 @@ - + diff --git a/spring-context/src/test/resources/org/springframework/aop/target/CommonsPool2TargetSourceTests-context.xml b/spring-context/src/test/resources/org/springframework/aop/target/CommonsPool2TargetSourceTests-context.xml index 95922d4e033..f83897a3f0b 100644 --- a/spring-context/src/test/resources/org/springframework/aop/target/CommonsPool2TargetSourceTests-context.xml +++ b/spring-context/src/test/resources/org/springframework/aop/target/CommonsPool2TargetSourceTests-context.xml @@ -3,7 +3,7 @@ - + 10 @@ -42,7 +42,7 @@ - + prototypePerson diff --git a/spring-context/src/test/resources/org/springframework/beans/factory/xml/LookupMethodWrappedByCglibProxyTests-context.xml b/spring-context/src/test/resources/org/springframework/beans/factory/xml/LookupMethodWrappedByCglibProxyTests-context.xml index 2d780083d69..9f753da0b55 100644 --- a/spring-context/src/test/resources/org/springframework/beans/factory/xml/LookupMethodWrappedByCglibProxyTests-context.xml +++ b/spring-context/src/test/resources/org/springframework/beans/factory/xml/LookupMethodWrappedByCglibProxyTests-context.xml @@ -22,7 +22,7 @@ interceptor - + Jenny 30 diff --git a/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-autowire.xml b/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-autowire.xml index 27c17dbce59..54c25f542b9 100644 --- a/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-autowire.xml +++ b/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-autowire.xml @@ -3,19 +3,19 @@ - + - + - + - + @@ -31,12 +31,12 @@ - - + diff --git a/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-child.xml b/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-child.xml index 2010652c046..e2e43b3f6e9 100644 --- a/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-child.xml +++ b/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-child.xml @@ -8,13 +8,13 @@ - override - override @@ -42,7 +42,7 @@ - + myname diff --git a/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-collections.xml b/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-collections.xml index 468e027e5e6..c1af44a6e7d 100644 --- a/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-collections.xml +++ b/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-collections.xml @@ -3,7 +3,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans-2.5.xsd"> - + Jenny 30 @@ -12,7 +12,7 @@ - + Simple bean, without any collections. @@ -23,7 +23,7 @@ 27 - + Rod 32 @@ -35,7 +35,7 @@ - + Jenny 30 @@ -44,12 +44,12 @@ - + David 27 - + Rod 32 @@ -63,7 +63,7 @@ - + loner 26 @@ -97,26 +97,26 @@ - + verbose - + - + - + - + @@ -126,7 +126,7 @@ - + @@ -158,7 +158,7 @@ - + @@ -167,7 +167,7 @@ - + @@ -199,7 +199,7 @@ - + @@ -207,7 +207,7 @@ - + bar @@ -217,7 +217,7 @@ - + @@ -225,7 +225,7 @@ - + bar @@ -234,7 +234,7 @@ - + @@ -243,7 +243,7 @@ - + one @@ -252,7 +252,7 @@ - + java.lang.String @@ -261,7 +261,7 @@ - + 0 diff --git a/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-complexFactoryCircle.xml b/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-complexFactoryCircle.xml index 5b2b7da536d..b5ad92e9ac0 100644 --- a/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-complexFactoryCircle.xml +++ b/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-complexFactoryCircle.xml @@ -11,16 +11,16 @@ - + - + - + - + diff --git a/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-constructorArg.xml b/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-constructorArg.xml index f9b1f979dbc..099305bddd7 100644 --- a/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-constructorArg.xml +++ b/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-constructorArg.xml @@ -13,7 +13,7 @@ - + @@ -117,7 +117,7 @@ - + Kerry1 @@ -126,7 +126,7 @@ - + Kerry2 @@ -135,7 +135,7 @@ - + /test @@ -187,13 +187,13 @@ - + - + diff --git a/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-constructorOverrides.xml b/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-constructorOverrides.xml index 7fcdaa785e8..0c2fc310727 100644 --- a/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-constructorOverrides.xml +++ b/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-constructorOverrides.xml @@ -18,7 +18,7 @@ - Jenny 30 diff --git a/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-defaultAutowire.xml b/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-defaultAutowire.xml index 10357e8ae7c..778369a127a 100644 --- a/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-defaultAutowire.xml +++ b/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-defaultAutowire.xml @@ -3,19 +3,19 @@ - + - + - + - + Kerry diff --git a/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-defaultLazyInit.xml b/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-defaultLazyInit.xml index eccba590a25..8266a050aaa 100644 --- a/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-defaultLazyInit.xml +++ b/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-defaultLazyInit.xml @@ -15,6 +15,6 @@ destroy-method="customDestroy" /> - + diff --git a/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-delegationOverrides.xml b/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-delegationOverrides.xml index f5a896a8a39..175408a2cb3 100644 --- a/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-delegationOverrides.xml +++ b/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-delegationOverrides.xml @@ -58,7 +58,7 @@ - Jenny 30 @@ -68,7 +68,7 @@ - Simple bean, without any collections. diff --git a/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-factoryCircle.xml b/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-factoryCircle.xml index d7b39e4d757..77fab13244e 100644 --- a/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-factoryCircle.xml +++ b/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-factoryCircle.xml @@ -3,7 +3,7 @@ - + diff --git a/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-initializers.xml b/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-initializers.xml index b082cb757d6..3c3bc613c69 100644 --- a/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-initializers.xml +++ b/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-initializers.xml @@ -11,7 +11,7 @@ - - + Jenny 30 diff --git a/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-invalidOverridesNoSuchMethod.xml b/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-invalidOverridesNoSuchMethod.xml index d4940de54e8..e88d1667d3c 100644 --- a/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-invalidOverridesNoSuchMethod.xml +++ b/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-invalidOverridesNoSuchMethod.xml @@ -11,7 +11,7 @@ - + Jenny 30 diff --git a/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-localCollectionsUsingXsd.xml b/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-localCollectionsUsingXsd.xml index e34567d283d..51a9be97732 100644 --- a/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-localCollectionsUsingXsd.xml +++ b/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-localCollectionsUsingXsd.xml @@ -12,7 +12,7 @@ - + diff --git a/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-overrides.xml b/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-overrides.xml index 96decab1c68..210538136b7 100644 --- a/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-overrides.xml +++ b/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-overrides.xml @@ -35,32 +35,32 @@ - + Jenny 30 - + - + Jenny 30 - + - + - + Simple bean, without any collections. @@ -71,12 +71,12 @@ 27 - + - + diff --git a/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-parent.xml b/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-parent.xml index 7b4a0a00d72..3f6f14fff2f 100644 --- a/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-parent.xml +++ b/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-parent.xml @@ -3,7 +3,7 @@ - + parent 1 @@ -13,11 +13,11 @@ 1 - + parent 2 - + diff --git a/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-reftypes.xml b/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-reftypes.xml index 9497d262266..d2933467d64 100644 --- a/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-reftypes.xml +++ b/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-reftypes.xml @@ -1,121 +1,121 @@ - + Jenny 30 - + - + - + - + - + - + - + - + Andrew 36 - + - + Georgia 33 - + - + - + - + - + - + - + - + - + - + outer 0 - + hasInner 5 - + inner1 6 - + inner2 7 - - + + inner5 6 @@ -124,7 +124,7 @@ - + inner3 8 @@ -139,41 +139,41 @@ - + - + inner1 6 - + - + inner1 6 - + hasInner 5 - + inner1 6 - + inner2 7 - - + + inner5 6 @@ -181,11 +181,11 @@ - + - + inner3 8 @@ -201,9 +201,9 @@ - + - + inner1 6 diff --git a/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-testWithDuplicateNameInAlias.xml b/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-testWithDuplicateNameInAlias.xml index 843f46bf064..333f448615c 100644 --- a/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-testWithDuplicateNameInAlias.xml +++ b/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-testWithDuplicateNameInAlias.xml @@ -3,8 +3,8 @@ - + - + diff --git a/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-testWithDuplicateNames.xml b/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-testWithDuplicateNames.xml index 996faed7f3a..84f4ca25f50 100644 --- a/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-testWithDuplicateNames.xml +++ b/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-testWithDuplicateNames.xml @@ -3,8 +3,8 @@ - + - + diff --git a/spring-context/src/test/resources/org/springframework/beans/factory/xml/simplePropertyNamespaceHandlerWithExpressionLanguageTests.xml b/spring-context/src/test/resources/org/springframework/beans/factory/xml/simplePropertyNamespaceHandlerWithExpressionLanguageTests.xml index 081c8b20f89..fcb71786431 100644 --- a/spring-context/src/test/resources/org/springframework/beans/factory/xml/simplePropertyNamespaceHandlerWithExpressionLanguageTests.xml +++ b/spring-context/src/test/resources/org/springframework/beans/factory/xml/simplePropertyNamespaceHandlerWithExpressionLanguageTests.xml @@ -4,8 +4,8 @@ xmlns:p="http://www.springframework.org/schema/p" xsi:schemaLocation="http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd"> - + - + diff --git a/spring-context/src/test/resources/org/springframework/beans/factory/xml/support/CustomNamespaceHandlerTests-context.xml b/spring-context/src/test/resources/org/springframework/beans/factory/xml/support/CustomNamespaceHandlerTests-context.xml index eccc3bfd0ef..8962b3661de 100644 --- a/spring-context/src/test/resources/org/springframework/beans/factory/xml/support/CustomNamespaceHandlerTests-context.xml +++ b/spring-context/src/test/resources/org/springframework/beans/factory/xml/support/CustomNamespaceHandlerTests-context.xml @@ -10,11 +10,11 @@ - + - + @@ -24,14 +24,14 @@ - + - + diff --git a/spring-context/src/test/resources/org/springframework/context/access/ContextJndiBeanFactoryLocatorTests-collections.xml b/spring-context/src/test/resources/org/springframework/context/access/ContextJndiBeanFactoryLocatorTests-collections.xml index 7077cad2d41..7430fc40338 100644 --- a/spring-context/src/test/resources/org/springframework/context/access/ContextJndiBeanFactoryLocatorTests-collections.xml +++ b/spring-context/src/test/resources/org/springframework/context/access/ContextJndiBeanFactoryLocatorTests-collections.xml @@ -3,7 +3,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans-2.5.xsd"> - + Jenny 30 @@ -12,7 +12,7 @@ - + Simple bean, without any collections. @@ -23,7 +23,7 @@ 27 - + Rod 32 @@ -35,7 +35,7 @@ - + Jenny 30 @@ -44,12 +44,12 @@ - + David 27 - + Rod 32 @@ -63,7 +63,7 @@ - + loner 26 @@ -97,26 +97,26 @@ - + verbose - + - + - + - + @@ -126,7 +126,7 @@ - + @@ -158,7 +158,7 @@ - + @@ -167,7 +167,7 @@ - + @@ -199,7 +199,7 @@ - + @@ -207,7 +207,7 @@ - + bar @@ -217,7 +217,7 @@ - + @@ -225,7 +225,7 @@ - + bar @@ -234,7 +234,7 @@ - + @@ -243,7 +243,7 @@ - + one @@ -252,7 +252,7 @@ - + java.lang.String @@ -261,7 +261,7 @@ - + 0 diff --git a/spring-context/src/test/resources/org/springframework/context/access/ContextJndiBeanFactoryLocatorTests-parent.xml b/spring-context/src/test/resources/org/springframework/context/access/ContextJndiBeanFactoryLocatorTests-parent.xml index 5fc26275c13..83fc1bc7d49 100644 --- a/spring-context/src/test/resources/org/springframework/context/access/ContextJndiBeanFactoryLocatorTests-parent.xml +++ b/spring-context/src/test/resources/org/springframework/context/access/ContextJndiBeanFactoryLocatorTests-parent.xml @@ -3,7 +3,7 @@ - + parent 1 @@ -13,11 +13,11 @@ 1 - + parent 2 - + diff --git a/spring-context/src/test/resources/org/springframework/context/annotation/configuration/ImportNonXmlResourceConfig-context.properties b/spring-context/src/test/resources/org/springframework/context/annotation/configuration/ImportNonXmlResourceConfig-context.properties index 3184784ef56..6c65636918c 100644 --- a/spring-context/src/test/resources/org/springframework/context/annotation/configuration/ImportNonXmlResourceConfig-context.properties +++ b/spring-context/src/test/resources/org/springframework/context/annotation/configuration/ImportNonXmlResourceConfig-context.properties @@ -1 +1 @@ -propertiesDeclaredBean.(class)=org.springframework.beans.test.fixtures.beans.TestBean \ No newline at end of file +propertiesDeclaredBean.(class)=org.springframework.beans.testfixture.beans.TestBean \ No newline at end of file diff --git a/spring-context/src/test/resources/org/springframework/context/annotation/configuration/ImportXmlConfig-context.xml b/spring-context/src/test/resources/org/springframework/context/annotation/configuration/ImportXmlConfig-context.xml index 1fcb8662b2b..015651eeb7f 100644 --- a/spring-context/src/test/resources/org/springframework/context/annotation/configuration/ImportXmlConfig-context.xml +++ b/spring-context/src/test/resources/org/springframework/context/annotation/configuration/ImportXmlConfig-context.xml @@ -3,7 +3,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd"> - + diff --git a/spring-context/src/test/resources/org/springframework/context/annotation/configuration/ImportXmlWithAopNamespace-context.xml b/spring-context/src/test/resources/org/springframework/context/annotation/configuration/ImportXmlWithAopNamespace-context.xml index d81a474dd28..85d3501181c 100644 --- a/spring-context/src/test/resources/org/springframework/context/annotation/configuration/ImportXmlWithAopNamespace-context.xml +++ b/spring-context/src/test/resources/org/springframework/context/annotation/configuration/ImportXmlWithAopNamespace-context.xml @@ -5,7 +5,7 @@ xsi:schemaLocation="http://www.springframework.org/schema/aop https://www.springframework.org/schema/aop/spring-aop.xsd http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd"> - + diff --git a/spring-context/src/test/resources/org/springframework/context/support/simpleThreadScopeTests.xml b/spring-context/src/test/resources/org/springframework/context/support/simpleThreadScopeTests.xml index 62d21b908f9..a8200730794 100644 --- a/spring-context/src/test/resources/org/springframework/context/support/simpleThreadScopeTests.xml +++ b/spring-context/src/test/resources/org/springframework/context/support/simpleThreadScopeTests.xml @@ -14,34 +14,34 @@ - + + business-interface="org.springframework.beans.testfixture.beans.ITestBean"/> @@ -54,15 +54,15 @@ + business-interface="org.springframework.beans.testfixture.beans.ITestBean"/> foo=bar @@ -71,8 +71,8 @@ + business-interface="org.springframework.beans.testfixture.beans.ITestBean" lazy-init="true" /> + business-interface="org.springframework.beans.testfixture.beans.ITestBean" lazy-init="true" /> diff --git a/spring-context/src/test/resources/org/springframework/scripting/bsh/MessengerImpl.bsh b/spring-context/src/test/resources/org/springframework/scripting/bsh/MessengerImpl.bsh index 7129a63d544..2878b713b55 100644 --- a/spring-context/src/test/resources/org/springframework/scripting/bsh/MessengerImpl.bsh +++ b/spring-context/src/test/resources/org/springframework/scripting/bsh/MessengerImpl.bsh @@ -1,4 +1,4 @@ -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.scripting.TestBeanAwareMessenger; public class MyMessenger implements TestBeanAwareMessenger { diff --git a/spring-context/src/test/resources/org/springframework/scripting/bsh/bsh-with-xsd.xml b/spring-context/src/test/resources/org/springframework/scripting/bsh/bsh-with-xsd.xml index 5c45b921de8..44311c2c14d 100644 --- a/spring-context/src/test/resources/org/springframework/scripting/bsh/bsh-with-xsd.xml +++ b/spring-context/src/test/resources/org/springframework/scripting/bsh/bsh-with-xsd.xml @@ -35,7 +35,7 @@ autowire="byName" init-method="init" destroy-method="destroy"> - + diff --git a/spring-context/src/test/resources/org/springframework/scripting/groovy/ScriptBean.groovy b/spring-context/src/test/resources/org/springframework/scripting/groovy/ScriptBean.groovy index d65f08fe37b..a3d64aa0f31 100644 --- a/spring-context/src/test/resources/org/springframework/scripting/groovy/ScriptBean.groovy +++ b/spring-context/src/test/resources/org/springframework/scripting/groovy/ScriptBean.groovy @@ -1,6 +1,6 @@ package org.springframework.scripting.groovy; -import org.springframework.beans.test.fixtures.beans.TestBean +import org.springframework.beans.testfixture.beans.TestBean import org.springframework.context.ApplicationContext import org.springframework.context.ApplicationContextAware import org.springframework.scripting.ContextScriptBean diff --git a/spring-context/src/test/resources/org/springframework/scripting/groovy/groovy-multiple-properties.xml b/spring-context/src/test/resources/org/springframework/scripting/groovy/groovy-multiple-properties.xml index 26760d2997e..4f663dd3e35 100644 --- a/spring-context/src/test/resources/org/springframework/scripting/groovy/groovy-multiple-properties.xml +++ b/spring-context/src/test/resources/org/springframework/scripting/groovy/groovy-multiple-properties.xml @@ -19,6 +19,6 @@ - + diff --git a/spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/AbstractApplicationContextTests.java b/spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/AbstractApplicationContextTests.java index dd7baafac3c..929c804943b 100644 --- a/spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/AbstractApplicationContextTests.java +++ b/spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/AbstractApplicationContextTests.java @@ -26,9 +26,9 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.BeanFactory; -import org.springframework.beans.test.fixtures.beans.LifecycleBean; -import org.springframework.beans.test.fixtures.beans.TestBean; -import org.springframework.beans.test.fixtures.factory.xml.AbstractListableBeanFactoryTests; +import org.springframework.beans.testfixture.beans.LifecycleBean; +import org.springframework.beans.testfixture.beans.TestBean; +import org.springframework.beans.testfixture.factory.xml.AbstractListableBeanFactoryTests; import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationEvent; import org.springframework.context.ConfigurableApplicationContext; diff --git a/spring-jdbc/src/test/java/org/springframework/jdbc/core/RowMapperTests.java b/spring-jdbc/src/test/java/org/springframework/jdbc/core/RowMapperTests.java index 2031d4acf8b..dd849029b9d 100644 --- a/spring-jdbc/src/test/java/org/springframework/jdbc/core/RowMapperTests.java +++ b/spring-jdbc/src/test/java/org/springframework/jdbc/core/RowMapperTests.java @@ -28,7 +28,7 @@ import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.jdbc.datasource.SingleConnectionDataSource; import org.springframework.jdbc.support.SQLStateSQLExceptionTranslator; diff --git a/spring-jdbc/src/test/java/org/springframework/jdbc/core/namedparam/BeanPropertySqlParameterSourceTests.java b/spring-jdbc/src/test/java/org/springframework/jdbc/core/namedparam/BeanPropertySqlParameterSourceTests.java index b95761476f6..7abd2fc56a8 100644 --- a/spring-jdbc/src/test/java/org/springframework/jdbc/core/namedparam/BeanPropertySqlParameterSourceTests.java +++ b/spring-jdbc/src/test/java/org/springframework/jdbc/core/namedparam/BeanPropertySqlParameterSourceTests.java @@ -21,7 +21,7 @@ import java.util.Arrays; import org.junit.jupiter.api.Test; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException; diff --git a/spring-jdbc/src/test/java/org/springframework/jdbc/core/support/JdbcBeanDefinitionReaderTests.java b/spring-jdbc/src/test/java/org/springframework/jdbc/core/support/JdbcBeanDefinitionReaderTests.java index da965268347..36ecd71bc49 100644 --- a/spring-jdbc/src/test/java/org/springframework/jdbc/core/support/JdbcBeanDefinitionReaderTests.java +++ b/spring-jdbc/src/test/java/org/springframework/jdbc/core/support/JdbcBeanDefinitionReaderTests.java @@ -25,7 +25,7 @@ import javax.sql.DataSource; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.support.DefaultListableBeanFactory; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.BDDMockito.given; @@ -49,7 +49,7 @@ public class JdbcBeanDefinitionReaderTests { given(resultSet.next()).willReturn(true, true, false); given(resultSet.getString(1)).willReturn("one", "one"); given(resultSet.getString(2)).willReturn("(class)", "age"); - given(resultSet.getString(3)).willReturn("org.springframework.beans.test.fixtures.beans.TestBean", "53"); + given(resultSet.getString(3)).willReturn("org.springframework.beans.testfixture.beans.TestBean", "53"); Statement statement = mock(Statement.class); given(statement.executeQuery(sql)).willReturn(resultSet); diff --git a/spring-jms/src/test/java/org/springframework/jms/config/JmsNamespaceHandlerTests.java b/spring-jms/src/test/java/org/springframework/jms/config/JmsNamespaceHandlerTests.java index 86920c2c52b..ec5d566222f 100644 --- a/spring-jms/src/test/java/org/springframework/jms/config/JmsNamespaceHandlerTests.java +++ b/spring-jms/src/test/java/org/springframework/jms/config/JmsNamespaceHandlerTests.java @@ -38,7 +38,7 @@ import org.springframework.beans.factory.parsing.EmptyReaderEventListener; import org.springframework.beans.factory.parsing.PassThroughSourceExtractor; import org.springframework.beans.factory.parsing.ReaderEventListener; import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.context.Phased; import org.springframework.context.support.ClassPathXmlApplicationContext; import org.springframework.jca.endpoint.GenericMessageEndpointManager; diff --git a/spring-jms/src/test/java/org/springframework/jms/remoting/JmsInvokerTests.java b/spring-jms/src/test/java/org/springframework/jms/remoting/JmsInvokerTests.java index e85f771cb89..49ce0eeb6b9 100644 --- a/spring-jms/src/test/java/org/springframework/jms/remoting/JmsInvokerTests.java +++ b/spring-jms/src/test/java/org/springframework/jms/remoting/JmsInvokerTests.java @@ -35,8 +35,8 @@ import javax.jms.Session; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; -import org.springframework.beans.test.fixtures.beans.ITestBean; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.ITestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.jms.support.converter.MessageConversionException; import org.springframework.jms.support.converter.SimpleMessageConverter; import org.springframework.remoting.RemoteTimeoutException; diff --git a/spring-jms/src/test/resources/org/springframework/jms/config/jmsNamespaceHandlerTests.xml b/spring-jms/src/test/resources/org/springframework/jms/config/jmsNamespaceHandlerTests.xml index 79711ceb07f..46d15b9eef5 100644 --- a/spring-jms/src/test/resources/org/springframework/jms/config/jmsNamespaceHandlerTests.xml +++ b/spring-jms/src/test/resources/org/springframework/jms/config/jmsNamespaceHandlerTests.xml @@ -76,9 +76,9 @@ - + - + diff --git a/spring-orm/src/test/java/org/springframework/orm/jpa/domain/Person.java b/spring-orm/src/test/java/org/springframework/orm/jpa/domain/Person.java index df2e48fdc10..1586a2c2501 100644 --- a/spring-orm/src/test/java/org/springframework/orm/jpa/domain/Person.java +++ b/spring-orm/src/test/java/org/springframework/orm/jpa/domain/Person.java @@ -27,7 +27,7 @@ import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.OneToOne; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.context.ApplicationContext; /** diff --git a/spring-orm/src/test/resources/org/springframework/orm/jpa/domain/persistence-multi.xml b/spring-orm/src/test/resources/org/springframework/orm/jpa/domain/persistence-multi.xml index 082a1b1932a..7a78f215ab2 100644 --- a/spring-orm/src/test/resources/org/springframework/orm/jpa/domain/persistence-multi.xml +++ b/spring-orm/src/test/resources/org/springframework/orm/jpa/domain/persistence-multi.xml @@ -9,7 +9,7 @@ - org.springframework.beans.test.fixtures.beans.TestBean + org.springframework.beans.testfixture.beans.TestBean diff --git a/spring-test/src/test/java/org/springframework/test/context/configuration/ContextConfigurationWithPropertiesExtendingPropertiesAndInheritedLoaderTests.java b/spring-test/src/test/java/org/springframework/test/context/configuration/ContextConfigurationWithPropertiesExtendingPropertiesAndInheritedLoaderTests.java index 793ae833f22..3f61e2daec6 100644 --- a/spring-test/src/test/java/org/springframework/test/context/configuration/ContextConfigurationWithPropertiesExtendingPropertiesAndInheritedLoaderTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/configuration/ContextConfigurationWithPropertiesExtendingPropertiesAndInheritedLoaderTests.java @@ -19,7 +19,7 @@ package org.springframework.test.context.configuration; import org.junit.Test; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.test.fixtures.beans.Pet; +import org.springframework.beans.testfixture.beans.Pet; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.ContextLoader; import org.springframework.test.context.junit4.PropertiesBasedSpringJUnit4ClassRunnerAppCtxTests; diff --git a/spring-test/src/test/java/org/springframework/test/context/configuration/ContextConfigurationWithPropertiesExtendingPropertiesTests.java b/spring-test/src/test/java/org/springframework/test/context/configuration/ContextConfigurationWithPropertiesExtendingPropertiesTests.java index 8faf721a1df..1e6dd9f3abc 100644 --- a/spring-test/src/test/java/org/springframework/test/context/configuration/ContextConfigurationWithPropertiesExtendingPropertiesTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/configuration/ContextConfigurationWithPropertiesExtendingPropertiesTests.java @@ -19,7 +19,7 @@ package org.springframework.test.context.configuration; import org.junit.Test; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.test.fixtures.beans.Pet; +import org.springframework.beans.testfixture.beans.Pet; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.ContextLoader; import org.springframework.test.context.junit4.PropertiesBasedSpringJUnit4ClassRunnerAppCtxTests; diff --git a/spring-test/src/test/java/org/springframework/test/context/configuration/interfaces/ActiveProfilesInterfaceTests.java b/spring-test/src/test/java/org/springframework/test/context/configuration/interfaces/ActiveProfilesInterfaceTests.java index e12e08f6215..cd825484f76 100644 --- a/spring-test/src/test/java/org/springframework/test/context/configuration/interfaces/ActiveProfilesInterfaceTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/configuration/interfaces/ActiveProfilesInterfaceTests.java @@ -20,7 +20,7 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.test.fixtures.beans.Employee; +import org.springframework.beans.testfixture.beans.Employee; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Profile; diff --git a/spring-test/src/test/java/org/springframework/test/context/configuration/interfaces/ContextConfigurationInterfaceTests.java b/spring-test/src/test/java/org/springframework/test/context/configuration/interfaces/ContextConfigurationInterfaceTests.java index f1fdd2530d2..fc8b8c9353e 100644 --- a/spring-test/src/test/java/org/springframework/test/context/configuration/interfaces/ContextConfigurationInterfaceTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/configuration/interfaces/ContextConfigurationInterfaceTests.java @@ -20,7 +20,7 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.test.fixtures.beans.Employee; +import org.springframework.beans.testfixture.beans.Employee; import org.springframework.test.context.junit.jupiter.SpringExtension; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-test/src/test/java/org/springframework/test/context/configuration/interfaces/ContextConfigurationTestInterface.java b/spring-test/src/test/java/org/springframework/test/context/configuration/interfaces/ContextConfigurationTestInterface.java index 2032969f925..8ef86beafa2 100644 --- a/spring-test/src/test/java/org/springframework/test/context/configuration/interfaces/ContextConfigurationTestInterface.java +++ b/spring-test/src/test/java/org/springframework/test/context/configuration/interfaces/ContextConfigurationTestInterface.java @@ -16,7 +16,7 @@ package org.springframework.test.context.configuration.interfaces; -import org.springframework.beans.test.fixtures.beans.Employee; +import org.springframework.beans.testfixture.beans.Employee; import org.springframework.context.annotation.Bean; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.configuration.interfaces.ContextConfigurationTestInterface.Config; diff --git a/spring-test/src/test/java/org/springframework/test/context/groovy/DefaultScriptDetectionGroovySpringContextTests.java b/spring-test/src/test/java/org/springframework/test/context/groovy/DefaultScriptDetectionGroovySpringContextTests.java index ad183ac27b9..a4752ecfc9b 100644 --- a/spring-test/src/test/java/org/springframework/test/context/groovy/DefaultScriptDetectionGroovySpringContextTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/groovy/DefaultScriptDetectionGroovySpringContextTests.java @@ -19,8 +19,8 @@ package org.springframework.test.context.groovy; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.test.fixtures.beans.Employee; -import org.springframework.beans.test.fixtures.beans.Pet; +import org.springframework.beans.testfixture.beans.Employee; +import org.springframework.beans.testfixture.beans.Pet; import org.springframework.test.context.junit.jupiter.SpringJUnitConfig; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-test/src/test/java/org/springframework/test/context/groovy/GroovyControlGroupTests.java b/spring-test/src/test/java/org/springframework/test/context/groovy/GroovyControlGroupTests.java index 62bc6b646bb..aa713d62c59 100644 --- a/spring-test/src/test/java/org/springframework/test/context/groovy/GroovyControlGroupTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/groovy/GroovyControlGroupTests.java @@ -18,8 +18,8 @@ package org.springframework.test.context.groovy; import org.junit.jupiter.api.Test; -import org.springframework.beans.test.fixtures.beans.Employee; -import org.springframework.beans.test.fixtures.beans.Pet; +import org.springframework.beans.testfixture.beans.Employee; +import org.springframework.beans.testfixture.beans.Pet; import org.springframework.context.ApplicationContext; import org.springframework.context.support.GenericGroovyApplicationContext; diff --git a/spring-test/src/test/java/org/springframework/test/context/groovy/GroovySpringContextTests.java b/spring-test/src/test/java/org/springframework/test/context/groovy/GroovySpringContextTests.java index 69b6398b51a..ae020512502 100644 --- a/spring-test/src/test/java/org/springframework/test/context/groovy/GroovySpringContextTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/groovy/GroovySpringContextTests.java @@ -24,8 +24,8 @@ import org.junit.jupiter.api.extension.ExtendWith; import org.springframework.beans.factory.BeanNameAware; import org.springframework.beans.factory.InitializingBean; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.test.fixtures.beans.Employee; -import org.springframework.beans.test.fixtures.beans.Pet; +import org.springframework.beans.testfixture.beans.Employee; +import org.springframework.beans.testfixture.beans.Pet; import org.springframework.context.ApplicationContext; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit.jupiter.SpringExtension; diff --git a/spring-test/src/test/java/org/springframework/test/context/groovy/MixedXmlAndGroovySpringContextTests.java b/spring-test/src/test/java/org/springframework/test/context/groovy/MixedXmlAndGroovySpringContextTests.java index a6f9da71748..9acb59688d3 100644 --- a/spring-test/src/test/java/org/springframework/test/context/groovy/MixedXmlAndGroovySpringContextTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/groovy/MixedXmlAndGroovySpringContextTests.java @@ -20,8 +20,8 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.test.fixtures.beans.Employee; -import org.springframework.beans.test.fixtures.beans.Pet; +import org.springframework.beans.testfixture.beans.Employee; +import org.springframework.beans.testfixture.beans.Pet; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit.jupiter.SpringExtension; diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/ConcreteTransactionalJUnit4SpringContextTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/ConcreteTransactionalJUnit4SpringContextTests.java index 1c0a5ebec49..5112f3770d3 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/ConcreteTransactionalJUnit4SpringContextTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/ConcreteTransactionalJUnit4SpringContextTests.java @@ -25,8 +25,8 @@ import org.junit.Test; import org.springframework.beans.factory.BeanNameAware; import org.springframework.beans.factory.InitializingBean; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.test.fixtures.beans.Employee; -import org.springframework.beans.test.fixtures.beans.Pet; +import org.springframework.beans.testfixture.beans.Employee; +import org.springframework.beans.testfixture.beans.Pet; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.transaction.AfterTransaction; import org.springframework.test.context.transaction.BeforeTransaction; diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/CustomDefaultContextLoaderClassSpringRunnerTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/CustomDefaultContextLoaderClassSpringRunnerTests.java index 44630b7c30a..64b0391b896 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/CustomDefaultContextLoaderClassSpringRunnerTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/CustomDefaultContextLoaderClassSpringRunnerTests.java @@ -20,7 +20,7 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.test.fixtures.beans.Pet; +import org.springframework.beans.testfixture.beans.Pet; import org.springframework.test.context.BootstrapWith; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.ContextLoader; diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/ParameterizedDependencyInjectionTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/ParameterizedDependencyInjectionTests.java index 6bb02c2bb38..20b2307ab83 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/ParameterizedDependencyInjectionTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/ParameterizedDependencyInjectionTests.java @@ -28,8 +28,8 @@ import org.junit.runners.Parameterized.Parameter; import org.junit.runners.Parameterized.Parameters; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.test.fixtures.beans.Employee; -import org.springframework.beans.test.fixtures.beans.Pet; +import org.springframework.beans.testfixture.beans.Employee; +import org.springframework.beans.testfixture.beans.Pet; import org.springframework.context.ApplicationContext; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.TestContextManager; diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/PropertiesBasedSpringJUnit4ClassRunnerAppCtxTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/PropertiesBasedSpringJUnit4ClassRunnerAppCtxTests.java index d857b3efba0..9dfacdea545 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/PropertiesBasedSpringJUnit4ClassRunnerAppCtxTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/PropertiesBasedSpringJUnit4ClassRunnerAppCtxTests.java @@ -22,7 +22,7 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.test.fixtures.beans.Pet; +import org.springframework.beans.testfixture.beans.Pet; import org.springframework.context.ApplicationContext; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.support.GenericPropertiesContextLoader; diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/SpringJUnit4ClassRunnerAppCtxTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/SpringJUnit4ClassRunnerAppCtxTests.java index 4b9a30782cd..4f17e973e11 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/SpringJUnit4ClassRunnerAppCtxTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/SpringJUnit4ClassRunnerAppCtxTests.java @@ -28,8 +28,8 @@ import org.springframework.beans.factory.InitializingBean; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.beans.factory.annotation.Value; -import org.springframework.beans.test.fixtures.beans.Employee; -import org.springframework.beans.test.fixtures.beans.Pet; +import org.springframework.beans.testfixture.beans.Employee; +import org.springframework.beans.testfixture.beans.Pet; import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContextAware; import org.springframework.test.context.ContextConfiguration; diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/BeanOverridingDefaultConfigClassesInheritedTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/BeanOverridingDefaultConfigClassesInheritedTests.java index 76e976a4d8e..9e0b2378dd9 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/BeanOverridingDefaultConfigClassesInheritedTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/BeanOverridingDefaultConfigClassesInheritedTests.java @@ -18,7 +18,7 @@ package org.springframework.test.context.junit4.annotation; import org.junit.Test; -import org.springframework.beans.test.fixtures.beans.Employee; +import org.springframework.beans.testfixture.beans.Employee; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.test.context.ContextConfiguration; diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/DefaultConfigClassesBaseTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/DefaultConfigClassesBaseTests.java index 3379b6dac9d..557e37eaeea 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/DefaultConfigClassesBaseTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/DefaultConfigClassesBaseTests.java @@ -20,7 +20,7 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.test.fixtures.beans.Employee; +import org.springframework.beans.testfixture.beans.Employee; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.test.context.ContextConfiguration; diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/DefaultConfigClassesInheritedTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/DefaultConfigClassesInheritedTests.java index 94a39e04271..9604c8f520f 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/DefaultConfigClassesInheritedTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/DefaultConfigClassesInheritedTests.java @@ -19,7 +19,7 @@ package org.springframework.test.context.junit4.annotation; import org.junit.Test; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.test.fixtures.beans.Pet; +import org.springframework.beans.testfixture.beans.Pet; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.test.context.ContextConfiguration; diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/DefaultLoaderBeanOverridingDefaultConfigClassesInheritedTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/DefaultLoaderBeanOverridingDefaultConfigClassesInheritedTests.java index af2e2fbd4fb..e530a99ee48 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/DefaultLoaderBeanOverridingDefaultConfigClassesInheritedTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/DefaultLoaderBeanOverridingDefaultConfigClassesInheritedTests.java @@ -18,7 +18,7 @@ package org.springframework.test.context.junit4.annotation; import org.junit.Test; -import org.springframework.beans.test.fixtures.beans.Employee; +import org.springframework.beans.testfixture.beans.Employee; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.test.context.ContextConfiguration; diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/DefaultLoaderDefaultConfigClassesBaseTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/DefaultLoaderDefaultConfigClassesBaseTests.java index 5a83e9743aa..b032b6e4bca 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/DefaultLoaderDefaultConfigClassesBaseTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/DefaultLoaderDefaultConfigClassesBaseTests.java @@ -20,7 +20,7 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.test.fixtures.beans.Employee; +import org.springframework.beans.testfixture.beans.Employee; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.test.context.ContextConfiguration; diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/DefaultLoaderDefaultConfigClassesInheritedTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/DefaultLoaderDefaultConfigClassesInheritedTests.java index 6b8ef56dc2c..780791bdc44 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/DefaultLoaderDefaultConfigClassesInheritedTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/DefaultLoaderDefaultConfigClassesInheritedTests.java @@ -19,7 +19,7 @@ package org.springframework.test.context.junit4.annotation; import org.junit.Test; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.test.fixtures.beans.Pet; +import org.springframework.beans.testfixture.beans.Pet; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.test.context.ContextConfiguration; diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/DefaultLoaderExplicitConfigClassesBaseTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/DefaultLoaderExplicitConfigClassesBaseTests.java index be882d7fe11..aa0d8ab54a1 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/DefaultLoaderExplicitConfigClassesBaseTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/DefaultLoaderExplicitConfigClassesBaseTests.java @@ -20,7 +20,7 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.test.fixtures.beans.Employee; +import org.springframework.beans.testfixture.beans.Employee; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.test.context.support.DelegatingSmartContextLoader; diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/DefaultLoaderExplicitConfigClassesInheritedTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/DefaultLoaderExplicitConfigClassesInheritedTests.java index 1c8534d762e..3166a6e0b30 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/DefaultLoaderExplicitConfigClassesInheritedTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/DefaultLoaderExplicitConfigClassesInheritedTests.java @@ -20,7 +20,7 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.test.fixtures.beans.Pet; +import org.springframework.beans.testfixture.beans.Pet; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.test.context.support.DelegatingSmartContextLoader; diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/ExplicitConfigClassesBaseTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/ExplicitConfigClassesBaseTests.java index fb84053a80c..8660f67e954 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/ExplicitConfigClassesBaseTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/ExplicitConfigClassesBaseTests.java @@ -20,7 +20,7 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.test.fixtures.beans.Employee; +import org.springframework.beans.testfixture.beans.Employee; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.test.context.support.AnnotationConfigContextLoader; diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/ExplicitConfigClassesInheritedTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/ExplicitConfigClassesInheritedTests.java index db8f9dceeeb..3e48c6f6c3d 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/ExplicitConfigClassesInheritedTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/ExplicitConfigClassesInheritedTests.java @@ -20,7 +20,7 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.test.fixtures.beans.Pet; +import org.springframework.beans.testfixture.beans.Pet; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.test.context.support.AnnotationConfigContextLoader; diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/PojoAndStringConfig.java b/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/PojoAndStringConfig.java index 35f923e33f6..8de202408ef 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/PojoAndStringConfig.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/PojoAndStringConfig.java @@ -16,8 +16,8 @@ package org.springframework.test.context.junit4.annotation; -import org.springframework.beans.test.fixtures.beans.Employee; -import org.springframework.beans.test.fixtures.beans.Pet; +import org.springframework.beans.testfixture.beans.Employee; +import org.springframework.beans.testfixture.beans.Pet; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/meta/ConfigClassesAndProfilesWithCustomDefaultsMetaConfigWithOverridesTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/meta/ConfigClassesAndProfilesWithCustomDefaultsMetaConfigWithOverridesTests.java index 2e55003a359..d305da8a769 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/meta/ConfigClassesAndProfilesWithCustomDefaultsMetaConfigWithOverridesTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/annotation/meta/ConfigClassesAndProfilesWithCustomDefaultsMetaConfigWithOverridesTests.java @@ -20,8 +20,8 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.test.fixtures.beans.Employee; -import org.springframework.beans.test.fixtures.beans.Pet; +import org.springframework.beans.testfixture.beans.Employee; +import org.springframework.beans.testfixture.beans.Pet; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.test.context.junit4.annotation.PojoAndStringConfig; diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/profile/annotation/DefaultProfileAnnotationConfigTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/profile/annotation/DefaultProfileAnnotationConfigTests.java index d55bd479d95..6e6fed937dc 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/profile/annotation/DefaultProfileAnnotationConfigTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/profile/annotation/DefaultProfileAnnotationConfigTests.java @@ -20,8 +20,8 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.test.fixtures.beans.Employee; -import org.springframework.beans.test.fixtures.beans.Pet; +import org.springframework.beans.testfixture.beans.Employee; +import org.springframework.beans.testfixture.beans.Pet; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.test.context.support.AnnotationConfigContextLoader; diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/profile/annotation/DefaultProfileConfig.java b/spring-test/src/test/java/org/springframework/test/context/junit4/profile/annotation/DefaultProfileConfig.java index 3fc8d23c5b8..67fefb77199 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/profile/annotation/DefaultProfileConfig.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/profile/annotation/DefaultProfileConfig.java @@ -16,7 +16,7 @@ package org.springframework.test.context.junit4.profile.annotation; -import org.springframework.beans.test.fixtures.beans.Pet; +import org.springframework.beans.testfixture.beans.Pet; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/profile/annotation/DevProfileConfig.java b/spring-test/src/test/java/org/springframework/test/context/junit4/profile/annotation/DevProfileConfig.java index c0a1bcf87b1..c8a964ce7ac 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/profile/annotation/DevProfileConfig.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/profile/annotation/DevProfileConfig.java @@ -16,7 +16,7 @@ package org.springframework.test.context.junit4.profile.annotation; -import org.springframework.beans.test.fixtures.beans.Employee; +import org.springframework.beans.testfixture.beans.Employee; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Profile; diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/profile/importresource/DefaultProfileAnnotationConfigTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/profile/importresource/DefaultProfileAnnotationConfigTests.java index 4492b9edca7..73b57ef93d1 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/profile/importresource/DefaultProfileAnnotationConfigTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/profile/importresource/DefaultProfileAnnotationConfigTests.java @@ -20,8 +20,8 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.test.fixtures.beans.Employee; -import org.springframework.beans.test.fixtures.beans.Pet; +import org.springframework.beans.testfixture.beans.Employee; +import org.springframework.beans.testfixture.beans.Pet; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/profile/importresource/DefaultProfileConfig.java b/spring-test/src/test/java/org/springframework/test/context/junit4/profile/importresource/DefaultProfileConfig.java index a37a9172a55..f07511b8943 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/profile/importresource/DefaultProfileConfig.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/profile/importresource/DefaultProfileConfig.java @@ -16,7 +16,7 @@ package org.springframework.test.context.junit4.profile.importresource; -import org.springframework.beans.test.fixtures.beans.Pet; +import org.springframework.beans.testfixture.beans.Pet; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.ImportResource; diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/profile/xml/DefaultProfileXmlConfigTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/profile/xml/DefaultProfileXmlConfigTests.java index 8663a2fb3c5..d9effe2223f 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/profile/xml/DefaultProfileXmlConfigTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/profile/xml/DefaultProfileXmlConfigTests.java @@ -20,8 +20,8 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.test.fixtures.beans.Employee; -import org.springframework.beans.test.fixtures.beans.Pet; +import org.springframework.beans.testfixture.beans.Employee; +import org.springframework.beans.testfixture.beans.Pet; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/rules/ParameterizedSpringRuleTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/rules/ParameterizedSpringRuleTests.java index 0b36a0aaeaf..05fd6a6b966 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/rules/ParameterizedSpringRuleTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/rules/ParameterizedSpringRuleTests.java @@ -29,8 +29,8 @@ import org.junit.runners.Parameterized.Parameter; import org.junit.runners.Parameterized.Parameters; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.test.fixtures.beans.Employee; -import org.springframework.beans.test.fixtures.beans.Pet; +import org.springframework.beans.testfixture.beans.Employee; +import org.springframework.beans.testfixture.beans.Pet; import org.springframework.context.ApplicationContext; import org.springframework.test.context.ContextConfiguration; diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/spr3896/DefaultLocationsBaseTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/spr3896/DefaultLocationsBaseTests.java index 5d9cc739757..53237025c6a 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/spr3896/DefaultLocationsBaseTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/spr3896/DefaultLocationsBaseTests.java @@ -20,7 +20,7 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.test.fixtures.beans.Employee; +import org.springframework.beans.testfixture.beans.Employee; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/spr3896/DefaultLocationsInheritedTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/spr3896/DefaultLocationsInheritedTests.java index 10b0a0f8b31..3c395d52fb2 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/spr3896/DefaultLocationsInheritedTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/spr3896/DefaultLocationsInheritedTests.java @@ -19,7 +19,7 @@ package org.springframework.test.context.junit4.spr3896; import org.junit.Test; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.test.fixtures.beans.Pet; +import org.springframework.beans.testfixture.beans.Pet; import org.springframework.test.context.ContextConfiguration; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/spr3896/ExplicitLocationsBaseTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/spr3896/ExplicitLocationsBaseTests.java index 0ef3e083719..ec9dafbbc91 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/spr3896/ExplicitLocationsBaseTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/spr3896/ExplicitLocationsBaseTests.java @@ -20,7 +20,7 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.test.fixtures.beans.Employee; +import org.springframework.beans.testfixture.beans.Employee; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/spr3896/ExplicitLocationsInheritedTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/spr3896/ExplicitLocationsInheritedTests.java index 5471e91fea7..3bdd96fb2d5 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/spr3896/ExplicitLocationsInheritedTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/spr3896/ExplicitLocationsInheritedTests.java @@ -19,7 +19,7 @@ package org.springframework.test.context.junit4.spr3896; import org.junit.Test; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.test.fixtures.beans.Pet; +import org.springframework.beans.testfixture.beans.Pet; import org.springframework.test.context.ContextConfiguration; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/spr9051/AbstractTransactionalAnnotatedConfigClassTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/spr9051/AbstractTransactionalAnnotatedConfigClassTests.java index 6c53bf67946..e31eb93fbf1 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/spr9051/AbstractTransactionalAnnotatedConfigClassTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/spr9051/AbstractTransactionalAnnotatedConfigClassTests.java @@ -24,7 +24,7 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.test.fixtures.beans.Employee; +import org.springframework.beans.testfixture.beans.Employee; import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.jdbc.datasource.DataSourceTransactionManager; import org.springframework.test.annotation.DirtiesContext; diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/spr9051/TransactionalAnnotatedConfigClassWithAtConfigurationTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/spr9051/TransactionalAnnotatedConfigClassWithAtConfigurationTests.java index d549cadee21..12fa85b6039 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/spr9051/TransactionalAnnotatedConfigClassWithAtConfigurationTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/spr9051/TransactionalAnnotatedConfigClassWithAtConfigurationTests.java @@ -20,7 +20,7 @@ import javax.sql.DataSource; import org.junit.Before; -import org.springframework.beans.test.fixtures.beans.Employee; +import org.springframework.beans.testfixture.beans.Employee; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.jdbc.datasource.DataSourceTransactionManager; diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/spr9051/TransactionalAnnotatedConfigClassesWithoutAtConfigurationTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/spr9051/TransactionalAnnotatedConfigClassesWithoutAtConfigurationTests.java index 013073531f6..2be7df70041 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/spr9051/TransactionalAnnotatedConfigClassesWithoutAtConfigurationTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/spr9051/TransactionalAnnotatedConfigClassesWithoutAtConfigurationTests.java @@ -20,7 +20,7 @@ import javax.sql.DataSource; import org.junit.Before; -import org.springframework.beans.test.fixtures.beans.Employee; +import org.springframework.beans.testfixture.beans.Employee; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.jdbc.core.JdbcTemplate; diff --git a/spring-test/src/test/java/org/springframework/test/context/testng/AnnotationConfigTestNGSpringContextTests.java b/spring-test/src/test/java/org/springframework/test/context/testng/AnnotationConfigTestNGSpringContextTests.java index 5cbbcc10e18..f36352cc9ff 100644 --- a/spring-test/src/test/java/org/springframework/test/context/testng/AnnotationConfigTestNGSpringContextTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/testng/AnnotationConfigTestNGSpringContextTests.java @@ -19,8 +19,8 @@ package org.springframework.test.context.testng; import org.testng.annotations.Test; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.test.fixtures.beans.Employee; -import org.springframework.beans.test.fixtures.beans.Pet; +import org.springframework.beans.testfixture.beans.Employee; +import org.springframework.beans.testfixture.beans.Pet; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.test.context.ContextConfiguration; diff --git a/spring-test/src/test/java/org/springframework/test/context/testng/AnnotationConfigTransactionalTestNGSpringContextTests.java b/spring-test/src/test/java/org/springframework/test/context/testng/AnnotationConfigTransactionalTestNGSpringContextTests.java index 76b8df9b0aa..eadcee96e89 100644 --- a/spring-test/src/test/java/org/springframework/test/context/testng/AnnotationConfigTransactionalTestNGSpringContextTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/testng/AnnotationConfigTransactionalTestNGSpringContextTests.java @@ -25,8 +25,8 @@ import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.test.fixtures.beans.Employee; -import org.springframework.beans.test.fixtures.beans.Pet; +import org.springframework.beans.testfixture.beans.Employee; +import org.springframework.beans.testfixture.beans.Pet; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.jdbc.datasource.DataSourceTransactionManager; diff --git a/spring-test/src/test/java/org/springframework/test/context/testng/ConcreteTransactionalTestNGSpringContextTests.java b/spring-test/src/test/java/org/springframework/test/context/testng/ConcreteTransactionalTestNGSpringContextTests.java index d4ec8757dbf..3da61007d1e 100644 --- a/spring-test/src/test/java/org/springframework/test/context/testng/ConcreteTransactionalTestNGSpringContextTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/testng/ConcreteTransactionalTestNGSpringContextTests.java @@ -27,8 +27,8 @@ import org.testng.annotations.Test; import org.springframework.beans.factory.BeanNameAware; import org.springframework.beans.factory.InitializingBean; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.test.fixtures.beans.Employee; -import org.springframework.beans.test.fixtures.beans.Pet; +import org.springframework.beans.testfixture.beans.Employee; +import org.springframework.beans.testfixture.beans.Pet; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.transaction.AfterTransaction; import org.springframework.test.context.transaction.BeforeTransaction; diff --git a/spring-test/src/test/java/org/springframework/test/context/web/RequestAndSessionScopedBeansWacTests.java b/spring-test/src/test/java/org/springframework/test/context/web/RequestAndSessionScopedBeansWacTests.java index 6ef0062c250..70568f3e78b 100644 --- a/spring-test/src/test/java/org/springframework/test/context/web/RequestAndSessionScopedBeansWacTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/web/RequestAndSessionScopedBeansWacTests.java @@ -19,7 +19,7 @@ package org.springframework.test.context.web; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.mock.web.MockHttpServletRequest; import org.springframework.mock.web.MockHttpSession; import org.springframework.test.context.junit.jupiter.web.SpringJUnitWebConfig; diff --git a/spring-test/src/test/resources/org/springframework/test/context/configuration/ContextConfigurationWithPropertiesExtendingPropertiesAndInheritedLoaderTests-context.properties b/spring-test/src/test/resources/org/springframework/test/context/configuration/ContextConfigurationWithPropertiesExtendingPropertiesAndInheritedLoaderTests-context.properties index ffd5b893819..3ad2eceb30a 100644 --- a/spring-test/src/test/resources/org/springframework/test/context/configuration/ContextConfigurationWithPropertiesExtendingPropertiesAndInheritedLoaderTests-context.properties +++ b/spring-test/src/test/resources/org/springframework/test/context/configuration/ContextConfigurationWithPropertiesExtendingPropertiesAndInheritedLoaderTests-context.properties @@ -1,4 +1,4 @@ -dog.(class)=org.springframework.beans.test.fixtures.beans.Pet +dog.(class)=org.springframework.beans.testfixture.beans.Pet dog.$0=Fido testString2.(class)=java.lang.String diff --git a/spring-test/src/test/resources/org/springframework/test/context/configuration/ContextConfigurationWithPropertiesExtendingPropertiesTests-context.properties b/spring-test/src/test/resources/org/springframework/test/context/configuration/ContextConfigurationWithPropertiesExtendingPropertiesTests-context.properties index ffd5b893819..3ad2eceb30a 100644 --- a/spring-test/src/test/resources/org/springframework/test/context/configuration/ContextConfigurationWithPropertiesExtendingPropertiesTests-context.properties +++ b/spring-test/src/test/resources/org/springframework/test/context/configuration/ContextConfigurationWithPropertiesExtendingPropertiesTests-context.properties @@ -1,4 +1,4 @@ -dog.(class)=org.springframework.beans.test.fixtures.beans.Pet +dog.(class)=org.springframework.beans.testfixture.beans.Pet dog.$0=Fido testString2.(class)=java.lang.String diff --git a/spring-test/src/test/resources/org/springframework/test/context/groovy/DefaultScriptDetectionGroovySpringContextTestsContext.groovy b/spring-test/src/test/resources/org/springframework/test/context/groovy/DefaultScriptDetectionGroovySpringContextTestsContext.groovy index a74895df75f..0de7dbfe4c8 100644 --- a/spring-test/src/test/resources/org/springframework/test/context/groovy/DefaultScriptDetectionGroovySpringContextTestsContext.groovy +++ b/spring-test/src/test/resources/org/springframework/test/context/groovy/DefaultScriptDetectionGroovySpringContextTestsContext.groovy @@ -16,8 +16,8 @@ package org.springframework.test.context.groovy -import org.springframework.beans.test.fixtures.beans.Employee -import org.springframework.beans.test.fixtures.beans.Pet +import org.springframework.beans.testfixture.beans.Employee +import org.springframework.beans.testfixture.beans.Pet /** * Groovy script for defining Spring beans for integration tests. diff --git a/spring-test/src/test/resources/org/springframework/test/context/groovy/context.groovy b/spring-test/src/test/resources/org/springframework/test/context/groovy/context.groovy index a74895df75f..0de7dbfe4c8 100644 --- a/spring-test/src/test/resources/org/springframework/test/context/groovy/context.groovy +++ b/spring-test/src/test/resources/org/springframework/test/context/groovy/context.groovy @@ -16,8 +16,8 @@ package org.springframework.test.context.groovy -import org.springframework.beans.test.fixtures.beans.Employee -import org.springframework.beans.test.fixtures.beans.Pet +import org.springframework.beans.testfixture.beans.Employee +import org.springframework.beans.testfixture.beans.Pet /** * Groovy script for defining Spring beans for integration tests. diff --git a/spring-test/src/test/resources/org/springframework/test/context/groovy/contextB.xml b/spring-test/src/test/resources/org/springframework/test/context/groovy/contextB.xml index aedba0f9a28..aaf978b355b 100644 --- a/spring-test/src/test/resources/org/springframework/test/context/groovy/contextB.xml +++ b/spring-test/src/test/resources/org/springframework/test/context/groovy/contextB.xml @@ -2,13 +2,13 @@ - + - + diff --git a/spring-test/src/test/resources/org/springframework/test/context/junit4/ConcreteTransactionalJUnit4SpringContextTests-context.xml b/spring-test/src/test/resources/org/springframework/test/context/junit4/ConcreteTransactionalJUnit4SpringContextTests-context.xml index 2fc9fd86f63..d014ce74d12 100644 --- a/spring-test/src/test/resources/org/springframework/test/context/junit4/ConcreteTransactionalJUnit4SpringContextTests-context.xml +++ b/spring-test/src/test/resources/org/springframework/test/context/junit4/ConcreteTransactionalJUnit4SpringContextTests-context.xml @@ -10,13 +10,13 @@ - + - + diff --git a/spring-test/src/test/resources/org/springframework/test/context/junit4/MultipleResourcesSpringJUnit4ClassRunnerAppCtxTests-context1.xml b/spring-test/src/test/resources/org/springframework/test/context/junit4/MultipleResourcesSpringJUnit4ClassRunnerAppCtxTests-context1.xml index ab039802a10..2a360ce4195 100644 --- a/spring-test/src/test/resources/org/springframework/test/context/junit4/MultipleResourcesSpringJUnit4ClassRunnerAppCtxTests-context1.xml +++ b/spring-test/src/test/resources/org/springframework/test/context/junit4/MultipleResourcesSpringJUnit4ClassRunnerAppCtxTests-context1.xml @@ -2,7 +2,7 @@ - + diff --git a/spring-test/src/test/resources/org/springframework/test/context/junit4/MultipleResourcesSpringJUnit4ClassRunnerAppCtxTests-context2.xml b/spring-test/src/test/resources/org/springframework/test/context/junit4/MultipleResourcesSpringJUnit4ClassRunnerAppCtxTests-context2.xml index 9a6cc4f6ffe..fba7a99f223 100644 --- a/spring-test/src/test/resources/org/springframework/test/context/junit4/MultipleResourcesSpringJUnit4ClassRunnerAppCtxTests-context2.xml +++ b/spring-test/src/test/resources/org/springframework/test/context/junit4/MultipleResourcesSpringJUnit4ClassRunnerAppCtxTests-context2.xml @@ -2,7 +2,7 @@ - + diff --git a/spring-test/src/test/resources/org/springframework/test/context/junit4/ParameterizedDependencyInjectionTests-context.xml b/spring-test/src/test/resources/org/springframework/test/context/junit4/ParameterizedDependencyInjectionTests-context.xml index 8f84022054d..8a909281258 100644 --- a/spring-test/src/test/resources/org/springframework/test/context/junit4/ParameterizedDependencyInjectionTests-context.xml +++ b/spring-test/src/test/resources/org/springframework/test/context/junit4/ParameterizedDependencyInjectionTests-context.xml @@ -2,19 +2,19 @@ - + - + - + diff --git a/spring-test/src/test/resources/org/springframework/test/context/junit4/PropertiesBasedSpringJUnit4ClassRunnerAppCtxTests-context.properties b/spring-test/src/test/resources/org/springframework/test/context/junit4/PropertiesBasedSpringJUnit4ClassRunnerAppCtxTests-context.properties index 064e834d125..dc2eae729a9 100644 --- a/spring-test/src/test/resources/org/springframework/test/context/junit4/PropertiesBasedSpringJUnit4ClassRunnerAppCtxTests-context.properties +++ b/spring-test/src/test/resources/org/springframework/test/context/junit4/PropertiesBasedSpringJUnit4ClassRunnerAppCtxTests-context.properties @@ -1,4 +1,4 @@ -cat.(class)=org.springframework.beans.test.fixtures.beans.Pet +cat.(class)=org.springframework.beans.testfixture.beans.Pet cat.$0=Garfield testString.(class)=java.lang.String diff --git a/spring-test/src/test/resources/org/springframework/test/context/junit4/SpringJUnit4ClassRunnerAppCtxTests-context.xml b/spring-test/src/test/resources/org/springframework/test/context/junit4/SpringJUnit4ClassRunnerAppCtxTests-context.xml index 79c06576176..5a836a42641 100644 --- a/spring-test/src/test/resources/org/springframework/test/context/junit4/SpringJUnit4ClassRunnerAppCtxTests-context.xml +++ b/spring-test/src/test/resources/org/springframework/test/context/junit4/SpringJUnit4ClassRunnerAppCtxTests-context.xml @@ -2,13 +2,13 @@ - + - + diff --git a/spring-test/src/test/resources/org/springframework/test/context/junit4/profile/importresource/import.xml b/spring-test/src/test/resources/org/springframework/test/context/junit4/profile/importresource/import.xml index 76ae2046a3b..46fb9422479 100644 --- a/spring-test/src/test/resources/org/springframework/test/context/junit4/profile/importresource/import.xml +++ b/spring-test/src/test/resources/org/springframework/test/context/junit4/profile/importresource/import.xml @@ -3,7 +3,7 @@ xsi:schemaLocation="http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans-3.1.xsd"> - + diff --git a/spring-test/src/test/resources/org/springframework/test/context/junit4/profile/xml/DefaultProfileXmlConfigTests-context.xml b/spring-test/src/test/resources/org/springframework/test/context/junit4/profile/xml/DefaultProfileXmlConfigTests-context.xml index c1d81ead011..f295ce7c84a 100644 --- a/spring-test/src/test/resources/org/springframework/test/context/junit4/profile/xml/DefaultProfileXmlConfigTests-context.xml +++ b/spring-test/src/test/resources/org/springframework/test/context/junit4/profile/xml/DefaultProfileXmlConfigTests-context.xml @@ -2,12 +2,12 @@ - + - + diff --git a/spring-test/src/test/resources/org/springframework/test/context/junit4/spr3896/BeanOverridingDefaultLocationsInheritedTests-context.xml b/spring-test/src/test/resources/org/springframework/test/context/junit4/spr3896/BeanOverridingDefaultLocationsInheritedTests-context.xml index dcbba34d81b..63b0cfb65c5 100644 --- a/spring-test/src/test/resources/org/springframework/test/context/junit4/spr3896/BeanOverridingDefaultLocationsInheritedTests-context.xml +++ b/spring-test/src/test/resources/org/springframework/test/context/junit4/spr3896/BeanOverridingDefaultLocationsInheritedTests-context.xml @@ -2,7 +2,7 @@ - + diff --git a/spring-test/src/test/resources/org/springframework/test/context/junit4/spr3896/DefaultLocationsBaseTests-context.xml b/spring-test/src/test/resources/org/springframework/test/context/junit4/spr3896/DefaultLocationsBaseTests-context.xml index ab039802a10..2a360ce4195 100644 --- a/spring-test/src/test/resources/org/springframework/test/context/junit4/spr3896/DefaultLocationsBaseTests-context.xml +++ b/spring-test/src/test/resources/org/springframework/test/context/junit4/spr3896/DefaultLocationsBaseTests-context.xml @@ -2,7 +2,7 @@ - + diff --git a/spring-test/src/test/resources/org/springframework/test/context/junit4/spr3896/DefaultLocationsInheritedTests-context.xml b/spring-test/src/test/resources/org/springframework/test/context/junit4/spr3896/DefaultLocationsInheritedTests-context.xml index 9a6cc4f6ffe..fba7a99f223 100644 --- a/spring-test/src/test/resources/org/springframework/test/context/junit4/spr3896/DefaultLocationsInheritedTests-context.xml +++ b/spring-test/src/test/resources/org/springframework/test/context/junit4/spr3896/DefaultLocationsInheritedTests-context.xml @@ -2,7 +2,7 @@ - + diff --git a/spring-test/src/test/resources/org/springframework/test/context/testng/ConcreteTransactionalTestNGSpringContextTests-context.xml b/spring-test/src/test/resources/org/springframework/test/context/testng/ConcreteTransactionalTestNGSpringContextTests-context.xml index 6888e059d76..211e20f09d5 100644 --- a/spring-test/src/test/resources/org/springframework/test/context/testng/ConcreteTransactionalTestNGSpringContextTests-context.xml +++ b/spring-test/src/test/resources/org/springframework/test/context/testng/ConcreteTransactionalTestNGSpringContextTests-context.xml @@ -5,10 +5,10 @@ xsi:schemaLocation="http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/jdbc https://www.springframework.org/schema/jdbc/spring-jdbc.xsd"> - - + diff --git a/spring-test/src/test/resources/org/springframework/test/context/web/RequestAndSessionScopedBeansWacTests-context.xml b/spring-test/src/test/resources/org/springframework/test/context/web/RequestAndSessionScopedBeansWacTests-context.xml index 73ba0a7094d..b2e9e61c20b 100644 --- a/spring-test/src/test/resources/org/springframework/test/context/web/RequestAndSessionScopedBeansWacTests-context.xml +++ b/spring-test/src/test/resources/org/springframework/test/context/web/RequestAndSessionScopedBeansWacTests-context.xml @@ -2,10 +2,10 @@ - + - + diff --git a/spring-tx/src/test/java/org/springframework/transaction/TxNamespaceHandlerEventTests.java b/spring-tx/src/test/java/org/springframework/transaction/TxNamespaceHandlerEventTests.java index 5dab797e05a..8d35509b2a1 100644 --- a/spring-tx/src/test/java/org/springframework/transaction/TxNamespaceHandlerEventTests.java +++ b/spring-tx/src/test/java/org/springframework/transaction/TxNamespaceHandlerEventTests.java @@ -23,7 +23,7 @@ import org.springframework.beans.factory.parsing.BeanComponentDefinition; import org.springframework.beans.factory.parsing.ComponentDefinition; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; -import org.springframework.beans.test.fixtures.beans.CollectingReaderEventListener; +import org.springframework.beans.testfixture.beans.CollectingReaderEventListener; import org.springframework.core.io.ClassPathResource; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-tx/src/test/java/org/springframework/transaction/TxNamespaceHandlerTests.java b/spring-tx/src/test/java/org/springframework/transaction/TxNamespaceHandlerTests.java index e2eb6431db8..f3fd77f005b 100644 --- a/spring-tx/src/test/java/org/springframework/transaction/TxNamespaceHandlerTests.java +++ b/spring-tx/src/test/java/org/springframework/transaction/TxNamespaceHandlerTests.java @@ -22,7 +22,7 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.springframework.aop.support.AopUtils; -import org.springframework.beans.test.fixtures.beans.ITestBean; +import org.springframework.beans.testfixture.beans.ITestBean; import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; import org.springframework.tests.transaction.CallCountingTransactionManager; diff --git a/spring-tx/src/test/java/org/springframework/transaction/interceptor/AbstractTransactionAspectTests.java b/spring-tx/src/test/java/org/springframework/transaction/interceptor/AbstractTransactionAspectTests.java index 33394fa04b7..b478a6b8ec6 100644 --- a/spring-tx/src/test/java/org/springframework/transaction/interceptor/AbstractTransactionAspectTests.java +++ b/spring-tx/src/test/java/org/springframework/transaction/interceptor/AbstractTransactionAspectTests.java @@ -21,8 +21,8 @@ import java.lang.reflect.Method; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; -import org.springframework.beans.test.fixtures.beans.ITestBean; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.ITestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.dao.OptimisticLockingFailureException; import org.springframework.transaction.CannotCreateTransactionException; import org.springframework.transaction.MockCallbackPreferringTransactionManager; diff --git a/spring-tx/src/test/java/org/springframework/transaction/interceptor/BeanFactoryTransactionTests.java b/spring-tx/src/test/java/org/springframework/transaction/interceptor/BeanFactoryTransactionTests.java index bbb8a99b5f5..bf2f8012d0a 100644 --- a/spring-tx/src/test/java/org/springframework/transaction/interceptor/BeanFactoryTransactionTests.java +++ b/spring-tx/src/test/java/org/springframework/transaction/interceptor/BeanFactoryTransactionTests.java @@ -31,9 +31,9 @@ import org.springframework.aop.target.HotSwappableTargetSource; import org.springframework.beans.FatalBeanException; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; -import org.springframework.beans.test.fixtures.beans.DerivedTestBean; -import org.springframework.beans.test.fixtures.beans.ITestBean; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.DerivedTestBean; +import org.springframework.beans.testfixture.beans.ITestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.core.io.ClassPathResource; import org.springframework.lang.Nullable; import org.springframework.tests.transaction.CallCountingTransactionManager; diff --git a/spring-tx/src/test/java/org/springframework/transaction/interceptor/ImplementsNoInterfaces.java b/spring-tx/src/test/java/org/springframework/transaction/interceptor/ImplementsNoInterfaces.java index d36b8d93526..9d39ed7c315 100644 --- a/spring-tx/src/test/java/org/springframework/transaction/interceptor/ImplementsNoInterfaces.java +++ b/spring-tx/src/test/java/org/springframework/transaction/interceptor/ImplementsNoInterfaces.java @@ -16,7 +16,7 @@ package org.springframework.transaction.interceptor; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.TestBean; /** * Test for CGLIB proxying that implements no interfaces diff --git a/spring-tx/src/test/java/org/springframework/transaction/support/SimpleTransactionScopeTests.java b/spring-tx/src/test/java/org/springframework/transaction/support/SimpleTransactionScopeTests.java index 7b28446f7ad..c99774c7167 100644 --- a/spring-tx/src/test/java/org/springframework/transaction/support/SimpleTransactionScopeTests.java +++ b/spring-tx/src/test/java/org/springframework/transaction/support/SimpleTransactionScopeTests.java @@ -23,8 +23,8 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.factory.BeanCreationException; import org.springframework.beans.factory.support.GenericBeanDefinition; -import org.springframework.beans.test.fixtures.beans.DerivedTestBean; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.DerivedTestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.context.support.GenericApplicationContext; import org.springframework.tests.transaction.CallCountingTransactionManager; diff --git a/spring-tx/src/test/resources/org/springframework/transaction/interceptor/noTransactionAttributeSource.xml b/spring-tx/src/test/resources/org/springframework/transaction/interceptor/noTransactionAttributeSource.xml index 7be655a7962..dba83011242 100644 --- a/spring-tx/src/test/resources/org/springframework/transaction/interceptor/noTransactionAttributeSource.xml +++ b/spring-tx/src/test/resources/org/springframework/transaction/interceptor/noTransactionAttributeSource.xml @@ -4,7 +4,7 @@ - + custom 666 diff --git a/spring-tx/src/test/resources/org/springframework/transaction/interceptor/transactionalBeanFactory.xml b/spring-tx/src/test/resources/org/springframework/transaction/interceptor/transactionalBeanFactory.xml index d932173756f..452024b92ef 100644 --- a/spring-tx/src/test/resources/org/springframework/transaction/interceptor/transactionalBeanFactory.xml +++ b/spring-tx/src/test/resources/org/springframework/transaction/interceptor/transactionalBeanFactory.xml @@ -3,12 +3,12 @@ - + dependency - + custom 666 @@ -22,16 +22,16 @@ - org.springframework.beans.test.fixtures.beans.ITestBean.s*=PROPAGATION_MANDATORY - org.springframework.beans.test.fixtures.beans.AgeHolder.setAg*=PROPAGATION_REQUIRED - org.springframework.beans.test.fixtures.beans.ITestBean.set*= PROPAGATION_SUPPORTS , readOnly + org.springframework.beans.testfixture.beans.ITestBean.s*=PROPAGATION_MANDATORY + org.springframework.beans.testfixture.beans.AgeHolder.setAg*=PROPAGATION_REQUIRED + org.springframework.beans.testfixture.beans.ITestBean.set*= PROPAGATION_SUPPORTS , readOnly - org.springframework.beans.test.fixtures.beans.ITestBean + org.springframework.beans.testfixture.beans.ITestBean diff --git a/spring-tx/src/test/resources/org/springframework/transaction/txNamespaceHandlerTests.xml b/spring-tx/src/test/resources/org/springframework/transaction/txNamespaceHandlerTests.xml index 414adf58af5..8e3b2411fda 100644 --- a/spring-tx/src/test/resources/org/springframework/transaction/txNamespaceHandlerTests.xml +++ b/spring-tx/src/test/resources/org/springframework/transaction/txNamespaceHandlerTests.xml @@ -28,6 +28,6 @@ - + diff --git a/spring-web/src/test/java/org/springframework/remoting/caucho/CauchoRemotingTests.java b/spring-web/src/test/java/org/springframework/remoting/caucho/CauchoRemotingTests.java index 6d1291e4335..58d1846bcf4 100644 --- a/spring-web/src/test/java/org/springframework/remoting/caucho/CauchoRemotingTests.java +++ b/spring-web/src/test/java/org/springframework/remoting/caucho/CauchoRemotingTests.java @@ -24,8 +24,8 @@ import com.sun.net.httpserver.HttpServer; import org.junit.jupiter.api.Test; import org.springframework.aop.framework.ProxyFactory; -import org.springframework.beans.test.fixtures.beans.ITestBean; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.ITestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.remoting.RemoteAccessException; import org.springframework.util.SocketUtils; diff --git a/spring-web/src/test/java/org/springframework/remoting/httpinvoker/HttpInvokerTests.java b/spring-web/src/test/java/org/springframework/remoting/httpinvoker/HttpInvokerTests.java index 39625545d80..cbb8eda58ff 100644 --- a/spring-web/src/test/java/org/springframework/remoting/httpinvoker/HttpInvokerTests.java +++ b/spring-web/src/test/java/org/springframework/remoting/httpinvoker/HttpInvokerTests.java @@ -37,8 +37,8 @@ import org.aopalliance.intercept.MethodInvocation; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.BeanClassLoaderAware; -import org.springframework.beans.test.fixtures.beans.ITestBean; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.ITestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.mock.web.test.MockHttpServletResponse; import org.springframework.remoting.RemoteAccessException; diff --git a/spring-web/src/test/java/org/springframework/web/bind/EscapedErrorsTests.java b/spring-web/src/test/java/org/springframework/web/bind/EscapedErrorsTests.java index 91926d3f161..80e098ba130 100644 --- a/spring-web/src/test/java/org/springframework/web/bind/EscapedErrorsTests.java +++ b/spring-web/src/test/java/org/springframework/web/bind/EscapedErrorsTests.java @@ -18,7 +18,7 @@ package org.springframework.web.bind; import org.junit.jupiter.api.Test; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.validation.BindException; import org.springframework.validation.Errors; import org.springframework.validation.FieldError; diff --git a/spring-web/src/test/java/org/springframework/web/bind/ServletRequestDataBinderTests.java b/spring-web/src/test/java/org/springframework/web/bind/ServletRequestDataBinderTests.java index b3cbcd011df..3a2c729fc3e 100644 --- a/spring-web/src/test/java/org/springframework/web/bind/ServletRequestDataBinderTests.java +++ b/spring-web/src/test/java/org/springframework/web/bind/ServletRequestDataBinderTests.java @@ -25,8 +25,8 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.PropertyValue; import org.springframework.beans.PropertyValues; -import org.springframework.beans.test.fixtures.beans.ITestBean; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.ITestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.mock.web.test.MockHttpServletRequest; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-web/src/test/java/org/springframework/web/bind/support/WebExchangeDataBinderTests.java b/spring-web/src/test/java/org/springframework/web/bind/support/WebExchangeDataBinderTests.java index 276696053f6..57382b94070 100644 --- a/spring-web/src/test/java/org/springframework/web/bind/support/WebExchangeDataBinderTests.java +++ b/spring-web/src/test/java/org/springframework/web/bind/support/WebExchangeDataBinderTests.java @@ -26,8 +26,8 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; -import org.springframework.beans.test.fixtures.beans.ITestBean; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.ITestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.core.io.ClassPathResource; import org.springframework.http.HttpMethod; import org.springframework.http.MediaType; diff --git a/spring-web/src/test/java/org/springframework/web/bind/support/WebRequestDataBinderTests.java b/spring-web/src/test/java/org/springframework/web/bind/support/WebRequestDataBinderTests.java index 74b53448980..62dc077ad02 100644 --- a/spring-web/src/test/java/org/springframework/web/bind/support/WebRequestDataBinderTests.java +++ b/spring-web/src/test/java/org/springframework/web/bind/support/WebRequestDataBinderTests.java @@ -27,8 +27,8 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.PropertyValue; import org.springframework.beans.PropertyValues; -import org.springframework.beans.test.fixtures.beans.ITestBean; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.ITestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.mock.web.test.MockMultipartFile; import org.springframework.mock.web.test.MockMultipartHttpServletRequest; diff --git a/spring-web/src/test/java/org/springframework/web/context/request/RequestAndSessionScopedBeanTests.java b/spring-web/src/test/java/org/springframework/web/context/request/RequestAndSessionScopedBeanTests.java index 182f152de29..322ca97a63a 100644 --- a/spring-web/src/test/java/org/springframework/web/context/request/RequestAndSessionScopedBeanTests.java +++ b/spring-web/src/test/java/org/springframework/web/context/request/RequestAndSessionScopedBeanTests.java @@ -22,7 +22,7 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.factory.BeanCreationException; import org.springframework.beans.factory.support.RootBeanDefinition; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.web.context.WebApplicationContext; import org.springframework.web.context.support.StaticWebApplicationContext; diff --git a/spring-web/src/test/java/org/springframework/web/context/request/RequestScopeTests.java b/spring-web/src/test/java/org/springframework/web/context/request/RequestScopeTests.java index ac6227ce96f..37a98e46c8e 100644 --- a/spring-web/src/test/java/org/springframework/web/context/request/RequestScopeTests.java +++ b/spring-web/src/test/java/org/springframework/web/context/request/RequestScopeTests.java @@ -25,8 +25,8 @@ import org.springframework.beans.factory.BeanCurrentlyInCreationException; import org.springframework.beans.factory.FactoryBean; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; -import org.springframework.beans.test.fixtures.beans.DerivedTestBean; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.DerivedTestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.context.expression.StandardBeanExpressionResolver; import org.springframework.core.io.ClassPathResource; import org.springframework.mock.web.test.MockHttpServletRequest; diff --git a/spring-web/src/test/java/org/springframework/web/context/request/RequestScopedProxyTests.java b/spring-web/src/test/java/org/springframework/web/context/request/RequestScopedProxyTests.java index 970064bc0bb..6c705e3d9df 100644 --- a/spring-web/src/test/java/org/springframework/web/context/request/RequestScopedProxyTests.java +++ b/spring-web/src/test/java/org/springframework/web/context/request/RequestScopedProxyTests.java @@ -24,10 +24,10 @@ import org.springframework.beans.factory.config.BeanDefinition; import org.springframework.beans.factory.config.BeanDefinitionHolder; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; -import org.springframework.beans.test.fixtures.beans.DerivedTestBean; -import org.springframework.beans.test.fixtures.beans.ITestBean; -import org.springframework.beans.test.fixtures.beans.TestBean; -import org.springframework.beans.test.fixtures.beans.factory.DummyFactory; +import org.springframework.beans.testfixture.beans.DerivedTestBean; +import org.springframework.beans.testfixture.beans.ITestBean; +import org.springframework.beans.testfixture.beans.TestBean; +import org.springframework.beans.testfixture.beans.factory.DummyFactory; import org.springframework.core.io.ClassPathResource; import org.springframework.mock.web.test.MockHttpServletRequest; diff --git a/spring-web/src/test/java/org/springframework/web/context/request/SessionScopeTests.java b/spring-web/src/test/java/org/springframework/web/context/request/SessionScopeTests.java index da0d226b9a2..908c4db4242 100644 --- a/spring-web/src/test/java/org/springframework/web/context/request/SessionScopeTests.java +++ b/spring-web/src/test/java/org/springframework/web/context/request/SessionScopeTests.java @@ -28,8 +28,8 @@ import org.springframework.beans.factory.BeanNameAware; import org.springframework.beans.factory.config.DestructionAwareBeanPostProcessor; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; -import org.springframework.beans.test.fixtures.beans.DerivedTestBean; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.DerivedTestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.core.io.ClassPathResource; import org.springframework.core.testfixture.io.SerializationTestUtils; import org.springframework.mock.web.test.MockHttpServletRequest; diff --git a/spring-web/src/test/java/org/springframework/web/context/request/WebApplicationContextScopeTests.java b/spring-web/src/test/java/org/springframework/web/context/request/WebApplicationContextScopeTests.java index 28bd6d1a2c0..6fffbb6c3a2 100644 --- a/spring-web/src/test/java/org/springframework/web/context/request/WebApplicationContextScopeTests.java +++ b/spring-web/src/test/java/org/springframework/web/context/request/WebApplicationContextScopeTests.java @@ -21,7 +21,7 @@ import javax.servlet.ServletContextEvent; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.support.GenericBeanDefinition; -import org.springframework.beans.test.fixtures.beans.DerivedTestBean; +import org.springframework.beans.testfixture.beans.DerivedTestBean; import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.mock.web.test.MockServletContext; import org.springframework.web.context.ContextCleanupListener; diff --git a/spring-web/src/test/java/org/springframework/web/context/support/SpringBeanAutowiringSupportTests.java b/spring-web/src/test/java/org/springframework/web/context/support/SpringBeanAutowiringSupportTests.java index 05be6033aa5..a03dac5a6bb 100644 --- a/spring-web/src/test/java/org/springframework/web/context/support/SpringBeanAutowiringSupportTests.java +++ b/spring-web/src/test/java/org/springframework/web/context/support/SpringBeanAutowiringSupportTests.java @@ -21,8 +21,8 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.MutablePropertyValues; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; -import org.springframework.beans.test.fixtures.beans.ITestBean; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.ITestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.context.annotation.AnnotationConfigUtils; import org.springframework.mock.web.test.MockServletContext; import org.springframework.web.context.WebApplicationContext; diff --git a/spring-web/src/test/java/org/springframework/web/method/annotation/ModelAttributeMethodProcessorTests.java b/spring-web/src/test/java/org/springframework/web/method/annotation/ModelAttributeMethodProcessorTests.java index 446eb39f12b..7171fdd7e29 100644 --- a/spring-web/src/test/java/org/springframework/web/method/annotation/ModelAttributeMethodProcessorTests.java +++ b/spring-web/src/test/java/org/springframework/web/method/annotation/ModelAttributeMethodProcessorTests.java @@ -23,7 +23,7 @@ import java.lang.reflect.Method; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.core.MethodParameter; import org.springframework.core.annotation.SynthesizingMethodParameter; import org.springframework.mock.web.test.MockHttpServletRequest; diff --git a/spring-web/src/test/java/org/springframework/web/method/annotation/SessionAttributesHandlerTests.java b/spring-web/src/test/java/org/springframework/web/method/annotation/SessionAttributesHandlerTests.java index 8a81bf01757..269fc9dc830 100644 --- a/spring-web/src/test/java/org/springframework/web/method/annotation/SessionAttributesHandlerTests.java +++ b/spring-web/src/test/java/org/springframework/web/method/annotation/SessionAttributesHandlerTests.java @@ -21,7 +21,7 @@ import java.util.HashSet; import org.junit.jupiter.api.Test; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.ui.ModelMap; import org.springframework.web.bind.annotation.SessionAttributes; diff --git a/spring-web/src/test/resources/org/springframework/web/context/request/requestScopeTests.xml b/spring-web/src/test/resources/org/springframework/web/context/request/requestScopeTests.xml index cbc20b6107f..826c5a87c41 100644 --- a/spring-web/src/test/resources/org/springframework/web/context/request/requestScopeTests.xml +++ b/spring-web/src/test/resources/org/springframework/web/context/request/requestScopeTests.xml @@ -4,35 +4,35 @@ xsi:schemaLocation="http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans-2.0.xsd"> - + - + - + - + - + - + - + - + - + diff --git a/spring-web/src/test/resources/org/springframework/web/context/request/requestScopedProxyTests.xml b/spring-web/src/test/resources/org/springframework/web/context/request/requestScopedProxyTests.xml index e766b1f6f5b..cafedde77d9 100644 --- a/spring-web/src/test/resources/org/springframework/web/context/request/requestScopedProxyTests.xml +++ b/spring-web/src/test/resources/org/springframework/web/context/request/requestScopedProxyTests.xml @@ -5,47 +5,47 @@ xsi:schemaLocation="http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://www.springframework.org/schema/aop https://www.springframework.org/schema/aop/spring-aop-2.0.xsd"> - + - + - + - + - + - + - + - + - + - + diff --git a/spring-web/src/test/resources/org/springframework/web/context/request/sessionScopeTests.xml b/spring-web/src/test/resources/org/springframework/web/context/request/sessionScopeTests.xml index 45f87fa263c..42dde8fce71 100644 --- a/spring-web/src/test/resources/org/springframework/web/context/request/sessionScopeTests.xml +++ b/spring-web/src/test/resources/org/springframework/web/context/request/sessionScopeTests.xml @@ -3,8 +3,8 @@ - + - + diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/SessionAttributesHandlerTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/SessionAttributesHandlerTests.java index 13e3c3c4d9a..d0fd055ce50 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/SessionAttributesHandlerTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/SessionAttributesHandlerTests.java @@ -21,7 +21,7 @@ import java.util.HashSet; import org.junit.jupiter.api.Test; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.mock.web.test.server.MockWebSession; import org.springframework.ui.ModelMap; import org.springframework.web.bind.annotation.SessionAttributes; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/view/AbstractViewTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/view/AbstractViewTests.java index 0e3c1fe78d0..6e3717fb7ef 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/view/AbstractViewTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/view/AbstractViewTests.java @@ -28,7 +28,7 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; import reactor.test.StepVerifier; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.http.MediaType; import org.springframework.lang.Nullable; import org.springframework.mock.http.server.reactive.test.MockServerHttpRequest; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/view/freemarker/FreeMarkerMacroTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/view/freemarker/FreeMarkerMacroTests.java index ce6ae915171..e660183ff55 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/view/freemarker/FreeMarkerMacroTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/view/freemarker/FreeMarkerMacroTests.java @@ -29,7 +29,7 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.context.support.GenericApplicationContext; import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.FileSystemResource; diff --git a/spring-webmvc/src/test/java/org/springframework/context/LifecycleContextBean.java b/spring-webmvc/src/test/java/org/springframework/context/LifecycleContextBean.java index c6e1fe0b194..1f04eb182cc 100644 --- a/spring-webmvc/src/test/java/org/springframework/context/LifecycleContextBean.java +++ b/spring-webmvc/src/test/java/org/springframework/context/LifecycleContextBean.java @@ -18,7 +18,7 @@ package org.springframework.context; import org.springframework.beans.BeansException; import org.springframework.beans.factory.BeanFactory; -import org.springframework.beans.test.fixtures.beans.LifecycleBean; +import org.springframework.beans.testfixture.beans.LifecycleBean; /** * Simple bean to test ApplicationContext lifecycle methods for beans diff --git a/spring-webmvc/src/test/java/org/springframework/web/context/ContextLoaderTests.java b/spring-webmvc/src/test/java/org/springframework/web/context/ContextLoaderTests.java index c9f96dfdd3e..dc713f1141f 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/context/ContextLoaderTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/context/ContextLoaderTests.java @@ -29,8 +29,8 @@ import org.springframework.beans.BeansException; import org.springframework.beans.factory.BeanCreationException; import org.springframework.beans.factory.BeanDefinitionStoreException; import org.springframework.beans.factory.support.DefaultListableBeanFactory; -import org.springframework.beans.test.fixtures.beans.LifecycleBean; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.LifecycleBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContextException; import org.springframework.context.ApplicationContextInitializer; diff --git a/spring-webmvc/src/test/java/org/springframework/web/context/XmlWebApplicationContextTests.java b/spring-webmvc/src/test/java/org/springframework/web/context/XmlWebApplicationContextTests.java index 52d9278ec21..731997455ca 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/context/XmlWebApplicationContextTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/context/XmlWebApplicationContextTests.java @@ -28,7 +28,7 @@ import org.springframework.beans.factory.InitializingBean; import org.springframework.beans.factory.config.BeanFactoryPostProcessor; import org.springframework.beans.factory.config.BeanPostProcessor; import org.springframework.beans.factory.config.ConfigurableListableBeanFactory; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.context.ConfigurableApplicationContext; import org.springframework.context.NoSuchMessageException; import org.springframework.context.test.fixtures.AbstractApplicationContextTests; diff --git a/spring-webmvc/src/test/java/org/springframework/web/context/support/ServletContextSupportTests.java b/spring-webmvc/src/test/java/org/springframework/web/context/support/ServletContextSupportTests.java index 4fffbccb8a7..98b4f0393d9 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/context/support/ServletContextSupportTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/context/support/ServletContextSupportTests.java @@ -27,7 +27,7 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.MutablePropertyValues; import org.springframework.beans.factory.BeanCreationException; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.core.io.Resource; import org.springframework.mock.web.test.MockServletContext; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/DispatcherServletTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/DispatcherServletTests.java index 713e6541e2b..c30dd13348a 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/DispatcherServletTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/DispatcherServletTests.java @@ -32,7 +32,7 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.MutablePropertyValues; import org.springframework.beans.PropertyValue; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.context.ApplicationContextInitializer; import org.springframework.context.ConfigurableApplicationContext; import org.springframework.core.env.ConfigurableEnvironment; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/config/annotation/WebMvcConfigurationSupportExtensionTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/config/annotation/WebMvcConfigurationSupportExtensionTests.java index d03a02418a0..c363455a04c 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/config/annotation/WebMvcConfigurationSupportExtensionTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/config/annotation/WebMvcConfigurationSupportExtensionTests.java @@ -27,7 +27,7 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.springframework.beans.DirectFieldAccessor; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.core.Ordered; import org.springframework.core.convert.converter.Converter; import org.springframework.core.io.FileSystemResourceLoader; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/annotation/ResponseStatusExceptionResolverTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/annotation/ResponseStatusExceptionResolverTests.java index cc7a89378df..6d12cf8be67 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/annotation/ResponseStatusExceptionResolverTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/annotation/ResponseStatusExceptionResolverTests.java @@ -24,7 +24,7 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.springframework.beans.TypeMismatchException; -import org.springframework.beans.test.fixtures.beans.ITestBean; +import org.springframework.beans.testfixture.beans.ITestBean; import org.springframework.context.i18n.LocaleContextHolder; import org.springframework.context.support.StaticMessageSource; import org.springframework.core.annotation.AliasFor; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ExtendedServletRequestDataBinderTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ExtendedServletRequestDataBinderTests.java index 23baef13309..c3a70e71687 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ExtendedServletRequestDataBinderTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ExtendedServletRequestDataBinderTests.java @@ -22,7 +22,7 @@ import java.util.Map; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.web.bind.ServletRequestDataBinder; import org.springframework.web.bind.WebDataBinder; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ModelAndViewResolverMethodReturnValueHandlerTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ModelAndViewResolverMethodReturnValueHandlerTests.java index 86e85f82efe..95972e4f958 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ModelAndViewResolverMethodReturnValueHandlerTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ModelAndViewResolverMethodReturnValueHandlerTests.java @@ -23,7 +23,7 @@ import java.util.List; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.core.MethodParameter; import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.ui.ExtendedModelMap; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/RequestMappingHandlerAdapterIntegrationTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/RequestMappingHandlerAdapterIntegrationTests.java index a4f5e0a2479..bb9f4a9193d 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/RequestMappingHandlerAdapterIntegrationTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/RequestMappingHandlerAdapterIntegrationTests.java @@ -41,7 +41,7 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.propertyeditors.CustomDateEditor; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.core.MethodParameter; import org.springframework.http.CacheControl; import org.springframework.http.HttpEntity; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ServletAnnotationControllerHandlerMethodTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ServletAnnotationControllerHandlerMethodTests.java index 374c3516bed..4896ef437b1 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ServletAnnotationControllerHandlerMethodTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ServletAnnotationControllerHandlerMethodTests.java @@ -70,10 +70,10 @@ import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.config.BeanDefinition; import org.springframework.beans.factory.support.RootBeanDefinition; import org.springframework.beans.propertyeditors.CustomDateEditor; -import org.springframework.beans.test.fixtures.beans.DerivedTestBean; -import org.springframework.beans.test.fixtures.beans.GenericBean; -import org.springframework.beans.test.fixtures.beans.ITestBean; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.DerivedTestBean; +import org.springframework.beans.testfixture.beans.GenericBean; +import org.springframework.beans.testfixture.beans.ITestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.context.annotation.AnnotationConfigUtils; import org.springframework.context.support.PropertySourcesPlaceholderConfigurer; import org.springframework.core.MethodParameter; @@ -288,7 +288,7 @@ public class ServletAnnotationControllerHandlerMethodTests extends AbstractServl request.addParameter("testBeanSet", "1", "2"); MockHttpServletResponse response = new MockHttpServletResponse(); getServlet().service(request, response); - assertThat(response.getContentAsString()).isEqualTo("[1, 2]-org.springframework.beans.test.fixtures.beans.TestBean"); + assertThat(response.getContentAsString()).isEqualTo("[1, 2]-org.springframework.beans.testfixture.beans.TestBean"); } @Test // SPR-12903 diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ServletModelAttributeMethodProcessorTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ServletModelAttributeMethodProcessorTests.java index 125bdeaad65..a5b24086142 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ServletModelAttributeMethodProcessorTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ServletModelAttributeMethodProcessorTests.java @@ -24,7 +24,7 @@ import java.util.Optional; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.core.MethodParameter; import org.springframework.core.convert.support.DefaultConversionService; import org.springframework.mock.web.test.MockHttpServletRequest; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/support/DefaultHandlerExceptionResolverTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/support/DefaultHandlerExceptionResolverTests.java index 2ff58d4947b..167d6cfee19 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/support/DefaultHandlerExceptionResolverTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/support/DefaultHandlerExceptionResolverTests.java @@ -24,7 +24,7 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.ConversionNotSupportedException; import org.springframework.beans.TypeMismatchException; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.core.MethodParameter; import org.springframework.http.MediaType; import org.springframework.http.converter.HttpMessageNotReadableException; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/support/RedirectAttributesModelMapTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/support/RedirectAttributesModelMapTests.java index f0c932b0dfb..9e8da5248e6 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/support/RedirectAttributesModelMapTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/support/RedirectAttributesModelMapTests.java @@ -23,7 +23,7 @@ import java.util.Map; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.core.convert.converter.Converter; import org.springframework.format.support.DefaultFormattingConversionService; import org.springframework.format.support.FormattingConversionService; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/BindTagTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/BindTagTests.java index aa45d57d2c0..d8f92d4de72 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/BindTagTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/BindTagTests.java @@ -30,9 +30,9 @@ import javax.servlet.jsp.tagext.Tag; import org.junit.jupiter.api.Test; import org.springframework.beans.propertyeditors.CustomDateEditor; -import org.springframework.beans.test.fixtures.beans.IndexedTestBean; -import org.springframework.beans.test.fixtures.beans.NestedTestBean; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.IndexedTestBean; +import org.springframework.beans.testfixture.beans.NestedTestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.validation.BindException; import org.springframework.validation.BindingResult; import org.springframework.validation.DataBinder; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/AbstractFormTagTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/AbstractFormTagTests.java index 96d8e54b199..3422b014042 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/AbstractFormTagTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/AbstractFormTagTests.java @@ -18,7 +18,7 @@ package org.springframework.web.servlet.tags.form; import javax.servlet.jsp.JspException; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.mock.web.test.MockPageContext; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/ButtonTagTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/ButtonTagTests.java index 261f8888895..02a4fe58004 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/ButtonTagTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/ButtonTagTests.java @@ -22,7 +22,7 @@ import javax.servlet.jsp.tagext.Tag; import org.junit.jupiter.api.Test; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.TestBean; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/CheckboxTagTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/CheckboxTagTests.java index 7a793ed9577..fc138af091e 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/CheckboxTagTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/CheckboxTagTests.java @@ -34,9 +34,9 @@ import org.dom4j.io.SAXReader; import org.junit.jupiter.api.Test; import org.springframework.beans.propertyeditors.StringTrimmerEditor; -import org.springframework.beans.test.fixtures.beans.Colour; -import org.springframework.beans.test.fixtures.beans.Pet; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.Colour; +import org.springframework.beans.testfixture.beans.Pet; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.validation.BeanPropertyBindingResult; import org.springframework.validation.BindingResult; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/CheckboxesTagTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/CheckboxesTagTests.java index 3d7b5ee82fa..b9a1f5e83e5 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/CheckboxesTagTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/CheckboxesTagTests.java @@ -38,9 +38,9 @@ import org.dom4j.io.SAXReader; import org.junit.jupiter.api.Test; import org.springframework.beans.propertyeditors.StringTrimmerEditor; -import org.springframework.beans.test.fixtures.beans.Colour; -import org.springframework.beans.test.fixtures.beans.Pet; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.Colour; +import org.springframework.beans.testfixture.beans.Pet; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.format.Formatter; import org.springframework.format.support.FormattingConversionService; import org.springframework.util.ObjectUtils; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/ErrorsTagTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/ErrorsTagTests.java index 37083841dff..e0e5a074769 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/ErrorsTagTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/ErrorsTagTests.java @@ -28,7 +28,7 @@ import javax.servlet.jsp.tagext.Tag; import org.junit.jupiter.api.Test; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.mock.web.test.MockBodyContent; import org.springframework.mock.web.test.MockPageContext; import org.springframework.validation.BeanPropertyBindingResult; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/HiddenInputTagTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/HiddenInputTagTests.java index 2e26d9c1a7d..29c95bda559 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/HiddenInputTagTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/HiddenInputTagTests.java @@ -21,7 +21,7 @@ import javax.servlet.jsp.tagext.Tag; import org.junit.jupiter.api.Test; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.validation.BeanPropertyBindingResult; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/InputTagTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/InputTagTests.java index 4ccbd0da443..a68de172d71 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/InputTagTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/InputTagTests.java @@ -23,7 +23,7 @@ import javax.servlet.jsp.tagext.Tag; import org.junit.jupiter.api.Test; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.validation.BeanPropertyBindingResult; import org.springframework.web.servlet.support.BindStatus; import org.springframework.web.servlet.tags.BindTag; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/LabelTagTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/LabelTagTests.java index ed99587c23e..714b71030b5 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/LabelTagTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/LabelTagTests.java @@ -21,7 +21,7 @@ import javax.servlet.jsp.tagext.Tag; import org.junit.jupiter.api.Test; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.mock.web.test.MockPageContext; import org.springframework.web.servlet.tags.NestedPathTag; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/OptionTagEnumTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/OptionTagEnumTests.java index 128d99cb98d..d3783cf3e1f 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/OptionTagEnumTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/OptionTagEnumTests.java @@ -21,8 +21,8 @@ import javax.servlet.jsp.tagext.Tag; import org.junit.jupiter.api.Test; -import org.springframework.beans.test.fixtures.beans.CustomEnum; -import org.springframework.beans.test.fixtures.beans.GenericBean; +import org.springframework.beans.testfixture.beans.CustomEnum; +import org.springframework.beans.testfixture.beans.GenericBean; import org.springframework.web.servlet.support.BindStatus; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/OptionTagTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/OptionTagTests.java index 0cb39f93e37..a1144ddc087 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/OptionTagTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/OptionTagTests.java @@ -28,8 +28,8 @@ import javax.servlet.jsp.tagext.Tag; import org.junit.jupiter.api.Test; import org.springframework.beans.propertyeditors.StringArrayPropertyEditor; -import org.springframework.beans.test.fixtures.beans.Colour; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.Colour; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.mock.web.test.MockBodyContent; import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.util.StringUtils; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/OptionsTagTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/OptionsTagTests.java index 8150e9980c8..3e463443deb 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/OptionsTagTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/OptionsTagTests.java @@ -34,7 +34,7 @@ import org.dom4j.Node; import org.dom4j.io.SAXReader; import org.junit.jupiter.api.Test; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.mock.web.test.MockPageContext; import org.springframework.validation.BeanPropertyBindingResult; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/RadioButtonTagTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/RadioButtonTagTests.java index 4c0141ec900..f8f258627ea 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/RadioButtonTagTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/RadioButtonTagTests.java @@ -28,8 +28,8 @@ import org.dom4j.Element; import org.dom4j.io.SAXReader; import org.junit.jupiter.api.Test; -import org.springframework.beans.test.fixtures.beans.Pet; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.Pet; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.validation.BeanPropertyBindingResult; import org.springframework.validation.BindingResult; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/RadioButtonsTagTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/RadioButtonsTagTests.java index 550afd614f3..e358e678248 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/RadioButtonsTagTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/RadioButtonsTagTests.java @@ -37,9 +37,9 @@ import org.dom4j.io.SAXReader; import org.junit.jupiter.api.Test; import org.springframework.beans.propertyeditors.StringTrimmerEditor; -import org.springframework.beans.test.fixtures.beans.Colour; -import org.springframework.beans.test.fixtures.beans.Pet; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.Colour; +import org.springframework.beans.testfixture.beans.Pet; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.validation.BeanPropertyBindingResult; import org.springframework.validation.BindingResult; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/SelectTagTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/SelectTagTests.java index c2b8f6e8372..7f9b8435c12 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/SelectTagTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/SelectTagTests.java @@ -41,7 +41,7 @@ import org.dom4j.io.SAXReader; import org.junit.jupiter.api.Test; import org.springframework.beans.propertyeditors.CustomCollectionEditor; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.format.Formatter; import org.springframework.format.support.FormattingConversionService; import org.springframework.validation.BeanPropertyBindingResult; @@ -351,7 +351,7 @@ public class SelectTagTests extends AbstractFormTagTests { assertThatExceptionOfType(JspException.class).as("use a non-Collection typed value as the value of 'items'").isThrownBy( this.tag::doStartTag) .withMessageContaining("items") - .withMessageContaining("org.springframework.beans.test.fixtures.beans.TestBean"); + .withMessageContaining("org.springframework.beans.testfixture.beans.TestBean"); } @Test diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/TestBeanWithRealCountry.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/TestBeanWithRealCountry.java index b6e19fee69e..486777de006 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/TestBeanWithRealCountry.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/TestBeanWithRealCountry.java @@ -16,7 +16,7 @@ package org.springframework.web.servlet.tags.form; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.TestBean; /** * @author Juergen Hoeller diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/TextareaTagTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/TextareaTagTests.java index 4887d25c5af..2289023528b 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/TextareaTagTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/tags/form/TextareaTagTests.java @@ -20,7 +20,7 @@ import javax.servlet.jsp.tagext.Tag; import org.junit.jupiter.api.Test; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.validation.BeanPropertyBindingResult; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/view/RedirectViewTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/view/RedirectViewTests.java index 42e3a52c90d..9f3e89696a3 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/view/RedirectViewTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/view/RedirectViewTests.java @@ -26,7 +26,7 @@ import java.util.Map; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.http.HttpStatus; import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.mock.web.test.MockHttpServletResponse; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/view/ViewResolverTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/view/ViewResolverTests.java index 6ba42c614b8..03f2fddaf8a 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/view/ViewResolverTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/view/ViewResolverTests.java @@ -36,7 +36,7 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.MutablePropertyValues; import org.springframework.beans.PropertyValue; import org.springframework.beans.factory.BeanDefinitionStoreException; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.Resource; import org.springframework.mock.web.test.MockHttpServletRequest; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/view/freemarker/FreeMarkerMacroTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/view/freemarker/FreeMarkerMacroTests.java index d57b19d5e86..d11e49e6035 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/view/freemarker/FreeMarkerMacroTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/view/freemarker/FreeMarkerMacroTests.java @@ -32,7 +32,7 @@ import freemarker.template.TemplateException; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; -import org.springframework.beans.test.fixtures.beans.TestBean; +import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.FileSystemResource; import org.springframework.mock.web.test.MockHttpServletRequest; diff --git a/spring-webmvc/src/test/resources/org/springframework/web/context/WEB-INF/ContextLoaderTests-acc-context.xml b/spring-webmvc/src/test/resources/org/springframework/web/context/WEB-INF/ContextLoaderTests-acc-context.xml index 40deeea4b15..0979cd39728 100644 --- a/spring-webmvc/src/test/resources/org/springframework/web/context/WEB-INF/ContextLoaderTests-acc-context.xml +++ b/spring-webmvc/src/test/resources/org/springframework/web/context/WEB-INF/ContextLoaderTests-acc-context.xml @@ -3,7 +3,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd"> - + diff --git a/spring-webmvc/src/test/resources/org/springframework/web/context/WEB-INF/applicationContext.xml b/spring-webmvc/src/test/resources/org/springframework/web/context/WEB-INF/applicationContext.xml index 2bf1093f519..b0d94377dd9 100644 --- a/spring-webmvc/src/test/resources/org/springframework/web/context/WEB-INF/applicationContext.xml +++ b/spring-webmvc/src/test/resources/org/springframework/web/context/WEB-INF/applicationContext.xml @@ -9,7 +9,7 @@ - + - + dummy @@ -45,7 +45,7 @@ Tests of lifecycle callbacks --> + class="org.springframework.beans.testfixture.beans.MustBeInitialized"> 31 - + - + Kerry 34 - + typeMismatch 34x @@ -31,20 +31,20 @@ + class="org.springframework.beans.testfixture.beans.factory.DummyFactory"> + class="org.springframework.beans.testfixture.beans.factory.DummyFactory"> false - + listenerVeto 66 - + diff --git a/spring-webmvc/src/test/resources/org/springframework/web/context/WEB-INF/contextInclude.xml b/spring-webmvc/src/test/resources/org/springframework/web/context/WEB-INF/contextInclude.xml index 5d3eb6c8c9f..37614538bc2 100644 --- a/spring-webmvc/src/test/resources/org/springframework/web/context/WEB-INF/contextInclude.xml +++ b/spring-webmvc/src/test/resources/org/springframework/web/context/WEB-INF/contextInclude.xml @@ -1,6 +1,6 @@ - + yetanotherdummy diff --git a/spring-webmvc/src/test/resources/org/springframework/web/context/WEB-INF/sessionContext.xml b/spring-webmvc/src/test/resources/org/springframework/web/context/WEB-INF/sessionContext.xml index 8d2db6fb21a..bf6fec590f5 100644 --- a/spring-webmvc/src/test/resources/org/springframework/web/context/WEB-INF/sessionContext.xml +++ b/spring-webmvc/src/test/resources/org/springframework/web/context/WEB-INF/sessionContext.xml @@ -3,12 +3,12 @@ - + - + diff --git a/spring-webmvc/src/test/resources/org/springframework/web/context/WEB-INF/test-servlet.xml b/spring-webmvc/src/test/resources/org/springframework/web/context/WEB-INF/test-servlet.xml index 4f444b9176b..78ae8e35af4 100644 --- a/spring-webmvc/src/test/resources/org/springframework/web/context/WEB-INF/test-servlet.xml +++ b/spring-webmvc/src/test/resources/org/springframework/web/context/WEB-INF/test-servlet.xml @@ -15,7 +15,7 @@ - + Rod 31 @@ -28,32 +28,32 @@ 31 - + - + Kerry 34 - + typeMismatch 34x - + - + false - + listenerVeto 66 - + diff --git a/spring-webmvc/src/test/resources/org/springframework/web/context/WEB-INF/testNamespace.xml b/spring-webmvc/src/test/resources/org/springframework/web/context/WEB-INF/testNamespace.xml index 519b5d89821..b898c51cc6d 100644 --- a/spring-webmvc/src/test/resources/org/springframework/web/context/WEB-INF/testNamespace.xml +++ b/spring-webmvc/src/test/resources/org/springframework/web/context/WEB-INF/testNamespace.xml @@ -3,12 +3,12 @@ - + Rod 31 - + Kerry 34 From 726b1bb1d015ca2889f6261d067a4a2b8e7071c8 Mon Sep 17 00:00:00 2001 From: Sam Brannen Date: Sun, 29 Dec 2019 17:41:00 +0100 Subject: [PATCH 06/13] Rename test fixture package in spring-context See gh-23550 --- .../build/testsources/TestSourcesPlugin.java | 15 +++++++++++++++ .../aspectj/AbstractCacheAnnotationTests.java | 2 +- .../AspectJEnableCachingIsolatedTests.java | 12 ++++++------ .../cache/aspectj/AspectJEnableCachingTests.java | 6 +++--- .../cache/config/annotation-cache-aspectj.xml | 4 ++-- .../cache/caffeine/CaffeineCacheTests.java | 2 +- .../cache/ehcache/EhCacheCacheTests.java | 2 +- .../jcache/JCacheEhCacheAnnotationTests.java | 10 +++++----- .../cache/jcache/JCacheEhCacheApiTests.java | 2 +- .../jcache/config/JCacheJavaConfigTests.java | 2 +- .../aop/framework/ProxyFactoryBeanTests.java | 2 +- .../aop/scope/ScopedProxyTests.java | 2 +- .../cache/concurrent/ConcurrentMapCacheTests.java | 2 +- .../config/AnnotationDrivenCacheConfigTests.java | 2 +- .../config/AnnotationNamespaceDrivenTests.java | 2 +- .../cache/config/CacheAdviceNamespaceTests.java | 2 +- .../cache/config/CustomInterceptorTests.java | 6 +++--- .../config/EnableCachingIntegrationTests.java | 6 +++--- .../cache/config/EnableCachingTests.java | 14 +++++++------- .../CacheResolverCustomizationTests.java | 6 +++--- .../cache/interceptor/CacheSyncFailureTests.java | 2 +- ...lassPathFactoryBeanDefinitionScannerTests.java | 2 +- ...thScanningCandidateComponentProviderTests.java | 2 +- .../CommonAnnotationBeanPostProcessorTests.java | 2 +- .../ComponentScanAnnotationIntegrationTests.java | 2 +- .../ComponentScanParserScopedProxyTests.java | 2 +- .../event/ApplicationContextEventTests.java | 4 ++-- .../event/EventPublicationInterceptorTests.java | 2 +- .../CandidateComponentsIndexLoaderTests.java | 2 +- .../StaticApplicationContextMulticasterTests.java | 6 +++--- .../support/StaticApplicationContextTests.java | 6 +++--- .../context/support/StaticMessageSourceTests.java | 6 +++--- .../jndi/JndiObjectFactoryBeanTests.java | 2 +- .../jndi/JndiPropertySourceTests.java | 2 +- .../cache/config/annotationDrivenCacheConfig.xml | 8 ++++---- .../config/annotationDrivenCacheNamespace.xml | 8 ++++---- .../springframework/cache/config/cache-advice.xml | 8 ++++---- .../jmx/export/propertyPlaceholderConfigurer.xml | 2 +- .../AbstractApplicationContextTests.java | 8 ++++---- .../fixtures => testfixture}/SimpleMapScope.java | 2 +- .../fixtures => testfixture}/beans/ACATester.java | 2 +- .../beans/BeanThatBroadcasts.java | 2 +- .../beans/BeanThatListens.java | 2 +- .../beans/TestApplicationListener.java | 2 +- .../cache/AbstractCacheAnnotationTests.java | 8 ++++---- .../cache/AbstractCacheTests.java | 2 +- .../cache/AbstractValueAdaptingCacheTests.java | 2 +- .../cache/CacheTestUtils.java | 2 +- .../cache/SomeCustomKeyGenerator.java | 2 +- .../cache/SomeKeyGenerator.java | 2 +- .../beans/AnnotatedClassCacheableService.java | 2 +- .../cache/beans/CacheableService.java | 2 +- .../cache/beans/DefaultCacheableService.java | 2 +- .../cache/beans/TestEntity.java | 2 +- .../index/CandidateComponentsTestClassLoader.java | 2 +- .../jndi/ExpectedLookupTemplate.java | 4 ++-- .../jndi/SimpleNamingContext.java | 4 ++-- .../jndi/SimpleNamingContextBuilder.java | 2 +- .../DefaultPersistenceUnitManagerTests.java | 2 +- .../PersistenceXmlParsingTests.java | 2 +- .../jpa/support/PersistenceInjectionTests.java | 4 ++-- .../JndiJtaTransactionManagerTests.java | 2 +- .../jta/WebSphereUowTransactionManagerTests.java | 2 +- .../JtaTransactionManagerSerializationTests.java | 2 +- .../support/StandardServletEnvironmentTests.java | 2 +- .../context/XmlWebApplicationContextTests.java | 6 +++--- .../web/context/WEB-INF/applicationContext.xml | 4 ++-- .../web/context/WEB-INF/context-addition.xml | 6 +++--- .../web/context/WEB-INF/test-servlet.xml | 6 +++--- 69 files changed, 139 insertions(+), 124 deletions(-) rename spring-context/src/testFixtures/java/org/springframework/context/{test/fixtures => testfixture}/AbstractApplicationContextTests.java (96%) rename spring-context/src/testFixtures/java/org/springframework/context/{test/fixtures => testfixture}/SimpleMapScope.java (97%) rename spring-context/src/testFixtures/java/org/springframework/context/{test/fixtures => testfixture}/beans/ACATester.java (96%) rename spring-context/src/testFixtures/java/org/springframework/context/{test/fixtures => testfixture}/beans/BeanThatBroadcasts.java (95%) rename spring-context/src/testFixtures/java/org/springframework/context/{test/fixtures => testfixture}/beans/BeanThatListens.java (96%) rename spring-context/src/testFixtures/java/org/springframework/context/{test/fixtures => testfixture}/beans/TestApplicationListener.java (95%) rename spring-context/src/testFixtures/java/org/springframework/context/{test/fixtures => testfixture}/cache/AbstractCacheAnnotationTests.java (98%) rename spring-context/src/testFixtures/java/org/springframework/context/{test/fixtures => testfixture}/cache/AbstractCacheTests.java (99%) rename spring-context/src/testFixtures/java/org/springframework/context/{test/fixtures => testfixture}/cache/AbstractValueAdaptingCacheTests.java (96%) rename spring-context/src/testFixtures/java/org/springframework/context/{test/fixtures => testfixture}/cache/CacheTestUtils.java (97%) rename spring-context/src/testFixtures/java/org/springframework/context/{test/fixtures => testfixture}/cache/SomeCustomKeyGenerator.java (96%) rename spring-context/src/testFixtures/java/org/springframework/context/{test/fixtures => testfixture}/cache/SomeKeyGenerator.java (92%) rename spring-context/src/testFixtures/java/org/springframework/context/{test/fixtures => testfixture}/cache/beans/AnnotatedClassCacheableService.java (99%) rename spring-context/src/testFixtures/java/org/springframework/context/{test/fixtures => testfixture}/cache/beans/CacheableService.java (96%) rename spring-context/src/testFixtures/java/org/springframework/context/{test/fixtures => testfixture}/cache/beans/DefaultCacheableService.java (99%) rename spring-context/src/testFixtures/java/org/springframework/context/{test/fixtures => testfixture}/cache/beans/TestEntity.java (95%) rename spring-context/src/testFixtures/java/org/springframework/context/{test/fixtures => testfixture}/index/CandidateComponentsTestClassLoader.java (98%) rename spring-context/src/testFixtures/java/org/springframework/context/{test/fixtures => testfixture}/jndi/ExpectedLookupTemplate.java (93%) rename spring-context/src/testFixtures/java/org/springframework/context/{test/fixtures => testfixture}/jndi/SimpleNamingContext.java (98%) rename spring-context/src/testFixtures/java/org/springframework/context/{test/fixtures => testfixture}/jndi/SimpleNamingContextBuilder.java (99%) diff --git a/buildSrc/src/main/java/org/springframework/build/testsources/TestSourcesPlugin.java b/buildSrc/src/main/java/org/springframework/build/testsources/TestSourcesPlugin.java index afe853b2845..5bfbd3c3c23 100644 --- a/buildSrc/src/main/java/org/springframework/build/testsources/TestSourcesPlugin.java +++ b/buildSrc/src/main/java/org/springframework/build/testsources/TestSourcesPlugin.java @@ -60,11 +60,26 @@ public class TestSourcesPlugin implements Plugin { *

This is used to assist with the migration to Gradle test fixtures. */ private static final List excludedProjects = Arrays.asList( + // "integration-tests", "spring-beans", "spring-context", "spring-context-indexer", "spring-context-support", "spring-core" + // "spring-expression", + // "spring-instrument", + // "spring-jcl", + // "spring-jdbc", + // "spring-jms", + // "spring-messaging", + // "spring-orm", + // "spring-oxm", + // "spring-test", + // "spring-tx", + // "spring-web", + // "spring-webflux", + // "spring-webmvc", + // "spring-websocket" ); diff --git a/spring-aspects/src/test/java/org/springframework/cache/aspectj/AbstractCacheAnnotationTests.java b/spring-aspects/src/test/java/org/springframework/cache/aspectj/AbstractCacheAnnotationTests.java index 24fd8a30b9a..eed37f21ec0 100644 --- a/spring-aspects/src/test/java/org/springframework/cache/aspectj/AbstractCacheAnnotationTests.java +++ b/spring-aspects/src/test/java/org/springframework/cache/aspectj/AbstractCacheAnnotationTests.java @@ -31,7 +31,7 @@ import org.springframework.cache.config.AnnotatedClassCacheableService; import org.springframework.cache.config.CacheableService; import org.springframework.cache.config.TestEntity; import org.springframework.context.ConfigurableApplicationContext; -import org.springframework.context.test.fixtures.cache.SomeCustomKeyGenerator; +import org.springframework.context.testfixture.cache.SomeCustomKeyGenerator; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; diff --git a/spring-aspects/src/test/java/org/springframework/cache/aspectj/AspectJEnableCachingIsolatedTests.java b/spring-aspects/src/test/java/org/springframework/cache/aspectj/AspectJEnableCachingIsolatedTests.java index 686acc54851..7ca1037efbc 100644 --- a/spring-aspects/src/test/java/org/springframework/cache/aspectj/AspectJEnableCachingIsolatedTests.java +++ b/spring-aspects/src/test/java/org/springframework/cache/aspectj/AspectJEnableCachingIsolatedTests.java @@ -36,12 +36,12 @@ import org.springframework.context.annotation.AdviceMode; import org.springframework.context.annotation.AnnotationConfigApplicationContext; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; -import org.springframework.context.test.fixtures.cache.CacheTestUtils; -import org.springframework.context.test.fixtures.cache.SomeCustomKeyGenerator; -import org.springframework.context.test.fixtures.cache.SomeKeyGenerator; -import org.springframework.context.test.fixtures.cache.beans.AnnotatedClassCacheableService; -import org.springframework.context.test.fixtures.cache.beans.CacheableService; -import org.springframework.context.test.fixtures.cache.beans.DefaultCacheableService; +import org.springframework.context.testfixture.cache.CacheTestUtils; +import org.springframework.context.testfixture.cache.SomeCustomKeyGenerator; +import org.springframework.context.testfixture.cache.SomeKeyGenerator; +import org.springframework.context.testfixture.cache.beans.AnnotatedClassCacheableService; +import org.springframework.context.testfixture.cache.beans.CacheableService; +import org.springframework.context.testfixture.cache.beans.DefaultCacheableService; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-aspects/src/test/java/org/springframework/cache/aspectj/AspectJEnableCachingTests.java b/spring-aspects/src/test/java/org/springframework/cache/aspectj/AspectJEnableCachingTests.java index 8fc14ff0452..7e693d6ea13 100644 --- a/spring-aspects/src/test/java/org/springframework/cache/aspectj/AspectJEnableCachingTests.java +++ b/spring-aspects/src/test/java/org/springframework/cache/aspectj/AspectJEnableCachingTests.java @@ -30,9 +30,9 @@ import org.springframework.context.annotation.AdviceMode; import org.springframework.context.annotation.AnnotationConfigApplicationContext; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; -import org.springframework.context.test.fixtures.cache.CacheTestUtils; -import org.springframework.context.test.fixtures.cache.SomeCustomKeyGenerator; -import org.springframework.context.test.fixtures.cache.SomeKeyGenerator; +import org.springframework.context.testfixture.cache.CacheTestUtils; +import org.springframework.context.testfixture.cache.SomeCustomKeyGenerator; +import org.springframework.context.testfixture.cache.SomeKeyGenerator; /** * @author Stephane Nicoll diff --git a/spring-aspects/src/test/resources/org/springframework/cache/config/annotation-cache-aspectj.xml b/spring-aspects/src/test/resources/org/springframework/cache/config/annotation-cache-aspectj.xml index f9df2c29bf7..1a283f6f6d8 100644 --- a/spring-aspects/src/test/resources/org/springframework/cache/config/annotation-cache-aspectj.xml +++ b/spring-aspects/src/test/resources/org/springframework/cache/config/annotation-cache-aspectj.xml @@ -22,7 +22,7 @@ - + @@ -40,7 +40,7 @@ - + diff --git a/spring-context-support/src/test/java/org/springframework/cache/caffeine/CaffeineCacheTests.java b/spring-context-support/src/test/java/org/springframework/cache/caffeine/CaffeineCacheTests.java index 07af88796fb..48e1fd5a939 100644 --- a/spring-context-support/src/test/java/org/springframework/cache/caffeine/CaffeineCacheTests.java +++ b/spring-context-support/src/test/java/org/springframework/cache/caffeine/CaffeineCacheTests.java @@ -21,7 +21,7 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.springframework.cache.Cache; -import org.springframework.context.test.fixtures.cache.AbstractValueAdaptingCacheTests; +import org.springframework.context.testfixture.cache.AbstractValueAdaptingCacheTests; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-context-support/src/test/java/org/springframework/cache/ehcache/EhCacheCacheTests.java b/spring-context-support/src/test/java/org/springframework/cache/ehcache/EhCacheCacheTests.java index eff54703337..b9bb1cc8542 100644 --- a/spring-context-support/src/test/java/org/springframework/cache/ehcache/EhCacheCacheTests.java +++ b/spring-context-support/src/test/java/org/springframework/cache/ehcache/EhCacheCacheTests.java @@ -25,7 +25,7 @@ import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; -import org.springframework.context.test.fixtures.cache.AbstractCacheTests; +import org.springframework.context.testfixture.cache.AbstractCacheTests; import org.springframework.core.testfixture.EnabledForTestGroups; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-context-support/src/test/java/org/springframework/cache/jcache/JCacheEhCacheAnnotationTests.java b/spring-context-support/src/test/java/org/springframework/cache/jcache/JCacheEhCacheAnnotationTests.java index bb7741478f1..16bf5623548 100644 --- a/spring-context-support/src/test/java/org/springframework/cache/jcache/JCacheEhCacheAnnotationTests.java +++ b/spring-context-support/src/test/java/org/springframework/cache/jcache/JCacheEhCacheAnnotationTests.java @@ -34,11 +34,11 @@ import org.springframework.context.ConfigurableApplicationContext; import org.springframework.context.annotation.AnnotationConfigApplicationContext; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; -import org.springframework.context.test.fixtures.cache.AbstractCacheAnnotationTests; -import org.springframework.context.test.fixtures.cache.SomeCustomKeyGenerator; -import org.springframework.context.test.fixtures.cache.beans.AnnotatedClassCacheableService; -import org.springframework.context.test.fixtures.cache.beans.CacheableService; -import org.springframework.context.test.fixtures.cache.beans.DefaultCacheableService; +import org.springframework.context.testfixture.cache.AbstractCacheAnnotationTests; +import org.springframework.context.testfixture.cache.SomeCustomKeyGenerator; +import org.springframework.context.testfixture.cache.beans.AnnotatedClassCacheableService; +import org.springframework.context.testfixture.cache.beans.CacheableService; +import org.springframework.context.testfixture.cache.beans.DefaultCacheableService; import org.springframework.tests.transaction.CallCountingTransactionManager; import org.springframework.transaction.support.TransactionTemplate; diff --git a/spring-context-support/src/test/java/org/springframework/cache/jcache/JCacheEhCacheApiTests.java b/spring-context-support/src/test/java/org/springframework/cache/jcache/JCacheEhCacheApiTests.java index 4f9adba6ee8..b826e2a3fb3 100644 --- a/spring-context-support/src/test/java/org/springframework/cache/jcache/JCacheEhCacheApiTests.java +++ b/spring-context-support/src/test/java/org/springframework/cache/jcache/JCacheEhCacheApiTests.java @@ -25,7 +25,7 @@ import javax.cache.spi.CachingProvider; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; -import org.springframework.context.test.fixtures.cache.AbstractValueAdaptingCacheTests; +import org.springframework.context.testfixture.cache.AbstractValueAdaptingCacheTests; /** * @author Stephane Nicoll diff --git a/spring-context-support/src/test/java/org/springframework/cache/jcache/config/JCacheJavaConfigTests.java b/spring-context-support/src/test/java/org/springframework/cache/jcache/config/JCacheJavaConfigTests.java index e8c4275823f..9288994fc6f 100644 --- a/spring-context-support/src/test/java/org/springframework/cache/jcache/config/JCacheJavaConfigTests.java +++ b/spring-context-support/src/test/java/org/springframework/cache/jcache/config/JCacheJavaConfigTests.java @@ -42,7 +42,7 @@ import org.springframework.context.ConfigurableApplicationContext; import org.springframework.context.annotation.AnnotationConfigApplicationContext; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; -import org.springframework.context.test.fixtures.cache.SomeKeyGenerator; +import org.springframework.context.testfixture.cache.SomeKeyGenerator; import org.springframework.contextsupport.testfixture.jcache.AbstractJCacheAnnotationTests; import org.springframework.contextsupport.testfixture.jcache.JCacheableService; diff --git a/spring-context/src/test/java/org/springframework/aop/framework/ProxyFactoryBeanTests.java b/spring-context/src/test/java/org/springframework/aop/framework/ProxyFactoryBeanTests.java index dd8e884664d..af7507470a1 100644 --- a/spring-context/src/test/java/org/springframework/aop/framework/ProxyFactoryBeanTests.java +++ b/spring-context/src/test/java/org/springframework/aop/framework/ProxyFactoryBeanTests.java @@ -50,7 +50,7 @@ import org.springframework.beans.testfixture.beans.Person; import org.springframework.beans.testfixture.beans.SideEffectBean; import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.context.ApplicationListener; -import org.springframework.context.test.fixtures.beans.TestApplicationListener; +import org.springframework.context.testfixture.beans.TestApplicationListener; import org.springframework.core.io.ClassPathResource; import org.springframework.core.testfixture.TimeStamped; import org.springframework.core.testfixture.io.SerializationTestUtils; diff --git a/spring-context/src/test/java/org/springframework/aop/scope/ScopedProxyTests.java b/spring-context/src/test/java/org/springframework/aop/scope/ScopedProxyTests.java index 7b6cb703a7b..7ef136b9827 100644 --- a/spring-context/src/test/java/org/springframework/aop/scope/ScopedProxyTests.java +++ b/spring-context/src/test/java/org/springframework/aop/scope/ScopedProxyTests.java @@ -28,7 +28,7 @@ import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; import org.springframework.beans.testfixture.beans.ITestBean; import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.context.support.GenericApplicationContext; -import org.springframework.context.test.fixtures.SimpleMapScope; +import org.springframework.context.testfixture.SimpleMapScope; import org.springframework.core.io.ClassPathResource; import org.springframework.core.testfixture.io.SerializationTestUtils; diff --git a/spring-context/src/test/java/org/springframework/cache/concurrent/ConcurrentMapCacheTests.java b/spring-context/src/test/java/org/springframework/cache/concurrent/ConcurrentMapCacheTests.java index e933a9bf028..5ac1d4b225e 100644 --- a/spring-context/src/test/java/org/springframework/cache/concurrent/ConcurrentMapCacheTests.java +++ b/spring-context/src/test/java/org/springframework/cache/concurrent/ConcurrentMapCacheTests.java @@ -25,7 +25,7 @@ import java.util.concurrent.ConcurrentMap; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; -import org.springframework.context.test.fixtures.cache.AbstractValueAdaptingCacheTests; +import org.springframework.context.testfixture.cache.AbstractValueAdaptingCacheTests; import org.springframework.core.serializer.support.SerializationDelegate; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-context/src/test/java/org/springframework/cache/config/AnnotationDrivenCacheConfigTests.java b/spring-context/src/test/java/org/springframework/cache/config/AnnotationDrivenCacheConfigTests.java index 1e99b6f7965..7940c65b25d 100644 --- a/spring-context/src/test/java/org/springframework/cache/config/AnnotationDrivenCacheConfigTests.java +++ b/spring-context/src/test/java/org/springframework/cache/config/AnnotationDrivenCacheConfigTests.java @@ -18,7 +18,7 @@ package org.springframework.cache.config; import org.springframework.context.ConfigurableApplicationContext; import org.springframework.context.support.GenericXmlApplicationContext; -import org.springframework.context.test.fixtures.cache.AbstractCacheAnnotationTests; +import org.springframework.context.testfixture.cache.AbstractCacheAnnotationTests; /** * @author Costin Leau diff --git a/spring-context/src/test/java/org/springframework/cache/config/AnnotationNamespaceDrivenTests.java b/spring-context/src/test/java/org/springframework/cache/config/AnnotationNamespaceDrivenTests.java index e032e367422..230337961b8 100644 --- a/spring-context/src/test/java/org/springframework/cache/config/AnnotationNamespaceDrivenTests.java +++ b/spring-context/src/test/java/org/springframework/cache/config/AnnotationNamespaceDrivenTests.java @@ -22,7 +22,7 @@ import org.springframework.cache.interceptor.CacheErrorHandler; import org.springframework.cache.interceptor.CacheInterceptor; import org.springframework.context.ConfigurableApplicationContext; import org.springframework.context.support.GenericXmlApplicationContext; -import org.springframework.context.test.fixtures.cache.AbstractCacheAnnotationTests; +import org.springframework.context.testfixture.cache.AbstractCacheAnnotationTests; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-context/src/test/java/org/springframework/cache/config/CacheAdviceNamespaceTests.java b/spring-context/src/test/java/org/springframework/cache/config/CacheAdviceNamespaceTests.java index 5b679a3269e..f15aa696f16 100644 --- a/spring-context/src/test/java/org/springframework/cache/config/CacheAdviceNamespaceTests.java +++ b/spring-context/src/test/java/org/springframework/cache/config/CacheAdviceNamespaceTests.java @@ -21,7 +21,7 @@ import org.junit.jupiter.api.Test; import org.springframework.cache.interceptor.CacheInterceptor; import org.springframework.context.ConfigurableApplicationContext; import org.springframework.context.support.GenericXmlApplicationContext; -import org.springframework.context.test.fixtures.cache.AbstractCacheAnnotationTests; +import org.springframework.context.testfixture.cache.AbstractCacheAnnotationTests; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-context/src/test/java/org/springframework/cache/config/CustomInterceptorTests.java b/spring-context/src/test/java/org/springframework/cache/config/CustomInterceptorTests.java index b94b3811de4..1d83c6d00b3 100644 --- a/spring-context/src/test/java/org/springframework/cache/config/CustomInterceptorTests.java +++ b/spring-context/src/test/java/org/springframework/cache/config/CustomInterceptorTests.java @@ -32,9 +32,9 @@ import org.springframework.context.ConfigurableApplicationContext; import org.springframework.context.annotation.AnnotationConfigApplicationContext; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; -import org.springframework.context.test.fixtures.cache.CacheTestUtils; -import org.springframework.context.test.fixtures.cache.beans.CacheableService; -import org.springframework.context.test.fixtures.cache.beans.DefaultCacheableService; +import org.springframework.context.testfixture.cache.CacheTestUtils; +import org.springframework.context.testfixture.cache.beans.CacheableService; +import org.springframework.context.testfixture.cache.beans.DefaultCacheableService; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; diff --git a/spring-context/src/test/java/org/springframework/cache/config/EnableCachingIntegrationTests.java b/spring-context/src/test/java/org/springframework/cache/config/EnableCachingIntegrationTests.java index 2b1de9a12f1..0d55805af6c 100644 --- a/spring-context/src/test/java/org/springframework/cache/config/EnableCachingIntegrationTests.java +++ b/spring-context/src/test/java/org/springframework/cache/config/EnableCachingIntegrationTests.java @@ -33,13 +33,13 @@ import org.springframework.context.annotation.AnnotationConfigApplicationContext import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; -import org.springframework.context.test.fixtures.cache.CacheTestUtils; +import org.springframework.context.testfixture.cache.CacheTestUtils; import org.springframework.core.env.Environment; import org.springframework.mock.env.MockEnvironment; import static org.assertj.core.api.Assertions.assertThat; -import static org.springframework.context.test.fixtures.cache.CacheTestUtils.assertCacheHit; -import static org.springframework.context.test.fixtures.cache.CacheTestUtils.assertCacheMiss; +import static org.springframework.context.testfixture.cache.CacheTestUtils.assertCacheHit; +import static org.springframework.context.testfixture.cache.CacheTestUtils.assertCacheMiss; /** * Tests that represent real use cases with advanced configuration. diff --git a/spring-context/src/test/java/org/springframework/cache/config/EnableCachingTests.java b/spring-context/src/test/java/org/springframework/cache/config/EnableCachingTests.java index 551b28c50fd..fae93b5a59d 100644 --- a/spring-context/src/test/java/org/springframework/cache/config/EnableCachingTests.java +++ b/spring-context/src/test/java/org/springframework/cache/config/EnableCachingTests.java @@ -34,13 +34,13 @@ import org.springframework.context.ConfigurableApplicationContext; import org.springframework.context.annotation.AnnotationConfigApplicationContext; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; -import org.springframework.context.test.fixtures.cache.AbstractCacheAnnotationTests; -import org.springframework.context.test.fixtures.cache.CacheTestUtils; -import org.springframework.context.test.fixtures.cache.SomeCustomKeyGenerator; -import org.springframework.context.test.fixtures.cache.SomeKeyGenerator; -import org.springframework.context.test.fixtures.cache.beans.AnnotatedClassCacheableService; -import org.springframework.context.test.fixtures.cache.beans.CacheableService; -import org.springframework.context.test.fixtures.cache.beans.DefaultCacheableService; +import org.springframework.context.testfixture.cache.AbstractCacheAnnotationTests; +import org.springframework.context.testfixture.cache.CacheTestUtils; +import org.springframework.context.testfixture.cache.SomeCustomKeyGenerator; +import org.springframework.context.testfixture.cache.SomeKeyGenerator; +import org.springframework.context.testfixture.cache.beans.AnnotatedClassCacheableService; +import org.springframework.context.testfixture.cache.beans.CacheableService; +import org.springframework.context.testfixture.cache.beans.DefaultCacheableService; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-context/src/test/java/org/springframework/cache/interceptor/CacheResolverCustomizationTests.java b/spring-context/src/test/java/org/springframework/cache/interceptor/CacheResolverCustomizationTests.java index 45e3d575327..ca2e76fc36f 100644 --- a/spring-context/src/test/java/org/springframework/cache/interceptor/CacheResolverCustomizationTests.java +++ b/spring-context/src/test/java/org/springframework/cache/interceptor/CacheResolverCustomizationTests.java @@ -35,15 +35,15 @@ import org.springframework.context.ApplicationContext; import org.springframework.context.annotation.AnnotationConfigApplicationContext; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; -import org.springframework.context.test.fixtures.cache.CacheTestUtils; +import org.springframework.context.testfixture.cache.CacheTestUtils; import org.springframework.lang.Nullable; import org.springframework.util.ReflectionUtils; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; import static org.assertj.core.api.Assertions.assertThatIllegalStateException; -import static org.springframework.context.test.fixtures.cache.CacheTestUtils.assertCacheHit; -import static org.springframework.context.test.fixtures.cache.CacheTestUtils.assertCacheMiss; +import static org.springframework.context.testfixture.cache.CacheTestUtils.assertCacheHit; +import static org.springframework.context.testfixture.cache.CacheTestUtils.assertCacheMiss; /** * Provides various {@link CacheResolver} customisations scenario diff --git a/spring-context/src/test/java/org/springframework/cache/interceptor/CacheSyncFailureTests.java b/spring-context/src/test/java/org/springframework/cache/interceptor/CacheSyncFailureTests.java index cc5ffb06344..2a3eccc6db7 100644 --- a/spring-context/src/test/java/org/springframework/cache/interceptor/CacheSyncFailureTests.java +++ b/spring-context/src/test/java/org/springframework/cache/interceptor/CacheSyncFailureTests.java @@ -32,7 +32,7 @@ import org.springframework.context.ConfigurableApplicationContext; import org.springframework.context.annotation.AnnotationConfigApplicationContext; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; -import org.springframework.context.test.fixtures.cache.CacheTestUtils; +import org.springframework.context.testfixture.cache.CacheTestUtils; import static org.assertj.core.api.Assertions.assertThatIllegalStateException; diff --git a/spring-context/src/test/java/org/springframework/context/annotation/ClassPathFactoryBeanDefinitionScannerTests.java b/spring-context/src/test/java/org/springframework/context/annotation/ClassPathFactoryBeanDefinitionScannerTests.java index a15cc4c7687..09498371ab7 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/ClassPathFactoryBeanDefinitionScannerTests.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/ClassPathFactoryBeanDefinitionScannerTests.java @@ -28,7 +28,7 @@ import org.springframework.context.annotation4.DependencyBean; import org.springframework.context.annotation4.FactoryMethodComponent; import org.springframework.context.support.AbstractApplicationContext; import org.springframework.context.support.GenericApplicationContext; -import org.springframework.context.test.fixtures.SimpleMapScope; +import org.springframework.context.testfixture.SimpleMapScope; import org.springframework.util.ClassUtils; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-context/src/test/java/org/springframework/context/annotation/ClassPathScanningCandidateComponentProviderTests.java b/spring-context/src/test/java/org/springframework/context/annotation/ClassPathScanningCandidateComponentProviderTests.java index 949fbd356d1..7b63c97ad84 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/ClassPathScanningCandidateComponentProviderTests.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/ClassPathScanningCandidateComponentProviderTests.java @@ -42,7 +42,7 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.AnnotatedGenericBeanDefinition; import org.springframework.beans.factory.config.BeanDefinition; -import org.springframework.context.test.fixtures.index.CandidateComponentsTestClassLoader; +import org.springframework.context.testfixture.index.CandidateComponentsTestClassLoader; import org.springframework.core.env.ConfigurableEnvironment; import org.springframework.core.env.StandardEnvironment; import org.springframework.core.io.ClassPathResource; diff --git a/spring-context/src/test/java/org/springframework/context/annotation/CommonAnnotationBeanPostProcessorTests.java b/spring-context/src/test/java/org/springframework/context/annotation/CommonAnnotationBeanPostProcessorTests.java index 7c1fa7016aa..631ca5644f9 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/CommonAnnotationBeanPostProcessorTests.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/CommonAnnotationBeanPostProcessorTests.java @@ -41,7 +41,7 @@ import org.springframework.beans.testfixture.beans.ITestBean; import org.springframework.beans.testfixture.beans.NestedTestBean; import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.context.support.GenericApplicationContext; -import org.springframework.context.test.fixtures.jndi.ExpectedLookupTemplate; +import org.springframework.context.testfixture.jndi.ExpectedLookupTemplate; import org.springframework.core.testfixture.io.SerializationTestUtils; import org.springframework.jndi.support.SimpleJndiBeanFactory; diff --git a/spring-context/src/test/java/org/springframework/context/annotation/ComponentScanAnnotationIntegrationTests.java b/spring-context/src/test/java/org/springframework/context/annotation/ComponentScanAnnotationIntegrationTests.java index 25061f5a045..9e203c4b631 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/ComponentScanAnnotationIntegrationTests.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/ComponentScanAnnotationIntegrationTests.java @@ -51,7 +51,7 @@ import org.springframework.context.annotation.ComponentScanParserTests.KustomAnn import org.springframework.context.annotation.componentscan.simple.ClassWithNestedComponents; import org.springframework.context.annotation.componentscan.simple.SimpleComponent; import org.springframework.context.support.GenericApplicationContext; -import org.springframework.context.test.fixtures.SimpleMapScope; +import org.springframework.context.testfixture.SimpleMapScope; import org.springframework.core.env.ConfigurableEnvironment; import org.springframework.core.env.Environment; import org.springframework.core.env.Profiles; diff --git a/spring-context/src/test/java/org/springframework/context/annotation/ComponentScanParserScopedProxyTests.java b/spring-context/src/test/java/org/springframework/context/annotation/ComponentScanParserScopedProxyTests.java index e0669373f71..cea9f6af5d1 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/ComponentScanParserScopedProxyTests.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/ComponentScanParserScopedProxyTests.java @@ -23,7 +23,7 @@ import org.junit.jupiter.api.Test; import org.springframework.aop.support.AopUtils; import org.springframework.beans.factory.parsing.BeanDefinitionParsingException; import org.springframework.context.support.ClassPathXmlApplicationContext; -import org.springframework.context.test.fixtures.SimpleMapScope; +import org.springframework.context.testfixture.SimpleMapScope; import org.springframework.core.testfixture.io.SerializationTestUtils; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-context/src/test/java/org/springframework/context/event/ApplicationContextEventTests.java b/spring-context/src/test/java/org/springframework/context/event/ApplicationContextEventTests.java index 49cc3f85e97..2e92dbcaa19 100644 --- a/spring-context/src/test/java/org/springframework/context/event/ApplicationContextEventTests.java +++ b/spring-context/src/test/java/org/springframework/context/event/ApplicationContextEventTests.java @@ -41,8 +41,8 @@ import org.springframework.context.support.AbstractApplicationContext; import org.springframework.context.support.GenericApplicationContext; import org.springframework.context.support.StaticApplicationContext; import org.springframework.context.support.StaticMessageSource; -import org.springframework.context.test.fixtures.beans.BeanThatBroadcasts; -import org.springframework.context.test.fixtures.beans.BeanThatListens; +import org.springframework.context.testfixture.beans.BeanThatBroadcasts; +import org.springframework.context.testfixture.beans.BeanThatListens; import org.springframework.core.Ordered; import org.springframework.core.ResolvableType; import org.springframework.core.annotation.Order; diff --git a/spring-context/src/test/java/org/springframework/context/event/EventPublicationInterceptorTests.java b/spring-context/src/test/java/org/springframework/context/event/EventPublicationInterceptorTests.java index 72e593f7d4e..ace9382ee7f 100644 --- a/spring-context/src/test/java/org/springframework/context/event/EventPublicationInterceptorTests.java +++ b/spring-context/src/test/java/org/springframework/context/event/EventPublicationInterceptorTests.java @@ -28,7 +28,7 @@ import org.springframework.context.ApplicationEvent; import org.springframework.context.ApplicationEventPublisher; import org.springframework.context.event.test.TestEvent; import org.springframework.context.support.StaticApplicationContext; -import org.springframework.context.test.fixtures.beans.TestApplicationListener; +import org.springframework.context.testfixture.beans.TestApplicationListener; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException; diff --git a/spring-context/src/test/java/org/springframework/context/index/CandidateComponentsIndexLoaderTests.java b/spring-context/src/test/java/org/springframework/context/index/CandidateComponentsIndexLoaderTests.java index 402dc3cdb77..2eac4a6688b 100644 --- a/spring-context/src/test/java/org/springframework/context/index/CandidateComponentsIndexLoaderTests.java +++ b/spring-context/src/test/java/org/springframework/context/index/CandidateComponentsIndexLoaderTests.java @@ -21,7 +21,7 @@ import java.util.Set; import org.junit.jupiter.api.Test; -import org.springframework.context.test.fixtures.index.CandidateComponentsTestClassLoader; +import org.springframework.context.testfixture.index.CandidateComponentsTestClassLoader; import org.springframework.core.io.ClassPathResource; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-context/src/test/java/org/springframework/context/support/StaticApplicationContextMulticasterTests.java b/spring-context/src/test/java/org/springframework/context/support/StaticApplicationContextMulticasterTests.java index c3fbc6818a4..403bf613bef 100644 --- a/spring-context/src/test/java/org/springframework/context/support/StaticApplicationContextMulticasterTests.java +++ b/spring-context/src/test/java/org/springframework/context/support/StaticApplicationContextMulticasterTests.java @@ -28,9 +28,9 @@ import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.context.ApplicationEvent; import org.springframework.context.ConfigurableApplicationContext; import org.springframework.context.event.SimpleApplicationEventMulticaster; -import org.springframework.context.test.fixtures.AbstractApplicationContextTests; -import org.springframework.context.test.fixtures.beans.ACATester; -import org.springframework.context.test.fixtures.beans.BeanThatListens; +import org.springframework.context.testfixture.AbstractApplicationContextTests; +import org.springframework.context.testfixture.beans.ACATester; +import org.springframework.context.testfixture.beans.BeanThatListens; import org.springframework.core.ResolvableType; import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.Resource; diff --git a/spring-context/src/test/java/org/springframework/context/support/StaticApplicationContextTests.java b/spring-context/src/test/java/org/springframework/context/support/StaticApplicationContextTests.java index ac15f3bcaee..91c06a88da4 100644 --- a/spring-context/src/test/java/org/springframework/context/support/StaticApplicationContextTests.java +++ b/spring-context/src/test/java/org/springframework/context/support/StaticApplicationContextTests.java @@ -26,9 +26,9 @@ import org.springframework.beans.MutablePropertyValues; import org.springframework.beans.factory.support.PropertiesBeanDefinitionReader; import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.context.ConfigurableApplicationContext; -import org.springframework.context.test.fixtures.AbstractApplicationContextTests; -import org.springframework.context.test.fixtures.beans.ACATester; -import org.springframework.context.test.fixtures.beans.BeanThatListens; +import org.springframework.context.testfixture.AbstractApplicationContextTests; +import org.springframework.context.testfixture.beans.ACATester; +import org.springframework.context.testfixture.beans.BeanThatListens; import org.springframework.core.io.ClassPathResource; /** diff --git a/spring-context/src/test/java/org/springframework/context/support/StaticMessageSourceTests.java b/spring-context/src/test/java/org/springframework/context/support/StaticMessageSourceTests.java index 40771a9c6ca..d9c07360757 100644 --- a/spring-context/src/test/java/org/springframework/context/support/StaticMessageSourceTests.java +++ b/spring-context/src/test/java/org/springframework/context/support/StaticMessageSourceTests.java @@ -29,9 +29,9 @@ import org.springframework.beans.factory.support.PropertiesBeanDefinitionReader; import org.springframework.context.ConfigurableApplicationContext; import org.springframework.context.MessageSourceResolvable; import org.springframework.context.NoSuchMessageException; -import org.springframework.context.test.fixtures.AbstractApplicationContextTests; -import org.springframework.context.test.fixtures.beans.ACATester; -import org.springframework.context.test.fixtures.beans.BeanThatListens; +import org.springframework.context.testfixture.AbstractApplicationContextTests; +import org.springframework.context.testfixture.beans.ACATester; +import org.springframework.context.testfixture.beans.BeanThatListens; import org.springframework.core.io.ClassPathResource; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-context/src/test/java/org/springframework/jndi/JndiObjectFactoryBeanTests.java b/spring-context/src/test/java/org/springframework/jndi/JndiObjectFactoryBeanTests.java index f7660b85815..bf2e42a6c59 100644 --- a/spring-context/src/test/java/org/springframework/jndi/JndiObjectFactoryBeanTests.java +++ b/spring-context/src/test/java/org/springframework/jndi/JndiObjectFactoryBeanTests.java @@ -25,7 +25,7 @@ import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.testfixture.beans.DerivedTestBean; import org.springframework.beans.testfixture.beans.ITestBean; import org.springframework.beans.testfixture.beans.TestBean; -import org.springframework.context.test.fixtures.jndi.ExpectedLookupTemplate; +import org.springframework.context.testfixture.jndi.ExpectedLookupTemplate; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; diff --git a/spring-context/src/test/java/org/springframework/jndi/JndiPropertySourceTests.java b/spring-context/src/test/java/org/springframework/jndi/JndiPropertySourceTests.java index e2e55593ba5..9ece68cea27 100644 --- a/spring-context/src/test/java/org/springframework/jndi/JndiPropertySourceTests.java +++ b/spring-context/src/test/java/org/springframework/jndi/JndiPropertySourceTests.java @@ -21,7 +21,7 @@ import javax.naming.NamingException; import org.junit.jupiter.api.Test; -import org.springframework.context.test.fixtures.jndi.SimpleNamingContext; +import org.springframework.context.testfixture.jndi.SimpleNamingContext; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-context/src/test/resources/org/springframework/cache/config/annotationDrivenCacheConfig.xml b/spring-context/src/test/resources/org/springframework/cache/config/annotationDrivenCacheConfig.xml index 430783e5993..0057278c489 100644 --- a/spring-context/src/test/resources/org/springframework/cache/config/annotationDrivenCacheConfig.xml +++ b/spring-context/src/test/resources/org/springframework/cache/config/annotationDrivenCacheConfig.xml @@ -36,13 +36,13 @@ - + - + - + - + diff --git a/spring-context/src/test/resources/org/springframework/cache/config/annotationDrivenCacheNamespace.xml b/spring-context/src/test/resources/org/springframework/cache/config/annotationDrivenCacheNamespace.xml index 0b914d6a989..9cffaef012c 100644 --- a/spring-context/src/test/resources/org/springframework/cache/config/annotationDrivenCacheNamespace.xml +++ b/spring-context/src/test/resources/org/springframework/cache/config/annotationDrivenCacheNamespace.xml @@ -26,15 +26,15 @@ - + - + - + - + diff --git a/spring-context/src/test/resources/org/springframework/cache/config/cache-advice.xml b/spring-context/src/test/resources/org/springframework/cache/config/cache-advice.xml index dc68f1adfcf..ea6901d7a26 100644 --- a/spring-context/src/test/resources/org/springframework/cache/config/cache-advice.xml +++ b/spring-context/src/test/resources/org/springframework/cache/config/cache-advice.xml @@ -112,9 +112,9 @@ - + - + @@ -126,7 +126,7 @@ - + - + diff --git a/spring-context/src/test/resources/org/springframework/jmx/export/propertyPlaceholderConfigurer.xml b/spring-context/src/test/resources/org/springframework/jmx/export/propertyPlaceholderConfigurer.xml index 39e7db19653..40d1791c6d0 100644 --- a/spring-context/src/test/resources/org/springframework/jmx/export/propertyPlaceholderConfigurer.xml +++ b/spring-context/src/test/resources/org/springframework/jmx/export/propertyPlaceholderConfigurer.xml @@ -17,7 +17,7 @@ - + diff --git a/spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/AbstractApplicationContextTests.java b/spring-context/src/testFixtures/java/org/springframework/context/testfixture/AbstractApplicationContextTests.java similarity index 96% rename from spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/AbstractApplicationContextTests.java rename to spring-context/src/testFixtures/java/org/springframework/context/testfixture/AbstractApplicationContextTests.java index 929c804943b..e3ba64f369f 100644 --- a/spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/AbstractApplicationContextTests.java +++ b/spring-context/src/testFixtures/java/org/springframework/context/testfixture/AbstractApplicationContextTests.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.context.test.fixtures; +package org.springframework.context.testfixture; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; @@ -33,9 +33,9 @@ import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationEvent; import org.springframework.context.ConfigurableApplicationContext; import org.springframework.context.NoSuchMessageException; -import org.springframework.context.test.fixtures.beans.ACATester; -import org.springframework.context.test.fixtures.beans.BeanThatListens; -import org.springframework.context.test.fixtures.beans.TestApplicationListener; +import org.springframework.context.testfixture.beans.ACATester; +import org.springframework.context.testfixture.beans.BeanThatListens; +import org.springframework.context.testfixture.beans.TestApplicationListener; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; diff --git a/spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/SimpleMapScope.java b/spring-context/src/testFixtures/java/org/springframework/context/testfixture/SimpleMapScope.java similarity index 97% rename from spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/SimpleMapScope.java rename to spring-context/src/testFixtures/java/org/springframework/context/testfixture/SimpleMapScope.java index 089c75932fd..9365c2b319b 100644 --- a/spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/SimpleMapScope.java +++ b/spring-context/src/testFixtures/java/org/springframework/context/testfixture/SimpleMapScope.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.context.test.fixtures; +package org.springframework.context.testfixture; import java.io.Serializable; import java.util.HashMap; diff --git a/spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/beans/ACATester.java b/spring-context/src/testFixtures/java/org/springframework/context/testfixture/beans/ACATester.java similarity index 96% rename from spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/beans/ACATester.java rename to spring-context/src/testFixtures/java/org/springframework/context/testfixture/beans/ACATester.java index 995b84b6a8d..4d0fbd5d743 100644 --- a/spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/beans/ACATester.java +++ b/spring-context/src/testFixtures/java/org/springframework/context/testfixture/beans/ACATester.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.context.test.fixtures.beans; +package org.springframework.context.testfixture.beans; import java.util.Locale; diff --git a/spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/beans/BeanThatBroadcasts.java b/spring-context/src/testFixtures/java/org/springframework/context/testfixture/beans/BeanThatBroadcasts.java similarity index 95% rename from spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/beans/BeanThatBroadcasts.java rename to spring-context/src/testFixtures/java/org/springframework/context/testfixture/beans/BeanThatBroadcasts.java index 3a50975f33e..cc8e13832da 100644 --- a/spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/beans/BeanThatBroadcasts.java +++ b/spring-context/src/testFixtures/java/org/springframework/context/testfixture/beans/BeanThatBroadcasts.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.context.test.fixtures.beans; +package org.springframework.context.testfixture.beans; import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContextAware; diff --git a/spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/beans/BeanThatListens.java b/spring-context/src/testFixtures/java/org/springframework/context/testfixture/beans/BeanThatListens.java similarity index 96% rename from spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/beans/BeanThatListens.java rename to spring-context/src/testFixtures/java/org/springframework/context/testfixture/beans/BeanThatListens.java index c7079188f9d..f54e74c9aec 100644 --- a/spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/beans/BeanThatListens.java +++ b/spring-context/src/testFixtures/java/org/springframework/context/testfixture/beans/BeanThatListens.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.context.test.fixtures.beans; +package org.springframework.context.testfixture.beans; import java.util.Map; diff --git a/spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/beans/TestApplicationListener.java b/spring-context/src/testFixtures/java/org/springframework/context/testfixture/beans/TestApplicationListener.java similarity index 95% rename from spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/beans/TestApplicationListener.java rename to spring-context/src/testFixtures/java/org/springframework/context/testfixture/beans/TestApplicationListener.java index a43e534ddec..63749d326f9 100644 --- a/spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/beans/TestApplicationListener.java +++ b/spring-context/src/testFixtures/java/org/springframework/context/testfixture/beans/TestApplicationListener.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.context.test.fixtures.beans; +package org.springframework.context.testfixture.beans; import org.springframework.context.ApplicationEvent; import org.springframework.context.ApplicationListener; diff --git a/spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/cache/AbstractCacheAnnotationTests.java b/spring-context/src/testFixtures/java/org/springframework/context/testfixture/cache/AbstractCacheAnnotationTests.java similarity index 98% rename from spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/cache/AbstractCacheAnnotationTests.java rename to spring-context/src/testFixtures/java/org/springframework/context/testfixture/cache/AbstractCacheAnnotationTests.java index d94cacb17a2..85f99eacce8 100644 --- a/spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/cache/AbstractCacheAnnotationTests.java +++ b/spring-context/src/testFixtures/java/org/springframework/context/testfixture/cache/AbstractCacheAnnotationTests.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.context.test.fixtures.cache; +package org.springframework.context.testfixture.cache; import java.util.Collection; import java.util.UUID; @@ -28,9 +28,9 @@ import org.springframework.beans.factory.NoSuchBeanDefinitionException; import org.springframework.cache.Cache; import org.springframework.cache.CacheManager; import org.springframework.context.ConfigurableApplicationContext; -import org.springframework.context.test.fixtures.cache.beans.AnnotatedClassCacheableService; -import org.springframework.context.test.fixtures.cache.beans.CacheableService; -import org.springframework.context.test.fixtures.cache.beans.TestEntity; +import org.springframework.context.testfixture.cache.beans.AnnotatedClassCacheableService; +import org.springframework.context.testfixture.cache.beans.CacheableService; +import org.springframework.context.testfixture.cache.beans.TestEntity; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; diff --git a/spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/cache/AbstractCacheTests.java b/spring-context/src/testFixtures/java/org/springframework/context/testfixture/cache/AbstractCacheTests.java similarity index 99% rename from spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/cache/AbstractCacheTests.java rename to spring-context/src/testFixtures/java/org/springframework/context/testfixture/cache/AbstractCacheTests.java index ab8490bd536..e01074417a1 100644 --- a/spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/cache/AbstractCacheTests.java +++ b/spring-context/src/testFixtures/java/org/springframework/context/testfixture/cache/AbstractCacheTests.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.context.test.fixtures.cache; +package org.springframework.context.testfixture.cache; import java.util.List; import java.util.UUID; diff --git a/spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/cache/AbstractValueAdaptingCacheTests.java b/spring-context/src/testFixtures/java/org/springframework/context/testfixture/cache/AbstractValueAdaptingCacheTests.java similarity index 96% rename from spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/cache/AbstractValueAdaptingCacheTests.java rename to spring-context/src/testFixtures/java/org/springframework/context/testfixture/cache/AbstractValueAdaptingCacheTests.java index ccaa6ffe8e7..5f0809deb18 100644 --- a/spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/cache/AbstractValueAdaptingCacheTests.java +++ b/spring-context/src/testFixtures/java/org/springframework/context/testfixture/cache/AbstractValueAdaptingCacheTests.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.context.test.fixtures.cache; +package org.springframework.context.testfixture.cache; import org.junit.jupiter.api.Test; diff --git a/spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/cache/CacheTestUtils.java b/spring-context/src/testFixtures/java/org/springframework/context/testfixture/cache/CacheTestUtils.java similarity index 97% rename from spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/cache/CacheTestUtils.java rename to spring-context/src/testFixtures/java/org/springframework/context/testfixture/cache/CacheTestUtils.java index 1150a45a8f9..459c3bf95fa 100644 --- a/spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/cache/CacheTestUtils.java +++ b/spring-context/src/testFixtures/java/org/springframework/context/testfixture/cache/CacheTestUtils.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.context.test.fixtures.cache; +package org.springframework.context.testfixture.cache; import java.util.ArrayList; import java.util.List; diff --git a/spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/cache/SomeCustomKeyGenerator.java b/spring-context/src/testFixtures/java/org/springframework/context/testfixture/cache/SomeCustomKeyGenerator.java similarity index 96% rename from spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/cache/SomeCustomKeyGenerator.java rename to spring-context/src/testFixtures/java/org/springframework/context/testfixture/cache/SomeCustomKeyGenerator.java index 296e3cd3a2c..c9c476349e1 100644 --- a/spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/cache/SomeCustomKeyGenerator.java +++ b/spring-context/src/testFixtures/java/org/springframework/context/testfixture/cache/SomeCustomKeyGenerator.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.context.test.fixtures.cache; +package org.springframework.context.testfixture.cache; import java.lang.reflect.Method; diff --git a/spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/cache/SomeKeyGenerator.java b/spring-context/src/testFixtures/java/org/springframework/context/testfixture/cache/SomeKeyGenerator.java similarity index 92% rename from spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/cache/SomeKeyGenerator.java rename to spring-context/src/testFixtures/java/org/springframework/context/testfixture/cache/SomeKeyGenerator.java index b4555262675..791d9f769c6 100644 --- a/spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/cache/SomeKeyGenerator.java +++ b/spring-context/src/testFixtures/java/org/springframework/context/testfixture/cache/SomeKeyGenerator.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.context.test.fixtures.cache; +package org.springframework.context.testfixture.cache; import org.springframework.cache.interceptor.SimpleKeyGenerator; diff --git a/spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/cache/beans/AnnotatedClassCacheableService.java b/spring-context/src/testFixtures/java/org/springframework/context/testfixture/cache/beans/AnnotatedClassCacheableService.java similarity index 99% rename from spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/cache/beans/AnnotatedClassCacheableService.java rename to spring-context/src/testFixtures/java/org/springframework/context/testfixture/cache/beans/AnnotatedClassCacheableService.java index 8441ed9baa1..aaf8fb68815 100644 --- a/spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/cache/beans/AnnotatedClassCacheableService.java +++ b/spring-context/src/testFixtures/java/org/springframework/context/testfixture/cache/beans/AnnotatedClassCacheableService.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.context.test.fixtures.cache.beans; +package org.springframework.context.testfixture.cache.beans; import java.io.IOException; import java.util.concurrent.atomic.AtomicLong; diff --git a/spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/cache/beans/CacheableService.java b/spring-context/src/testFixtures/java/org/springframework/context/testfixture/cache/beans/CacheableService.java similarity index 96% rename from spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/cache/beans/CacheableService.java rename to spring-context/src/testFixtures/java/org/springframework/context/testfixture/cache/beans/CacheableService.java index fbbb1fc572e..06afcea22f4 100644 --- a/spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/cache/beans/CacheableService.java +++ b/spring-context/src/testFixtures/java/org/springframework/context/testfixture/cache/beans/CacheableService.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.context.test.fixtures.cache.beans; +package org.springframework.context.testfixture.cache.beans; /** * Basic service interface for caching tests. diff --git a/spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/cache/beans/DefaultCacheableService.java b/spring-context/src/testFixtures/java/org/springframework/context/testfixture/cache/beans/DefaultCacheableService.java similarity index 99% rename from spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/cache/beans/DefaultCacheableService.java rename to spring-context/src/testFixtures/java/org/springframework/context/testfixture/cache/beans/DefaultCacheableService.java index 3c5a5d66654..017a719173f 100644 --- a/spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/cache/beans/DefaultCacheableService.java +++ b/spring-context/src/testFixtures/java/org/springframework/context/testfixture/cache/beans/DefaultCacheableService.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.context.test.fixtures.cache.beans; +package org.springframework.context.testfixture.cache.beans; import java.io.IOException; import java.util.concurrent.atomic.AtomicLong; diff --git a/spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/cache/beans/TestEntity.java b/spring-context/src/testFixtures/java/org/springframework/context/testfixture/cache/beans/TestEntity.java similarity index 95% rename from spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/cache/beans/TestEntity.java rename to spring-context/src/testFixtures/java/org/springframework/context/testfixture/cache/beans/TestEntity.java index db221313732..77c9e067b3a 100644 --- a/spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/cache/beans/TestEntity.java +++ b/spring-context/src/testFixtures/java/org/springframework/context/testfixture/cache/beans/TestEntity.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.context.test.fixtures.cache.beans; +package org.springframework.context.testfixture.cache.beans; import org.springframework.util.ObjectUtils; diff --git a/spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/index/CandidateComponentsTestClassLoader.java b/spring-context/src/testFixtures/java/org/springframework/context/testfixture/index/CandidateComponentsTestClassLoader.java similarity index 98% rename from spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/index/CandidateComponentsTestClassLoader.java rename to spring-context/src/testFixtures/java/org/springframework/context/testfixture/index/CandidateComponentsTestClassLoader.java index 02c91ed3d2b..7b6ad75257f 100644 --- a/spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/index/CandidateComponentsTestClassLoader.java +++ b/spring-context/src/testFixtures/java/org/springframework/context/testfixture/index/CandidateComponentsTestClassLoader.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.context.test.fixtures.index; +package org.springframework.context.testfixture.index; import java.io.IOException; import java.net.URL; diff --git a/spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/jndi/ExpectedLookupTemplate.java b/spring-context/src/testFixtures/java/org/springframework/context/testfixture/jndi/ExpectedLookupTemplate.java similarity index 93% rename from spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/jndi/ExpectedLookupTemplate.java rename to spring-context/src/testFixtures/java/org/springframework/context/testfixture/jndi/ExpectedLookupTemplate.java index c5e575d22c9..007f1e5e9c1 100644 --- a/spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/jndi/ExpectedLookupTemplate.java +++ b/spring-context/src/testFixtures/java/org/springframework/context/testfixture/jndi/ExpectedLookupTemplate.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.context.test.fixtures.jndi; +package org.springframework.context.testfixture.jndi; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; @@ -24,7 +24,7 @@ import javax.naming.NamingException; import org.springframework.jndi.JndiTemplate; /** - * Copy of the standard {@link org.springframework.context.test.fixtures.jndi.jndi.ExpectedLookupTemplate} + * Copy of the standard {@link org.springframework.context.testfixture.jndi.jndi.ExpectedLookupTemplate} * for testing purposes. * *

Simple extension of the JndiTemplate class that always returns a given object. diff --git a/spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/jndi/SimpleNamingContext.java b/spring-context/src/testFixtures/java/org/springframework/context/testfixture/jndi/SimpleNamingContext.java similarity index 98% rename from spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/jndi/SimpleNamingContext.java rename to spring-context/src/testFixtures/java/org/springframework/context/testfixture/jndi/SimpleNamingContext.java index f2f5450c84b..7eeaea2f249 100644 --- a/spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/jndi/SimpleNamingContext.java +++ b/spring-context/src/testFixtures/java/org/springframework/context/testfixture/jndi/SimpleNamingContext.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.context.test.fixtures.jndi; +package org.springframework.context.testfixture.jndi; import java.util.HashMap; import java.util.Hashtable; @@ -156,7 +156,7 @@ public class SimpleNamingContext implements Context { * Note: Not intended for direct use by applications * if setting up a JVM-level JNDI environment. * Use SimpleNamingContextBuilder to set up JNDI bindings then. - * @see org.springframework.context.test.fixtures.jndi.SimpleNamingContextBuilder#bind + * @see org.springframework.context.testfixture.jndi.SimpleNamingContextBuilder#bind */ @Override public void bind(String name, Object obj) { diff --git a/spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/jndi/SimpleNamingContextBuilder.java b/spring-context/src/testFixtures/java/org/springframework/context/testfixture/jndi/SimpleNamingContextBuilder.java similarity index 99% rename from spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/jndi/SimpleNamingContextBuilder.java rename to spring-context/src/testFixtures/java/org/springframework/context/testfixture/jndi/SimpleNamingContextBuilder.java index 08deabe1105..d686261d1a5 100644 --- a/spring-context/src/testFixtures/java/org/springframework/context/test/fixtures/jndi/SimpleNamingContextBuilder.java +++ b/spring-context/src/testFixtures/java/org/springframework/context/testfixture/jndi/SimpleNamingContextBuilder.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.context.test.fixtures.jndi; +package org.springframework.context.testfixture.jndi; import java.util.Hashtable; diff --git a/spring-orm/src/test/java/org/springframework/orm/jpa/persistenceunit/DefaultPersistenceUnitManagerTests.java b/spring-orm/src/test/java/org/springframework/orm/jpa/persistenceunit/DefaultPersistenceUnitManagerTests.java index 2dac01aab89..db1ed396629 100644 --- a/spring-orm/src/test/java/org/springframework/orm/jpa/persistenceunit/DefaultPersistenceUnitManagerTests.java +++ b/spring-orm/src/test/java/org/springframework/orm/jpa/persistenceunit/DefaultPersistenceUnitManagerTests.java @@ -18,7 +18,7 @@ package org.springframework.orm.jpa.persistenceunit; import org.junit.jupiter.api.Test; -import org.springframework.context.test.fixtures.index.CandidateComponentsTestClassLoader; +import org.springframework.context.testfixture.index.CandidateComponentsTestClassLoader; import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.DefaultResourceLoader; import org.springframework.orm.jpa.domain.Person; diff --git a/spring-orm/src/test/java/org/springframework/orm/jpa/persistenceunit/PersistenceXmlParsingTests.java b/spring-orm/src/test/java/org/springframework/orm/jpa/persistenceunit/PersistenceXmlParsingTests.java index 3e3da8b68d6..d7a78f9e87b 100644 --- a/spring-orm/src/test/java/org/springframework/orm/jpa/persistenceunit/PersistenceXmlParsingTests.java +++ b/spring-orm/src/test/java/org/springframework/orm/jpa/persistenceunit/PersistenceXmlParsingTests.java @@ -28,7 +28,7 @@ import javax.sql.DataSource; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -import org.springframework.context.test.fixtures.jndi.SimpleNamingContextBuilder; +import org.springframework.context.testfixture.jndi.SimpleNamingContextBuilder; import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.Resource; import org.springframework.core.io.UrlResource; diff --git a/spring-orm/src/test/java/org/springframework/orm/jpa/support/PersistenceInjectionTests.java b/spring-orm/src/test/java/org/springframework/orm/jpa/support/PersistenceInjectionTests.java index 9409e437cec..3114573ed02 100644 --- a/spring-orm/src/test/java/org/springframework/orm/jpa/support/PersistenceInjectionTests.java +++ b/spring-orm/src/test/java/org/springframework/orm/jpa/support/PersistenceInjectionTests.java @@ -37,8 +37,8 @@ import org.springframework.beans.factory.FactoryBean; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.support.RootBeanDefinition; import org.springframework.context.support.GenericApplicationContext; -import org.springframework.context.test.fixtures.SimpleMapScope; -import org.springframework.context.test.fixtures.jndi.ExpectedLookupTemplate; +import org.springframework.context.testfixture.SimpleMapScope; +import org.springframework.context.testfixture.jndi.ExpectedLookupTemplate; import org.springframework.core.testfixture.io.SerializationTestUtils; import org.springframework.lang.Nullable; import org.springframework.orm.jpa.AbstractEntityManagerFactoryBeanTests; diff --git a/spring-tx/src/test/java/org/springframework/transaction/JndiJtaTransactionManagerTests.java b/spring-tx/src/test/java/org/springframework/transaction/JndiJtaTransactionManagerTests.java index fe6bc1d2456..2319d34261f 100644 --- a/spring-tx/src/test/java/org/springframework/transaction/JndiJtaTransactionManagerTests.java +++ b/spring-tx/src/test/java/org/springframework/transaction/JndiJtaTransactionManagerTests.java @@ -23,7 +23,7 @@ import javax.transaction.UserTransaction; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.Test; -import org.springframework.context.test.fixtures.jndi.ExpectedLookupTemplate; +import org.springframework.context.testfixture.jndi.ExpectedLookupTemplate; import org.springframework.transaction.jta.JtaTransactionManager; import org.springframework.transaction.jta.UserTransactionAdapter; import org.springframework.transaction.support.TransactionCallbackWithoutResult; diff --git a/spring-tx/src/test/java/org/springframework/transaction/jta/WebSphereUowTransactionManagerTests.java b/spring-tx/src/test/java/org/springframework/transaction/jta/WebSphereUowTransactionManagerTests.java index bc0599b7f96..06b4675f3a5 100644 --- a/spring-tx/src/test/java/org/springframework/transaction/jta/WebSphereUowTransactionManagerTests.java +++ b/spring-tx/src/test/java/org/springframework/transaction/jta/WebSphereUowTransactionManagerTests.java @@ -25,7 +25,7 @@ import com.ibm.wsspi.uow.UOWException; import com.ibm.wsspi.uow.UOWManager; import org.junit.jupiter.api.Test; -import org.springframework.context.test.fixtures.jndi.ExpectedLookupTemplate; +import org.springframework.context.testfixture.jndi.ExpectedLookupTemplate; import org.springframework.dao.OptimisticLockingFailureException; import org.springframework.transaction.IllegalTransactionStateException; import org.springframework.transaction.NestedTransactionNotSupportedException; diff --git a/spring-tx/src/test/java/org/springframework/transaction/support/JtaTransactionManagerSerializationTests.java b/spring-tx/src/test/java/org/springframework/transaction/support/JtaTransactionManagerSerializationTests.java index be9f8e6b43d..579b7670b12 100644 --- a/spring-tx/src/test/java/org/springframework/transaction/support/JtaTransactionManagerSerializationTests.java +++ b/spring-tx/src/test/java/org/springframework/transaction/support/JtaTransactionManagerSerializationTests.java @@ -21,7 +21,7 @@ import javax.transaction.UserTransaction; import org.junit.jupiter.api.Test; -import org.springframework.context.test.fixtures.jndi.SimpleNamingContextBuilder; +import org.springframework.context.testfixture.jndi.SimpleNamingContextBuilder; import org.springframework.core.testfixture.io.SerializationTestUtils; import org.springframework.transaction.jta.JtaTransactionManager; diff --git a/spring-web/src/test/java/org/springframework/web/context/support/StandardServletEnvironmentTests.java b/spring-web/src/test/java/org/springframework/web/context/support/StandardServletEnvironmentTests.java index 750cbf55817..3a792efed78 100644 --- a/spring-web/src/test/java/org/springframework/web/context/support/StandardServletEnvironmentTests.java +++ b/spring-web/src/test/java/org/springframework/web/context/support/StandardServletEnvironmentTests.java @@ -18,7 +18,7 @@ package org.springframework.web.context.support; import org.junit.jupiter.api.Test; -import org.springframework.context.test.fixtures.jndi.SimpleNamingContextBuilder; +import org.springframework.context.testfixture.jndi.SimpleNamingContextBuilder; import org.springframework.core.env.ConfigurableEnvironment; import org.springframework.core.env.MutablePropertySources; import org.springframework.core.env.PropertySource; diff --git a/spring-webmvc/src/test/java/org/springframework/web/context/XmlWebApplicationContextTests.java b/spring-webmvc/src/test/java/org/springframework/web/context/XmlWebApplicationContextTests.java index 731997455ca..a15153cadf7 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/context/XmlWebApplicationContextTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/context/XmlWebApplicationContextTests.java @@ -31,8 +31,8 @@ import org.springframework.beans.factory.config.ConfigurableListableBeanFactory; import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.context.ConfigurableApplicationContext; import org.springframework.context.NoSuchMessageException; -import org.springframework.context.test.fixtures.AbstractApplicationContextTests; -import org.springframework.context.test.fixtures.beans.TestApplicationListener; +import org.springframework.context.testfixture.AbstractApplicationContextTests; +import org.springframework.context.testfixture.beans.TestApplicationListener; import org.springframework.mock.web.test.MockServletContext; import org.springframework.util.Assert; import org.springframework.web.context.support.XmlWebApplicationContext; @@ -96,7 +96,7 @@ public class XmlWebApplicationContextTests extends AbstractApplicationContextTes /** * Overridden as we can't trust superclass method - * @see org.springframework.context.test.fixtures.AbstractApplicationContextTests#testEvents() + * @see org.springframework.context.testfixture.AbstractApplicationContextTests#testEvents() */ @Override protected void doTestEvents(TestApplicationListener listener, TestApplicationListener parentListener, diff --git a/spring-webmvc/src/test/resources/org/springframework/web/context/WEB-INF/applicationContext.xml b/spring-webmvc/src/test/resources/org/springframework/web/context/WEB-INF/applicationContext.xml index b0d94377dd9..06b45bb167d 100644 --- a/spring-webmvc/src/test/resources/org/springframework/web/context/WEB-INF/applicationContext.xml +++ b/spring-webmvc/src/test/resources/org/springframework/web/context/WEB-INF/applicationContext.xml @@ -25,9 +25,9 @@ --> - + - + diff --git a/spring-webmvc/src/test/resources/org/springframework/web/context/WEB-INF/context-addition.xml b/spring-webmvc/src/test/resources/org/springframework/web/context/WEB-INF/context-addition.xml index 88b23df2cc8..0cc0be7ffcd 100644 --- a/spring-webmvc/src/test/resources/org/springframework/web/context/WEB-INF/context-addition.xml +++ b/spring-webmvc/src/test/resources/org/springframework/web/context/WEB-INF/context-addition.xml @@ -3,11 +3,11 @@ - + - + - + Roderick diff --git a/spring-webmvc/src/test/resources/org/springframework/web/context/WEB-INF/test-servlet.xml b/spring-webmvc/src/test/resources/org/springframework/web/context/WEB-INF/test-servlet.xml index 78ae8e35af4..2ad17cf5137 100644 --- a/spring-webmvc/src/test/resources/org/springframework/web/context/WEB-INF/test-servlet.xml +++ b/spring-webmvc/src/test/resources/org/springframework/web/context/WEB-INF/test-servlet.xml @@ -11,9 +11,9 @@ org/springframework/web/context/WEB-INF/test- - + - + Rod @@ -21,7 +21,7 @@ - + Roderick From 94f8ef08e201da291efbb86a31b34fa56e47e44e Mon Sep 17 00:00:00 2001 From: Sam Brannen Date: Sun, 29 Dec 2019 18:20:14 +0100 Subject: [PATCH 07/13] Move common TestPrincipal to spring-core test fixtures See gh-23550 --- .../build/testsources/TestSourcesPlugin.java | 18 +++--- .../DefaultListableBeanFactoryTests.java | 33 +---------- .../security/CallbacksSecurityTests.java | 32 +---------- .../testfixture/security}/TestPrincipal.java | 6 +- .../simp/SimpMessageHeaderAccessorTests.java | 2 + .../SimpleBrokerMessageHandlerTests.java | 2 +- .../StompBrokerRelayMessageHandlerTests.java | 2 +- .../DefaultUserDestinationResolverTests.java | 2 +- .../UserDestinationMessageHandlerTests.java | 2 +- ...nnotationControllerHandlerMethodTests.java | 11 +--- .../jetty/JettyWebSocketSessionTests.java | 2 +- .../StandardWebSocketSessionTests.java | 2 +- .../web/socket/handler/TestPrincipal.java | 56 ------------------- .../DefaultSimpUserRegistryTests.java | 18 +----- .../StompSubProtocolHandlerTests.java | 2 +- .../handler/DefaultSockJsServiceTests.java | 2 +- 16 files changed, 28 insertions(+), 164 deletions(-) rename {spring-messaging/src/test/java/org/springframework/messaging/simp => spring-core/src/testFixtures/java/org/springframework/core/testfixture/security}/TestPrincipal.java (89%) delete mode 100644 spring-websocket/src/test/java/org/springframework/web/socket/handler/TestPrincipal.java diff --git a/buildSrc/src/main/java/org/springframework/build/testsources/TestSourcesPlugin.java b/buildSrc/src/main/java/org/springframework/build/testsources/TestSourcesPlugin.java index 5bfbd3c3c23..0248464cc18 100644 --- a/buildSrc/src/main/java/org/springframework/build/testsources/TestSourcesPlugin.java +++ b/buildSrc/src/main/java/org/springframework/build/testsources/TestSourcesPlugin.java @@ -60,18 +60,20 @@ public class TestSourcesPlugin implements Plugin { *

This is used to assist with the migration to Gradle test fixtures. */ private static final List excludedProjects = Arrays.asList( - // "integration-tests", + "integration-tests", + "kotlin-coroutines", + // "spring-aop", "spring-beans", "spring-context", "spring-context-indexer", "spring-context-support", - "spring-core" - // "spring-expression", - // "spring-instrument", - // "spring-jcl", - // "spring-jdbc", - // "spring-jms", - // "spring-messaging", + "spring-core", + "spring-expression", + "spring-instrument", + "spring-jcl", + "spring-jdbc", + "spring-jms", + "spring-messaging" // "spring-orm", // "spring-oxm", // "spring-test", diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/DefaultListableBeanFactoryTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/DefaultListableBeanFactoryTests.java index 689dc04547a..1a7e67dbd9d 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/DefaultListableBeanFactoryTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/DefaultListableBeanFactoryTests.java @@ -98,6 +98,7 @@ import org.springframework.core.testfixture.Assume; import org.springframework.core.testfixture.EnabledForTestGroups; import org.springframework.core.testfixture.TestGroup; import org.springframework.core.testfixture.io.SerializationTestUtils; +import org.springframework.core.testfixture.security.TestPrincipal; import org.springframework.lang.Nullable; import org.springframework.util.StopWatch; import org.springframework.util.StringValueResolver; @@ -3252,38 +3253,6 @@ class DefaultListableBeanFactoryTests { } - private static class TestPrincipal implements Principal { - - private String name; - - public TestPrincipal(String name) { - this.name = name; - } - - @Override - public String getName() { - return this.name; - } - - @Override - public boolean equals(Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof TestPrincipal)) { - return false; - } - TestPrincipal p = (TestPrincipal) obj; - return this.name.equals(p.name); - } - - @Override - public int hashCode() { - return this.name.hashCode(); - } - } - - @SuppressWarnings("unused") private static class TestSecuredBean { diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/support/security/CallbacksSecurityTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/support/security/CallbacksSecurityTests.java index df5071cf632..84cb04da599 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/support/security/CallbacksSecurityTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/support/security/CallbacksSecurityTests.java @@ -55,6 +55,7 @@ import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; import org.springframework.core.NestedRuntimeException; import org.springframework.core.io.DefaultResourceLoader; import org.springframework.core.io.Resource; +import org.springframework.core.testfixture.security.TestPrincipal; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; @@ -252,37 +253,6 @@ public class CallbacksSecurityTests { }); } - private static class TestPrincipal implements Principal { - - private String name; - - public TestPrincipal(String name) { - this.name = name; - } - - @Override - public String getName() { - return this.name; - } - - @Override - public boolean equals(Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof TestPrincipal)) { - return false; - } - TestPrincipal p = (TestPrincipal) obj; - return this.name.equals(p.name); - } - - @Override - public int hashCode() { - return this.name.hashCode(); - } - } - public CallbacksSecurityTests() { // setup security if (System.getSecurityManager() == null) { diff --git a/spring-messaging/src/test/java/org/springframework/messaging/simp/TestPrincipal.java b/spring-core/src/testFixtures/java/org/springframework/core/testfixture/security/TestPrincipal.java similarity index 89% rename from spring-messaging/src/test/java/org/springframework/messaging/simp/TestPrincipal.java rename to spring-core/src/testFixtures/java/org/springframework/core/testfixture/security/TestPrincipal.java index f9fb11691f4..78c60b067b3 100644 --- a/spring-messaging/src/test/java/org/springframework/messaging/simp/TestPrincipal.java +++ b/spring-core/src/testFixtures/java/org/springframework/core/testfixture/security/TestPrincipal.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2013 the original author or authors. + * Copyright 2002-2019 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. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.messaging.simp; +package org.springframework.core.testfixture.security; import java.security.Principal; @@ -25,7 +25,7 @@ import java.security.Principal; */ public class TestPrincipal implements Principal { - private String name; + private final String name; public TestPrincipal(String name) { this.name = name; diff --git a/spring-messaging/src/test/java/org/springframework/messaging/simp/SimpMessageHeaderAccessorTests.java b/spring-messaging/src/test/java/org/springframework/messaging/simp/SimpMessageHeaderAccessorTests.java index 99d166fa02f..774576cc43e 100644 --- a/spring-messaging/src/test/java/org/springframework/messaging/simp/SimpMessageHeaderAccessorTests.java +++ b/spring-messaging/src/test/java/org/springframework/messaging/simp/SimpMessageHeaderAccessorTests.java @@ -22,6 +22,8 @@ import java.util.function.Consumer; import org.junit.jupiter.api.Test; +import org.springframework.core.testfixture.security.TestPrincipal; + import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; diff --git a/spring-messaging/src/test/java/org/springframework/messaging/simp/broker/SimpleBrokerMessageHandlerTests.java b/spring-messaging/src/test/java/org/springframework/messaging/simp/broker/SimpleBrokerMessageHandlerTests.java index 456bd9f1d21..72807d3e600 100644 --- a/spring-messaging/src/test/java/org/springframework/messaging/simp/broker/SimpleBrokerMessageHandlerTests.java +++ b/spring-messaging/src/test/java/org/springframework/messaging/simp/broker/SimpleBrokerMessageHandlerTests.java @@ -29,13 +29,13 @@ import org.mockito.Captor; import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; +import org.springframework.core.testfixture.security.TestPrincipal; import org.springframework.messaging.Message; import org.springframework.messaging.MessageChannel; import org.springframework.messaging.MessageHeaders; import org.springframework.messaging.SubscribableChannel; import org.springframework.messaging.simp.SimpMessageHeaderAccessor; import org.springframework.messaging.simp.SimpMessageType; -import org.springframework.messaging.simp.TestPrincipal; import org.springframework.messaging.support.MessageBuilder; import org.springframework.scheduling.TaskScheduler; diff --git a/spring-messaging/src/test/java/org/springframework/messaging/simp/stomp/StompBrokerRelayMessageHandlerTests.java b/spring-messaging/src/test/java/org/springframework/messaging/simp/stomp/StompBrokerRelayMessageHandlerTests.java index 4b67d290fb5..daf146fe242 100644 --- a/spring-messaging/src/test/java/org/springframework/messaging/simp/stomp/StompBrokerRelayMessageHandlerTests.java +++ b/spring-messaging/src/test/java/org/springframework/messaging/simp/stomp/StompBrokerRelayMessageHandlerTests.java @@ -26,13 +26,13 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.mockito.ArgumentCaptor; +import org.springframework.core.testfixture.security.TestPrincipal; import org.springframework.messaging.Message; import org.springframework.messaging.MessageHandler; import org.springframework.messaging.MessageHeaders; import org.springframework.messaging.StubMessageChannel; import org.springframework.messaging.simp.SimpMessageHeaderAccessor; import org.springframework.messaging.simp.SimpMessageType; -import org.springframework.messaging.simp.TestPrincipal; import org.springframework.messaging.support.MessageBuilder; import org.springframework.messaging.support.MessageHeaderAccessor; import org.springframework.messaging.tcp.ReconnectStrategy; diff --git a/spring-messaging/src/test/java/org/springframework/messaging/simp/user/DefaultUserDestinationResolverTests.java b/spring-messaging/src/test/java/org/springframework/messaging/simp/user/DefaultUserDestinationResolverTests.java index 888afe23960..020aa2b1bdc 100644 --- a/spring-messaging/src/test/java/org/springframework/messaging/simp/user/DefaultUserDestinationResolverTests.java +++ b/spring-messaging/src/test/java/org/springframework/messaging/simp/user/DefaultUserDestinationResolverTests.java @@ -21,10 +21,10 @@ import java.security.Principal; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; +import org.springframework.core.testfixture.security.TestPrincipal; import org.springframework.messaging.Message; import org.springframework.messaging.simp.SimpMessageHeaderAccessor; import org.springframework.messaging.simp.SimpMessageType; -import org.springframework.messaging.simp.TestPrincipal; import org.springframework.messaging.support.MessageBuilder; import org.springframework.util.StringUtils; diff --git a/spring-messaging/src/test/java/org/springframework/messaging/simp/user/UserDestinationMessageHandlerTests.java b/spring-messaging/src/test/java/org/springframework/messaging/simp/user/UserDestinationMessageHandlerTests.java index 78c8dd3a5f3..121429b4119 100644 --- a/spring-messaging/src/test/java/org/springframework/messaging/simp/user/UserDestinationMessageHandlerTests.java +++ b/spring-messaging/src/test/java/org/springframework/messaging/simp/user/UserDestinationMessageHandlerTests.java @@ -22,12 +22,12 @@ import org.junit.jupiter.api.Test; import org.mockito.ArgumentCaptor; import org.mockito.Mockito; +import org.springframework.core.testfixture.security.TestPrincipal; import org.springframework.messaging.Message; import org.springframework.messaging.StubMessageChannel; import org.springframework.messaging.SubscribableChannel; import org.springframework.messaging.simp.SimpMessageHeaderAccessor; import org.springframework.messaging.simp.SimpMessageType; -import org.springframework.messaging.simp.TestPrincipal; import org.springframework.messaging.simp.stomp.StompCommand; import org.springframework.messaging.simp.stomp.StompHeaderAccessor; import org.springframework.messaging.support.MessageBuilder; diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ServletAnnotationControllerHandlerMethodTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ServletAnnotationControllerHandlerMethodTests.java index 4896ef437b1..42f6b87e42e 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ServletAnnotationControllerHandlerMethodTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/annotation/ServletAnnotationControllerHandlerMethodTests.java @@ -79,6 +79,7 @@ import org.springframework.context.support.PropertySourcesPlaceholderConfigurer; import org.springframework.core.MethodParameter; import org.springframework.core.convert.converter.Converter; import org.springframework.core.testfixture.io.SerializationTestUtils; +import org.springframework.core.testfixture.security.TestPrincipal; import org.springframework.format.annotation.DateTimeFormat; import org.springframework.format.support.DefaultFormattingConversionService; import org.springframework.format.support.FormattingConversionServiceFactoryBean; @@ -2643,7 +2644,7 @@ public class ServletAnnotationControllerHandlerMethodTests extends AbstractServl @ModelAttribute public Principal getPrincipal() { - return new TestPrincipal(); + return new TestPrincipal("test"); } @RequestMapping("/myPath") @@ -2661,14 +2662,6 @@ public class ServletAnnotationControllerHandlerMethodTests extends AbstractServl } } - static class TestPrincipal implements Principal { - - @Override - public String getName() { - return "test"; - } - } - static class OtherPrincipal implements Principal { @Override diff --git a/spring-websocket/src/test/java/org/springframework/web/socket/adapter/jetty/JettyWebSocketSessionTests.java b/spring-websocket/src/test/java/org/springframework/web/socket/adapter/jetty/JettyWebSocketSessionTests.java index ab4c6e927a4..c717017d654 100644 --- a/spring-websocket/src/test/java/org/springframework/web/socket/adapter/jetty/JettyWebSocketSessionTests.java +++ b/spring-websocket/src/test/java/org/springframework/web/socket/adapter/jetty/JettyWebSocketSessionTests.java @@ -25,7 +25,7 @@ import org.eclipse.jetty.websocket.api.UpgradeResponse; import org.junit.jupiter.api.Test; import org.mockito.Mockito; -import org.springframework.web.socket.handler.TestPrincipal; +import org.springframework.core.testfixture.security.TestPrincipal; import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.BDDMockito.given; diff --git a/spring-websocket/src/test/java/org/springframework/web/socket/adapter/standard/StandardWebSocketSessionTests.java b/spring-websocket/src/test/java/org/springframework/web/socket/adapter/standard/StandardWebSocketSessionTests.java index 0843e46365b..a16948cb4b1 100644 --- a/spring-websocket/src/test/java/org/springframework/web/socket/adapter/standard/StandardWebSocketSessionTests.java +++ b/spring-websocket/src/test/java/org/springframework/web/socket/adapter/standard/StandardWebSocketSessionTests.java @@ -24,8 +24,8 @@ import javax.websocket.Session; import org.junit.jupiter.api.Test; import org.mockito.Mockito; +import org.springframework.core.testfixture.security.TestPrincipal; import org.springframework.http.HttpHeaders; -import org.springframework.web.socket.handler.TestPrincipal; import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.BDDMockito.given; diff --git a/spring-websocket/src/test/java/org/springframework/web/socket/handler/TestPrincipal.java b/spring-websocket/src/test/java/org/springframework/web/socket/handler/TestPrincipal.java deleted file mode 100644 index 95f7f95d385..00000000000 --- a/spring-websocket/src/test/java/org/springframework/web/socket/handler/TestPrincipal.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright 2002-2013 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. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.web.socket.handler; - -import java.security.Principal; - -/** - * An implementation of {@link Principal} for testing. - * - * @author Rossen Stoyanchev - */ -public class TestPrincipal implements Principal { - - private String name; - - public TestPrincipal(String name) { - this.name = name; - } - - @Override - public String getName() { - return this.name; - } - - @Override - public boolean equals(Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof TestPrincipal)) { - return false; - } - TestPrincipal p = (TestPrincipal) obj; - return this.name.equals(p.name); - } - - @Override - public int hashCode() { - return this.name.hashCode(); - } - -} diff --git a/spring-websocket/src/test/java/org/springframework/web/socket/messaging/DefaultSimpUserRegistryTests.java b/spring-websocket/src/test/java/org/springframework/web/socket/messaging/DefaultSimpUserRegistryTests.java index 30f31fd2ae0..d7fa58dcff0 100644 --- a/spring-websocket/src/test/java/org/springframework/web/socket/messaging/DefaultSimpUserRegistryTests.java +++ b/spring-websocket/src/test/java/org/springframework/web/socket/messaging/DefaultSimpUserRegistryTests.java @@ -16,7 +16,6 @@ package org.springframework.web.socket.messaging; -import java.security.Principal; import java.util.Arrays; import java.util.HashSet; import java.util.Iterator; @@ -24,6 +23,7 @@ import java.util.Set; import org.junit.jupiter.api.Test; +import org.springframework.core.testfixture.security.TestPrincipal; import org.springframework.messaging.Message; import org.springframework.messaging.simp.SimpMessageHeaderAccessor; import org.springframework.messaging.simp.SimpMessageType; @@ -191,20 +191,4 @@ public class DefaultSimpUserRegistryTests { return MessageBuilder.createMessage(new byte[0], accessor.getMessageHeaders()); } - - private static class TestPrincipal implements Principal { - - private String name; - - public TestPrincipal(String name) { - this.name = name; - } - - @Override - public String getName() { - return this.name; - } - - } - } diff --git a/spring-websocket/src/test/java/org/springframework/web/socket/messaging/StompSubProtocolHandlerTests.java b/spring-websocket/src/test/java/org/springframework/web/socket/messaging/StompSubProtocolHandlerTests.java index 96b70e62f66..6744cbc3d87 100644 --- a/spring-websocket/src/test/java/org/springframework/web/socket/messaging/StompSubProtocolHandlerTests.java +++ b/spring-websocket/src/test/java/org/springframework/web/socket/messaging/StompSubProtocolHandlerTests.java @@ -33,6 +33,7 @@ import org.mockito.Mockito; import org.springframework.context.ApplicationEvent; import org.springframework.context.ApplicationEventPublisher; import org.springframework.context.PayloadApplicationEvent; +import org.springframework.core.testfixture.security.TestPrincipal; import org.springframework.messaging.Message; import org.springframework.messaging.MessageChannel; import org.springframework.messaging.MessageHandler; @@ -41,7 +42,6 @@ import org.springframework.messaging.simp.SimpAttributes; import org.springframework.messaging.simp.SimpAttributesContextHolder; import org.springframework.messaging.simp.SimpMessageHeaderAccessor; import org.springframework.messaging.simp.SimpMessageType; -import org.springframework.messaging.simp.TestPrincipal; import org.springframework.messaging.simp.stomp.StompCommand; import org.springframework.messaging.simp.stomp.StompEncoder; import org.springframework.messaging.simp.stomp.StompHeaderAccessor; diff --git a/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/transport/handler/DefaultSockJsServiceTests.java b/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/transport/handler/DefaultSockJsServiceTests.java index baa480592e1..083e105c017 100644 --- a/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/transport/handler/DefaultSockJsServiceTests.java +++ b/spring-websocket/src/test/java/org/springframework/web/socket/sockjs/transport/handler/DefaultSockJsServiceTests.java @@ -27,11 +27,11 @@ import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoSettings; import org.mockito.quality.Strictness; +import org.springframework.core.testfixture.security.TestPrincipal; import org.springframework.http.HttpHeaders; import org.springframework.scheduling.TaskScheduler; import org.springframework.web.socket.AbstractHttpRequestTests; import org.springframework.web.socket.WebSocketHandler; -import org.springframework.web.socket.handler.TestPrincipal; import org.springframework.web.socket.server.HandshakeHandler; import org.springframework.web.socket.server.support.OriginHandshakeInterceptor; import org.springframework.web.socket.sockjs.transport.SockJsSessionFactory; From 57b771ba92aede2205ab9e39f0d13dde88472755 Mon Sep 17 00:00:00 2001 From: Sam Brannen Date: Tue, 31 Dec 2019 16:03:56 +0100 Subject: [PATCH 08/13] Move common FactoryMethods to spring-beans test fixtures See gh-23550 --- .../beans/factory/xml/FactoryMethodTests.java | 1 + .../beans/factory/xml/InstanceFactory.java | 1 + .../beans/factory/xml/factory-methods.xml | 30 +++--- .../testfixture/beans}/FactoryMethods.java | 8 +- .../aop/config/PrototypeProxyTests.java | 7 +- .../factory/xml/XmlBeanFactoryTestTypes.java | 101 +----------------- .../factory/xml/XmlBeanFactoryTests.java | 1 + .../tests/sample/beans/FactoryMethods.java | 33 ------ .../config/PrototypeProxyTests-context.xml | 2 - ...lBeanFactoryTests-constructorOverrides.xml | 2 +- ...toryTests-invalidOverridesNoSuchMethod.xml | 2 +- ...mlBeanFactoryTests-noSuchFactoryMethod.xml | 2 +- 12 files changed, 30 insertions(+), 160 deletions(-) rename spring-beans/src/{test/java/org/springframework/beans/factory/xml => testFixtures/java/org/springframework/beans/testfixture/beans}/FactoryMethods.java (91%) delete mode 100644 spring-context/src/test/java/org/springframework/tests/sample/beans/FactoryMethods.java diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/xml/FactoryMethodTests.java b/spring-beans/src/test/java/org/springframework/beans/factory/xml/FactoryMethodTests.java index 3ae92e3c8e8..034a3aca50b 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/xml/FactoryMethodTests.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/xml/FactoryMethodTests.java @@ -25,6 +25,7 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.factory.BeanCreationException; import org.springframework.beans.factory.support.DefaultListableBeanFactory; +import org.springframework.beans.testfixture.beans.FactoryMethods; import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.core.io.ClassPathResource; diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/xml/InstanceFactory.java b/spring-beans/src/test/java/org/springframework/beans/factory/xml/InstanceFactory.java index 3dd4cbd1467..af7f2f718b1 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/xml/InstanceFactory.java +++ b/spring-beans/src/test/java/org/springframework/beans/factory/xml/InstanceFactory.java @@ -16,6 +16,7 @@ package org.springframework.beans.factory.xml; +import org.springframework.beans.testfixture.beans.FactoryMethods; import org.springframework.beans.testfixture.beans.TestBean; /** diff --git a/spring-beans/src/test/resources/org/springframework/beans/factory/xml/factory-methods.xml b/spring-beans/src/test/resources/org/springframework/beans/factory/xml/factory-methods.xml index dc328aa8884..93f338b0017 100644 --- a/spring-beans/src/test/resources/org/springframework/beans/factory/xml/factory-methods.xml +++ b/spring-beans/src/test/resources/org/springframework/beans/factory/xml/factory-methods.xml @@ -3,7 +3,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans-3.0.xsd"> - setterString @@ -21,48 +21,48 @@ - - - setterString - 27 gotcha - 27 - 27 - 27 - @@ -72,31 +72,31 @@ - setterString - testBeanOnlyPrototypeDISetterString - - 27 gotcha - 27 @@ -104,7 +104,7 @@ bogus - diff --git a/spring-beans/src/test/java/org/springframework/beans/factory/xml/FactoryMethods.java b/spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/FactoryMethods.java similarity index 91% rename from spring-beans/src/test/java/org/springframework/beans/factory/xml/FactoryMethods.java rename to spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/FactoryMethods.java index 88b5321b893..98b26798a2c 100644 --- a/spring-beans/src/test/java/org/springframework/beans/factory/xml/FactoryMethods.java +++ b/spring-beans/src/testFixtures/java/org/springframework/beans/testfixture/beans/FactoryMethods.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2013 the original author or authors. + * Copyright 2002-2019 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. @@ -14,13 +14,11 @@ * limitations under the License. */ -package org.springframework.beans.factory.xml; +package org.springframework.beans.testfixture.beans; import java.util.Collections; import java.util.List; -import org.springframework.beans.testfixture.beans.TestBean; - /** * Test class for Spring's ability to create objects using static * factory methods, rather than constructors. @@ -47,7 +45,7 @@ public class FactoryMethods { return new FactoryMethods(tb, "default", 0); } - protected static FactoryMethods newInstance(TestBean tb, int num, String name) { + public static FactoryMethods newInstance(TestBean tb, int num, String name) { if (name == null) { throw new IllegalStateException("Should never be called with null value"); } diff --git a/spring-context/src/test/java/org/springframework/aop/config/PrototypeProxyTests.java b/spring-context/src/test/java/org/springframework/aop/config/PrototypeProxyTests.java index ca304fbec7b..9093cb62a85 100644 --- a/spring-context/src/test/java/org/springframework/aop/config/PrototypeProxyTests.java +++ b/spring-context/src/test/java/org/springframework/aop/config/PrototypeProxyTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2007 the original author or authors. + * Copyright 2002-2019 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. @@ -24,10 +24,11 @@ import org.springframework.context.support.ClassPathXmlApplicationContext; * @author Juergen Hoeller * @author Chris Beams */ -public class PrototypeProxyTests { +class PrototypeProxyTests { @Test - public void testInjectionBeforeWrappingCheckDoesNotKickInForPrototypeProxy() { + @SuppressWarnings("resource") + void injectionBeforeWrappingCheckDoesNotKickInForPrototypeProxy() { new ClassPathXmlApplicationContext(getClass().getSimpleName() + "-context.xml", getClass()); } diff --git a/spring-context/src/test/java/org/springframework/beans/factory/xml/XmlBeanFactoryTestTypes.java b/spring-context/src/test/java/org/springframework/beans/factory/xml/XmlBeanFactoryTestTypes.java index 1ac5e555bad..0d846d9d124 100644 --- a/spring-context/src/test/java/org/springframework/beans/factory/xml/XmlBeanFactoryTestTypes.java +++ b/spring-context/src/test/java/org/springframework/beans/factory/xml/XmlBeanFactoryTestTypes.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2017 the original author or authors. + * Copyright 2002-2019 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. @@ -20,8 +20,6 @@ import java.beans.ConstructorProperties; import java.io.Serializable; import java.lang.reflect.Method; import java.util.Collection; -import java.util.Collections; -import java.util.List; import java.util.Map; import java.util.Set; @@ -33,6 +31,7 @@ import org.springframework.beans.factory.DisposableBean; import org.springframework.beans.factory.InitializingBean; import org.springframework.beans.factory.config.BeanPostProcessor; import org.springframework.beans.factory.support.MethodReplacer; +import org.springframework.beans.testfixture.beans.FactoryMethods; import org.springframework.beans.testfixture.beans.ITestBean; import org.springframework.beans.testfixture.beans.IndexedTestBean; import org.springframework.beans.testfixture.beans.TestBean; @@ -305,102 +304,6 @@ class DummyReferencer { } -/** - * Test class for Spring's ability to create objects using static - * factory methods, rather than constructors. - * - * @author Rod Johnson - * @author Juergen Hoeller - */ -@SuppressWarnings("unused") -class FactoryMethods { - - public static FactoryMethods nullInstance() { - return null; - } - - public static FactoryMethods defaultInstance() { - TestBean tb = new TestBean(); - tb.setName("defaultInstance"); - return new FactoryMethods(tb, "default", 0); - } - - /** - * Note that overloaded methods are supported. - */ - public static FactoryMethods newInstance(TestBean tb) { - return new FactoryMethods(tb, "default", 0); - } - - protected static FactoryMethods newInstance(TestBean tb, int num, String name) { - if (name == null) { - throw new IllegalStateException("Should never be called with null value"); - } - return new FactoryMethods(tb, name, num); - } - - static FactoryMethods newInstance(TestBean tb, int num, Integer something) { - if (something != null) { - throw new IllegalStateException("Should never be called with non-null value"); - } - return new FactoryMethods(tb, null, num); - } - - private static List listInstance() { - return Collections.EMPTY_LIST; - } - - private int num = 0; - private String name = "default"; - private TestBean tb; - private String stringValue; - - /** - * Constructor is private: not for use outside this class, - * even by IoC container. - */ - private FactoryMethods(TestBean tb, String name, int num) { - this.tb = tb; - this.name = name; - this.num = num; - } - - public void setStringValue(String stringValue) { - this.stringValue = stringValue; - } - - public String getStringValue() { - return this.stringValue; - } - - public TestBean getTestBean() { - return this.tb; - } - - protected TestBean protectedGetTestBean() { - return this.tb; - } - - private TestBean privateGetTestBean() { - return this.tb; - } - - public int getNum() { - return num; - } - - public String getName() { - return name; - } - - /** - * Set via Setter Injection once instance is created. - */ - public void setName(String name) { - this.name = name; - } -} - /** * Fixed method replacer for String return types * @author Rod Johnson diff --git a/spring-context/src/test/java/org/springframework/beans/factory/xml/XmlBeanFactoryTests.java b/spring-context/src/test/java/org/springframework/beans/factory/xml/XmlBeanFactoryTests.java index 4a66ed91ef0..0fed592d03c 100644 --- a/spring-context/src/test/java/org/springframework/beans/factory/xml/XmlBeanFactoryTests.java +++ b/spring-context/src/test/java/org/springframework/beans/factory/xml/XmlBeanFactoryTests.java @@ -53,6 +53,7 @@ import org.springframework.beans.factory.support.MethodReplacer; import org.springframework.beans.factory.support.RootBeanDefinition; import org.springframework.beans.testfixture.beans.DependenciesBean; import org.springframework.beans.testfixture.beans.DerivedTestBean; +import org.springframework.beans.testfixture.beans.FactoryMethods; import org.springframework.beans.testfixture.beans.ITestBean; import org.springframework.beans.testfixture.beans.IndexedTestBean; import org.springframework.beans.testfixture.beans.TestBean; diff --git a/spring-context/src/test/java/org/springframework/tests/sample/beans/FactoryMethods.java b/spring-context/src/test/java/org/springframework/tests/sample/beans/FactoryMethods.java deleted file mode 100644 index 534f23de419..00000000000 --- a/spring-context/src/test/java/org/springframework/tests/sample/beans/FactoryMethods.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 2002-2012 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. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.tests.sample.beans; - -/** - * Test class for Spring's ability to create objects using static - * factory methods, rather than constructors. - * - * @author Rod Johnson - * @author Juergen Hoeller - * @author Chris Beams - */ -public class FactoryMethods { - - public static FactoryMethods nullInstance() { - return null; - } - -} diff --git a/spring-context/src/test/resources/org/springframework/aop/config/PrototypeProxyTests-context.xml b/spring-context/src/test/resources/org/springframework/aop/config/PrototypeProxyTests-context.xml index 9d25bab0594..62900b1c417 100644 --- a/spring-context/src/test/resources/org/springframework/aop/config/PrototypeProxyTests-context.xml +++ b/spring-context/src/test/resources/org/springframework/aop/config/PrototypeProxyTests-context.xml @@ -15,8 +15,6 @@ - - diff --git a/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-constructorOverrides.xml b/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-constructorOverrides.xml index 0c2fc310727..a39f9c0268d 100644 --- a/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-constructorOverrides.xml +++ b/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-constructorOverrides.xml @@ -25,7 +25,7 @@ diff --git a/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-invalidOverridesNoSuchMethod.xml b/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-invalidOverridesNoSuchMethod.xml index e88d1667d3c..02f14e6fa8c 100644 --- a/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-invalidOverridesNoSuchMethod.xml +++ b/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-invalidOverridesNoSuchMethod.xml @@ -16,7 +16,7 @@ 30 - diff --git a/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-noSuchFactoryMethod.xml b/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-noSuchFactoryMethod.xml index 68c29936fee..40ac4309ce4 100644 --- a/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-noSuchFactoryMethod.xml +++ b/spring-context/src/test/resources/org/springframework/beans/factory/xml/XmlBeanFactoryTests-noSuchFactoryMethod.xml @@ -4,7 +4,7 @@ - setterString From 5581f3b77b8d1f0b274f23a27a4409a90147594b Mon Sep 17 00:00:00 2001 From: Sam Brannen Date: Sun, 29 Dec 2019 18:38:33 +0100 Subject: [PATCH 09/13] Use Gradle test fixture support for spring-tx See gh-23550 --- .../build/testsources/TestSourcesPlugin.java | 8 ++++---- integration-tests/integration-tests.gradle | 1 + .../AdvisorAutoProxyCreatorIntegrationTests.java | 2 +- ...heduledAndTransactionalAnnotationIntegrationTests.java | 2 +- .../EnableTransactionManagementIntegrationTests.java | 2 +- .../AdvisorAutoProxyCreatorIntegrationTests-context.xml | 2 +- spring-aspects/spring-aspects.gradle | 1 + .../transaction/aspectj/JtaTransactionAspectsTests.java | 2 +- .../transaction/aspectj/TransactionAspectTests.java | 2 +- spring-context-support/spring-context-support.gradle | 1 + .../cache/jcache/JCacheEhCacheAnnotationTests.java | 2 +- .../transaction/TransactionAwareCacheDecoratorTests.java | 2 +- spring-jms/spring-jms.gradle | 1 + .../jms/config/jmsNamespaceHandlerTests.xml | 2 +- spring-test/spring-test.gradle | 1 + ...ookUpTxMgrViaTransactionManagementConfigurerTests.java | 2 +- .../junit4/spr9645/LookUpNonexistentTxMgrTests.java | 2 +- .../spr9645/LookUpTxMgrByTypeAndDefaultNameTests.java | 2 +- .../junit4/spr9645/LookUpTxMgrByTypeAndNameTests.java | 2 +- .../LookUpTxMgrByTypeAndQualifierAtClassLevelTests.java | 2 +- .../LookUpTxMgrByTypeAndQualifierAtMethodLevelTests.java | 2 +- .../context/junit4/spr9645/LookUpTxMgrByTypeTests.java | 2 +- .../transaction/JtaTransactionManagerTests.java | 1 - .../{tests => }/transaction/MockJtaTransaction.java | 2 +- .../transaction/TxNamespaceHandlerTests.java | 2 +- .../AnnotationTransactionAttributeSourceTests.java | 2 +- .../annotation/AnnotationTransactionInterceptorTests.java | 2 +- .../AnnotationTransactionNamespaceHandlerTests.java | 2 +- .../annotation/EnableTransactionManagementTests.java | 2 +- .../transaction/config/AnnotationDrivenTests.java | 2 +- .../transaction/config/NoSynchTransactionManager.java | 2 +- .../transaction/config/SynchTransactionManager.java | 2 +- .../config/TransactionManagerConfiguration.java | 2 +- .../event/TransactionalEventListenerTests.java | 2 +- .../interceptor/BeanFactoryTransactionTests.java | 2 +- .../transaction/support/SimpleTransactionScopeTests.java | 2 +- .../annotationTransactionNamespaceHandlerTests.xml | 2 +- .../config/annotationDrivenProxyTargetClassTests.xml | 4 ++-- .../transaction/txNamespaceHandlerTests.xml | 2 +- .../testfixture}/CallCountingTransactionManager.java | 4 ++-- 40 files changed, 44 insertions(+), 40 deletions(-) rename spring-tx/src/test/java/org/springframework/{tests => }/transaction/MockJtaTransaction.java (96%) rename spring-tx/src/{test/java/org/springframework/tests/transaction => testFixtures/java/org/springframework/transaction/testfixture}/CallCountingTransactionManager.java (93%) diff --git a/buildSrc/src/main/java/org/springframework/build/testsources/TestSourcesPlugin.java b/buildSrc/src/main/java/org/springframework/build/testsources/TestSourcesPlugin.java index 0248464cc18..c2ced0a4e90 100644 --- a/buildSrc/src/main/java/org/springframework/build/testsources/TestSourcesPlugin.java +++ b/buildSrc/src/main/java/org/springframework/build/testsources/TestSourcesPlugin.java @@ -73,11 +73,11 @@ public class TestSourcesPlugin implements Plugin { "spring-jcl", "spring-jdbc", "spring-jms", - "spring-messaging" - // "spring-orm", - // "spring-oxm", + "spring-messaging", + "spring-orm", + "spring-oxm", // "spring-test", - // "spring-tx", + "spring-tx" // "spring-web", // "spring-webflux", // "spring-webmvc", diff --git a/integration-tests/integration-tests.gradle b/integration-tests/integration-tests.gradle index 539c743372d..add7b601218 100644 --- a/integration-tests/integration-tests.gradle +++ b/integration-tests/integration-tests.gradle @@ -9,6 +9,7 @@ dependencies { testCompile(project(":spring-core")) testCompile(testFixtures(project(":spring-beans"))) testCompile(testFixtures(project(":spring-core"))) + testCompile(testFixtures(project(":spring-tx"))) testCompile(project(":spring-expression")) testCompile(project(":spring-jdbc")) testCompile(project(":spring-orm")) diff --git a/integration-tests/src/test/java/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorIntegrationTests.java b/integration-tests/src/test/java/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorIntegrationTests.java index 987c643a65c..ed77a451938 100644 --- a/integration-tests/src/test/java/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorIntegrationTests.java +++ b/integration-tests/src/test/java/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorIntegrationTests.java @@ -34,9 +34,9 @@ import org.springframework.lang.Nullable; import org.springframework.tests.aop.advice.CountingBeforeAdvice; import org.springframework.tests.aop.advice.MethodCounter; import org.springframework.tests.aop.interceptor.NopInterceptor; -import org.springframework.tests.transaction.CallCountingTransactionManager; import org.springframework.transaction.NoTransactionException; import org.springframework.transaction.interceptor.TransactionInterceptor; +import org.springframework.transaction.testfixture.CallCountingTransactionManager; import static org.assertj.core.api.Assertions.assertThat; diff --git a/integration-tests/src/test/java/org/springframework/scheduling/annotation/ScheduledAndTransactionalAnnotationIntegrationTests.java b/integration-tests/src/test/java/org/springframework/scheduling/annotation/ScheduledAndTransactionalAnnotationIntegrationTests.java index af771522f82..8b49193b863 100644 --- a/integration-tests/src/test/java/org/springframework/scheduling/annotation/ScheduledAndTransactionalAnnotationIntegrationTests.java +++ b/integration-tests/src/test/java/org/springframework/scheduling/annotation/ScheduledAndTransactionalAnnotationIntegrationTests.java @@ -32,10 +32,10 @@ import org.springframework.core.testfixture.EnabledForTestGroups; import org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor; import org.springframework.dao.support.PersistenceExceptionTranslator; import org.springframework.stereotype.Repository; -import org.springframework.tests.transaction.CallCountingTransactionManager; import org.springframework.transaction.PlatformTransactionManager; import org.springframework.transaction.annotation.EnableTransactionManagement; import org.springframework.transaction.annotation.Transactional; +import org.springframework.transaction.testfixture.CallCountingTransactionManager; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; diff --git a/integration-tests/src/test/java/org/springframework/transaction/annotation/EnableTransactionManagementIntegrationTests.java b/integration-tests/src/test/java/org/springframework/transaction/annotation/EnableTransactionManagementIntegrationTests.java index 20dfe81d2f8..8ba437386b0 100644 --- a/integration-tests/src/test/java/org/springframework/transaction/annotation/EnableTransactionManagementIntegrationTests.java +++ b/integration-tests/src/test/java/org/springframework/transaction/annotation/EnableTransactionManagementIntegrationTests.java @@ -40,9 +40,9 @@ import org.springframework.jdbc.datasource.DataSourceTransactionManager; import org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseBuilder; import org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseType; import org.springframework.stereotype.Repository; -import org.springframework.tests.transaction.CallCountingTransactionManager; import org.springframework.transaction.PlatformTransactionManager; import org.springframework.transaction.interceptor.BeanFactoryTransactionAttributeSourceAdvisor; +import org.springframework.transaction.testfixture.CallCountingTransactionManager; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; diff --git a/integration-tests/src/test/resources/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorIntegrationTests-context.xml b/integration-tests/src/test/resources/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorIntegrationTests-context.xml index ab6309ff35b..504b7704009 100644 --- a/integration-tests/src/test/resources/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorIntegrationTests-context.xml +++ b/integration-tests/src/test/resources/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorIntegrationTests-context.xml @@ -34,7 +34,7 @@ - + diff --git a/spring-aspects/spring-aspects.gradle b/spring-aspects/spring-aspects.gradle index 26bd68f8821..d9b42ea4f71 100644 --- a/spring-aspects/spring-aspects.gradle +++ b/spring-aspects/spring-aspects.gradle @@ -27,6 +27,7 @@ dependencies { testCompile(testFixtures(project(":spring-context"))) testCompile(testFixtures(project(":spring-context-support"))) testCompile(testFixtures(project(":spring-core"))) + testCompile(testFixtures(project(":spring-tx"))) testCompile("javax.mail:javax.mail-api") testCompileOnly("org.aspectj:aspectjrt") } diff --git a/spring-aspects/src/test/java/org/springframework/transaction/aspectj/JtaTransactionAspectsTests.java b/spring-aspects/src/test/java/org/springframework/transaction/aspectj/JtaTransactionAspectsTests.java index aa478ba43c4..e0bd918a72e 100644 --- a/spring-aspects/src/test/java/org/springframework/transaction/aspectj/JtaTransactionAspectsTests.java +++ b/spring-aspects/src/test/java/org/springframework/transaction/aspectj/JtaTransactionAspectsTests.java @@ -27,7 +27,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.test.context.junit.jupiter.SpringJUnitConfig; -import org.springframework.tests.transaction.CallCountingTransactionManager; +import org.springframework.transaction.testfixture.CallCountingTransactionManager; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; diff --git a/spring-aspects/src/test/java/org/springframework/transaction/aspectj/TransactionAspectTests.java b/spring-aspects/src/test/java/org/springframework/transaction/aspectj/TransactionAspectTests.java index 978b2e2da70..722c357d20e 100644 --- a/spring-aspects/src/test/java/org/springframework/transaction/aspectj/TransactionAspectTests.java +++ b/spring-aspects/src/test/java/org/springframework/transaction/aspectj/TransactionAspectTests.java @@ -19,7 +19,7 @@ package org.springframework.transaction.aspectj; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; -import org.springframework.tests.transaction.CallCountingTransactionManager; +import org.springframework.transaction.testfixture.CallCountingTransactionManager; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; diff --git a/spring-context-support/spring-context-support.gradle b/spring-context-support/spring-context-support.gradle index 47ad91ccfad..f8a8631293a 100644 --- a/spring-context-support/spring-context-support.gradle +++ b/spring-context-support/spring-context-support.gradle @@ -18,6 +18,7 @@ dependencies { testCompile(testFixtures(project(":spring-beans"))) testCompile(testFixtures(project(":spring-context"))) testCompile(testFixtures(project(":spring-core"))) + testCompile(testFixtures(project(":spring-tx"))) testCompile("org.hsqldb:hsqldb") testCompile("org.hibernate:hibernate-validator") testCompile("javax.annotation:javax.annotation-api") diff --git a/spring-context-support/src/test/java/org/springframework/cache/jcache/JCacheEhCacheAnnotationTests.java b/spring-context-support/src/test/java/org/springframework/cache/jcache/JCacheEhCacheAnnotationTests.java index 16bf5623548..188cc293c97 100644 --- a/spring-context-support/src/test/java/org/springframework/cache/jcache/JCacheEhCacheAnnotationTests.java +++ b/spring-context-support/src/test/java/org/springframework/cache/jcache/JCacheEhCacheAnnotationTests.java @@ -39,8 +39,8 @@ import org.springframework.context.testfixture.cache.SomeCustomKeyGenerator; import org.springframework.context.testfixture.cache.beans.AnnotatedClassCacheableService; import org.springframework.context.testfixture.cache.beans.CacheableService; import org.springframework.context.testfixture.cache.beans.DefaultCacheableService; -import org.springframework.tests.transaction.CallCountingTransactionManager; import org.springframework.transaction.support.TransactionTemplate; +import org.springframework.transaction.testfixture.CallCountingTransactionManager; /** * @author Stephane Nicoll diff --git a/spring-context-support/src/test/java/org/springframework/cache/transaction/TransactionAwareCacheDecoratorTests.java b/spring-context-support/src/test/java/org/springframework/cache/transaction/TransactionAwareCacheDecoratorTests.java index 74337eb76e4..66369edfe6c 100644 --- a/spring-context-support/src/test/java/org/springframework/cache/transaction/TransactionAwareCacheDecoratorTests.java +++ b/spring-context-support/src/test/java/org/springframework/cache/transaction/TransactionAwareCacheDecoratorTests.java @@ -20,8 +20,8 @@ import org.junit.jupiter.api.Test; import org.springframework.cache.Cache; import org.springframework.cache.concurrent.ConcurrentMapCache; -import org.springframework.tests.transaction.CallCountingTransactionManager; import org.springframework.transaction.support.TransactionTemplate; +import org.springframework.transaction.testfixture.CallCountingTransactionManager; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException; diff --git a/spring-jms/spring-jms.gradle b/spring-jms/spring-jms.gradle index e47e9458ce5..784aead7da8 100644 --- a/spring-jms/spring-jms.gradle +++ b/spring-jms/spring-jms.gradle @@ -13,5 +13,6 @@ dependencies { optional("javax.transaction:javax.transaction-api") optional("com.fasterxml.jackson.core:jackson-databind") testCompile(testFixtures(project(":spring-beans"))) + testCompile(testFixtures(project(":spring-tx"))) testImplementation("javax.jms:javax.jms-api") } diff --git a/spring-jms/src/test/resources/org/springframework/jms/config/jmsNamespaceHandlerTests.xml b/spring-jms/src/test/resources/org/springframework/jms/config/jmsNamespaceHandlerTests.xml index 46d15b9eef5..e932080e2e4 100644 --- a/spring-jms/src/test/resources/org/springframework/jms/config/jmsNamespaceHandlerTests.xml +++ b/spring-jms/src/test/resources/org/springframework/jms/config/jmsNamespaceHandlerTests.xml @@ -68,7 +68,7 @@ - + diff --git a/spring-test/spring-test.gradle b/spring-test/spring-test.gradle index 053ab77e3bd..ec8708a8854 100644 --- a/spring-test/spring-test.gradle +++ b/spring-test/spring-test.gradle @@ -45,6 +45,7 @@ dependencies { testCompile(testFixtures(project(":spring-beans"))) testCompile(testFixtures(project(":spring-context"))) testCompile(testFixtures(project(":spring-core"))) + testCompile(testFixtures(project(":spring-tx"))) testCompile("javax.annotation:javax.annotation-api") testCompile("javax.cache:cache-api") testCompile("javax.ejb:javax.ejb-api") diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/spr9604/LookUpTxMgrViaTransactionManagementConfigurerTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/spr9604/LookUpTxMgrViaTransactionManagementConfigurerTests.java index 732275e3842..c1bcfec1e2f 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/spr9604/LookUpTxMgrViaTransactionManagementConfigurerTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/spr9604/LookUpTxMgrViaTransactionManagementConfigurerTests.java @@ -25,10 +25,10 @@ import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.test.context.transaction.AfterTransaction; import org.springframework.test.context.transaction.BeforeTransaction; -import org.springframework.tests.transaction.CallCountingTransactionManager; import org.springframework.transaction.PlatformTransactionManager; import org.springframework.transaction.annotation.TransactionManagementConfigurer; import org.springframework.transaction.annotation.Transactional; +import org.springframework.transaction.testfixture.CallCountingTransactionManager; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/spr9645/LookUpNonexistentTxMgrTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/spr9645/LookUpNonexistentTxMgrTests.java index e32f9117b28..5958079e45b 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/spr9645/LookUpNonexistentTxMgrTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/spr9645/LookUpNonexistentTxMgrTests.java @@ -23,8 +23,8 @@ import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; -import org.springframework.tests.transaction.CallCountingTransactionManager; import org.springframework.transaction.PlatformTransactionManager; +import org.springframework.transaction.testfixture.CallCountingTransactionManager; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/spr9645/LookUpTxMgrByTypeAndDefaultNameTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/spr9645/LookUpTxMgrByTypeAndDefaultNameTests.java index a832dd62157..6f2b0915045 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/spr9645/LookUpTxMgrByTypeAndDefaultNameTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/spr9645/LookUpTxMgrByTypeAndDefaultNameTests.java @@ -25,9 +25,9 @@ import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.test.context.transaction.AfterTransaction; import org.springframework.test.context.transaction.BeforeTransaction; -import org.springframework.tests.transaction.CallCountingTransactionManager; import org.springframework.transaction.PlatformTransactionManager; import org.springframework.transaction.annotation.Transactional; +import org.springframework.transaction.testfixture.CallCountingTransactionManager; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/spr9645/LookUpTxMgrByTypeAndNameTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/spr9645/LookUpTxMgrByTypeAndNameTests.java index 544158a6710..f14ffe106cc 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/spr9645/LookUpTxMgrByTypeAndNameTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/spr9645/LookUpTxMgrByTypeAndNameTests.java @@ -25,9 +25,9 @@ import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.test.context.transaction.AfterTransaction; import org.springframework.test.context.transaction.BeforeTransaction; -import org.springframework.tests.transaction.CallCountingTransactionManager; import org.springframework.transaction.PlatformTransactionManager; import org.springframework.transaction.annotation.Transactional; +import org.springframework.transaction.testfixture.CallCountingTransactionManager; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/spr9645/LookUpTxMgrByTypeAndQualifierAtClassLevelTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/spr9645/LookUpTxMgrByTypeAndQualifierAtClassLevelTests.java index 5823fc4f188..9f507a99239 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/spr9645/LookUpTxMgrByTypeAndQualifierAtClassLevelTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/spr9645/LookUpTxMgrByTypeAndQualifierAtClassLevelTests.java @@ -25,9 +25,9 @@ import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.test.context.transaction.AfterTransaction; import org.springframework.test.context.transaction.BeforeTransaction; -import org.springframework.tests.transaction.CallCountingTransactionManager; import org.springframework.transaction.PlatformTransactionManager; import org.springframework.transaction.annotation.Transactional; +import org.springframework.transaction.testfixture.CallCountingTransactionManager; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/spr9645/LookUpTxMgrByTypeAndQualifierAtMethodLevelTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/spr9645/LookUpTxMgrByTypeAndQualifierAtMethodLevelTests.java index 9c576c82463..b3aef4e781c 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/spr9645/LookUpTxMgrByTypeAndQualifierAtMethodLevelTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/spr9645/LookUpTxMgrByTypeAndQualifierAtMethodLevelTests.java @@ -25,9 +25,9 @@ import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.test.context.transaction.AfterTransaction; import org.springframework.test.context.transaction.BeforeTransaction; -import org.springframework.tests.transaction.CallCountingTransactionManager; import org.springframework.transaction.PlatformTransactionManager; import org.springframework.transaction.annotation.Transactional; +import org.springframework.transaction.testfixture.CallCountingTransactionManager; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/spr9645/LookUpTxMgrByTypeTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/spr9645/LookUpTxMgrByTypeTests.java index ebbab9f6103..835a911a72f 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/spr9645/LookUpTxMgrByTypeTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/spr9645/LookUpTxMgrByTypeTests.java @@ -25,9 +25,9 @@ import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.test.context.transaction.AfterTransaction; import org.springframework.test.context.transaction.BeforeTransaction; -import org.springframework.tests.transaction.CallCountingTransactionManager; import org.springframework.transaction.PlatformTransactionManager; import org.springframework.transaction.annotation.Transactional; +import org.springframework.transaction.testfixture.CallCountingTransactionManager; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-tx/src/test/java/org/springframework/transaction/JtaTransactionManagerTests.java b/spring-tx/src/test/java/org/springframework/transaction/JtaTransactionManagerTests.java index 2bb3a64b199..ef2b461a21c 100644 --- a/spring-tx/src/test/java/org/springframework/transaction/JtaTransactionManagerTests.java +++ b/spring-tx/src/test/java/org/springframework/transaction/JtaTransactionManagerTests.java @@ -30,7 +30,6 @@ import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.Test; import org.springframework.dao.OptimisticLockingFailureException; -import org.springframework.tests.transaction.MockJtaTransaction; import org.springframework.transaction.jta.JtaTransactionManager; import org.springframework.transaction.support.DefaultTransactionDefinition; import org.springframework.transaction.support.TransactionCallbackWithoutResult; diff --git a/spring-tx/src/test/java/org/springframework/tests/transaction/MockJtaTransaction.java b/spring-tx/src/test/java/org/springframework/transaction/MockJtaTransaction.java similarity index 96% rename from spring-tx/src/test/java/org/springframework/tests/transaction/MockJtaTransaction.java rename to spring-tx/src/test/java/org/springframework/transaction/MockJtaTransaction.java index 8569ef31896..2adbfa549bc 100644 --- a/spring-tx/src/test/java/org/springframework/tests/transaction/MockJtaTransaction.java +++ b/spring-tx/src/test/java/org/springframework/transaction/MockJtaTransaction.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.tests.transaction; +package org.springframework.transaction; import javax.transaction.Status; import javax.transaction.Synchronization; diff --git a/spring-tx/src/test/java/org/springframework/transaction/TxNamespaceHandlerTests.java b/spring-tx/src/test/java/org/springframework/transaction/TxNamespaceHandlerTests.java index f3fd77f005b..65367a1df7e 100644 --- a/spring-tx/src/test/java/org/springframework/transaction/TxNamespaceHandlerTests.java +++ b/spring-tx/src/test/java/org/springframework/transaction/TxNamespaceHandlerTests.java @@ -25,10 +25,10 @@ import org.springframework.aop.support.AopUtils; import org.springframework.beans.testfixture.beans.ITestBean; import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; -import org.springframework.tests.transaction.CallCountingTransactionManager; import org.springframework.transaction.interceptor.TransactionAttribute; import org.springframework.transaction.interceptor.TransactionAttributeSource; import org.springframework.transaction.interceptor.TransactionInterceptor; +import org.springframework.transaction.testfixture.CallCountingTransactionManager; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; diff --git a/spring-tx/src/test/java/org/springframework/transaction/annotation/AnnotationTransactionAttributeSourceTests.java b/spring-tx/src/test/java/org/springframework/transaction/annotation/AnnotationTransactionAttributeSourceTests.java index bb869e84744..cf1de5525bf 100644 --- a/spring-tx/src/test/java/org/springframework/transaction/annotation/AnnotationTransactionAttributeSourceTests.java +++ b/spring-tx/src/test/java/org/springframework/transaction/annotation/AnnotationTransactionAttributeSourceTests.java @@ -32,12 +32,12 @@ import org.springframework.aop.framework.Advised; import org.springframework.aop.framework.ProxyFactory; import org.springframework.core.annotation.AnnotationUtils; import org.springframework.core.testfixture.io.SerializationTestUtils; -import org.springframework.tests.transaction.CallCountingTransactionManager; import org.springframework.transaction.interceptor.NoRollbackRuleAttribute; import org.springframework.transaction.interceptor.RollbackRuleAttribute; import org.springframework.transaction.interceptor.RuleBasedTransactionAttribute; import org.springframework.transaction.interceptor.TransactionAttribute; import org.springframework.transaction.interceptor.TransactionInterceptor; +import org.springframework.transaction.testfixture.CallCountingTransactionManager; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-tx/src/test/java/org/springframework/transaction/annotation/AnnotationTransactionInterceptorTests.java b/spring-tx/src/test/java/org/springframework/transaction/annotation/AnnotationTransactionInterceptorTests.java index 561c41d6e76..c7477db0157 100644 --- a/spring-tx/src/test/java/org/springframework/transaction/annotation/AnnotationTransactionInterceptorTests.java +++ b/spring-tx/src/test/java/org/springframework/transaction/annotation/AnnotationTransactionInterceptorTests.java @@ -20,9 +20,9 @@ import io.vavr.control.Try; import org.junit.jupiter.api.Test; import org.springframework.aop.framework.ProxyFactory; -import org.springframework.tests.transaction.CallCountingTransactionManager; import org.springframework.transaction.interceptor.TransactionInterceptor; import org.springframework.transaction.support.TransactionSynchronizationManager; +import org.springframework.transaction.testfixture.CallCountingTransactionManager; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; diff --git a/spring-tx/src/test/java/org/springframework/transaction/annotation/AnnotationTransactionNamespaceHandlerTests.java b/spring-tx/src/test/java/org/springframework/transaction/annotation/AnnotationTransactionNamespaceHandlerTests.java index a485250e9a1..3f4814bd9e2 100644 --- a/spring-tx/src/test/java/org/springframework/transaction/annotation/AnnotationTransactionNamespaceHandlerTests.java +++ b/spring-tx/src/test/java/org/springframework/transaction/annotation/AnnotationTransactionNamespaceHandlerTests.java @@ -32,9 +32,9 @@ import org.springframework.context.support.ClassPathXmlApplicationContext; import org.springframework.jmx.export.annotation.ManagedOperation; import org.springframework.jmx.export.annotation.ManagedResource; import org.springframework.stereotype.Service; -import org.springframework.tests.transaction.CallCountingTransactionManager; import org.springframework.transaction.config.TransactionManagementConfigUtils; import org.springframework.transaction.event.TransactionalEventListenerFactory; +import org.springframework.transaction.testfixture.CallCountingTransactionManager; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; diff --git a/spring-tx/src/test/java/org/springframework/transaction/annotation/EnableTransactionManagementTests.java b/spring-tx/src/test/java/org/springframework/transaction/annotation/EnableTransactionManagementTests.java index be89cce0bff..e2016f10672 100644 --- a/spring-tx/src/test/java/org/springframework/transaction/annotation/EnableTransactionManagementTests.java +++ b/spring-tx/src/test/java/org/springframework/transaction/annotation/EnableTransactionManagementTests.java @@ -33,10 +33,10 @@ import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.ConfigurationCondition; import org.springframework.core.type.AnnotatedTypeMetadata; import org.springframework.stereotype.Service; -import org.springframework.tests.transaction.CallCountingTransactionManager; import org.springframework.transaction.PlatformTransactionManager; import org.springframework.transaction.config.TransactionManagementConfigUtils; import org.springframework.transaction.event.TransactionalEventListenerFactory; +import org.springframework.transaction.testfixture.CallCountingTransactionManager; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; diff --git a/spring-tx/src/test/java/org/springframework/transaction/config/AnnotationDrivenTests.java b/spring-tx/src/test/java/org/springframework/transaction/config/AnnotationDrivenTests.java index 5760d3b351a..2d19c185e57 100644 --- a/spring-tx/src/test/java/org/springframework/transaction/config/AnnotationDrivenTests.java +++ b/spring-tx/src/test/java/org/springframework/transaction/config/AnnotationDrivenTests.java @@ -28,8 +28,8 @@ import org.springframework.context.ApplicationContext; import org.springframework.context.annotation.AnnotationConfigApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; import org.springframework.core.testfixture.io.SerializationTestUtils; -import org.springframework.tests.transaction.CallCountingTransactionManager; import org.springframework.transaction.support.TransactionSynchronizationManager; +import org.springframework.transaction.testfixture.CallCountingTransactionManager; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-tx/src/test/java/org/springframework/transaction/config/NoSynchTransactionManager.java b/spring-tx/src/test/java/org/springframework/transaction/config/NoSynchTransactionManager.java index a4e6ec1b548..a537a1a50af 100644 --- a/spring-tx/src/test/java/org/springframework/transaction/config/NoSynchTransactionManager.java +++ b/spring-tx/src/test/java/org/springframework/transaction/config/NoSynchTransactionManager.java @@ -16,7 +16,7 @@ package org.springframework.transaction.config; -import org.springframework.tests.transaction.CallCountingTransactionManager; +import org.springframework.transaction.testfixture.CallCountingTransactionManager; /** * @author Juergen Hoeller diff --git a/spring-tx/src/test/java/org/springframework/transaction/config/SynchTransactionManager.java b/spring-tx/src/test/java/org/springframework/transaction/config/SynchTransactionManager.java index a09e1582df3..7969ec56204 100644 --- a/spring-tx/src/test/java/org/springframework/transaction/config/SynchTransactionManager.java +++ b/spring-tx/src/test/java/org/springframework/transaction/config/SynchTransactionManager.java @@ -17,7 +17,7 @@ package org.springframework.transaction.config; import org.springframework.beans.factory.annotation.Qualifier; -import org.springframework.tests.transaction.CallCountingTransactionManager; +import org.springframework.transaction.testfixture.CallCountingTransactionManager; /** * @author Juergen Hoeller diff --git a/spring-tx/src/test/java/org/springframework/transaction/config/TransactionManagerConfiguration.java b/spring-tx/src/test/java/org/springframework/transaction/config/TransactionManagerConfiguration.java index af0e5a351cb..638f40248db 100644 --- a/spring-tx/src/test/java/org/springframework/transaction/config/TransactionManagerConfiguration.java +++ b/spring-tx/src/test/java/org/springframework/transaction/config/TransactionManagerConfiguration.java @@ -19,8 +19,8 @@ package org.springframework.transaction.config; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; -import org.springframework.tests.transaction.CallCountingTransactionManager; import org.springframework.transaction.PlatformTransactionManager; +import org.springframework.transaction.testfixture.CallCountingTransactionManager; /** * @author Juergen Hoeller diff --git a/spring-tx/src/test/java/org/springframework/transaction/event/TransactionalEventListenerTests.java b/spring-tx/src/test/java/org/springframework/transaction/event/TransactionalEventListenerTests.java index edb5a8494f4..98b3b22318f 100644 --- a/spring-tx/src/test/java/org/springframework/transaction/event/TransactionalEventListenerTests.java +++ b/spring-tx/src/test/java/org/springframework/transaction/event/TransactionalEventListenerTests.java @@ -38,13 +38,13 @@ import org.springframework.context.annotation.Configuration; import org.springframework.context.event.EventListener; import org.springframework.core.annotation.Order; import org.springframework.stereotype.Component; -import org.springframework.tests.transaction.CallCountingTransactionManager; import org.springframework.transaction.annotation.EnableTransactionManagement; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.support.TransactionSynchronizationAdapter; import org.springframework.transaction.support.TransactionSynchronizationManager; import org.springframework.transaction.support.TransactionTemplate; +import org.springframework.transaction.testfixture.CallCountingTransactionManager; import org.springframework.util.LinkedMultiValueMap; import org.springframework.util.MultiValueMap; diff --git a/spring-tx/src/test/java/org/springframework/transaction/interceptor/BeanFactoryTransactionTests.java b/spring-tx/src/test/java/org/springframework/transaction/interceptor/BeanFactoryTransactionTests.java index bf2f8012d0a..0f49ea78350 100644 --- a/spring-tx/src/test/java/org/springframework/transaction/interceptor/BeanFactoryTransactionTests.java +++ b/spring-tx/src/test/java/org/springframework/transaction/interceptor/BeanFactoryTransactionTests.java @@ -36,11 +36,11 @@ import org.springframework.beans.testfixture.beans.ITestBean; import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.core.io.ClassPathResource; import org.springframework.lang.Nullable; -import org.springframework.tests.transaction.CallCountingTransactionManager; import org.springframework.transaction.PlatformTransactionManager; import org.springframework.transaction.TransactionDefinition; import org.springframework.transaction.TransactionException; import org.springframework.transaction.TransactionStatus; +import org.springframework.transaction.testfixture.CallCountingTransactionManager; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; diff --git a/spring-tx/src/test/java/org/springframework/transaction/support/SimpleTransactionScopeTests.java b/spring-tx/src/test/java/org/springframework/transaction/support/SimpleTransactionScopeTests.java index c99774c7167..0f3d0f3772a 100644 --- a/spring-tx/src/test/java/org/springframework/transaction/support/SimpleTransactionScopeTests.java +++ b/spring-tx/src/test/java/org/springframework/transaction/support/SimpleTransactionScopeTests.java @@ -26,7 +26,7 @@ import org.springframework.beans.factory.support.GenericBeanDefinition; import org.springframework.beans.testfixture.beans.DerivedTestBean; import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.context.support.GenericApplicationContext; -import org.springframework.tests.transaction.CallCountingTransactionManager; +import org.springframework.transaction.testfixture.CallCountingTransactionManager; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; diff --git a/spring-tx/src/test/resources/org/springframework/transaction/annotation/annotationTransactionNamespaceHandlerTests.xml b/spring-tx/src/test/resources/org/springframework/transaction/annotation/annotationTransactionNamespaceHandlerTests.xml index 868ac0c6d90..e76c84e4599 100644 --- a/spring-tx/src/test/resources/org/springframework/transaction/annotation/annotationTransactionNamespaceHandlerTests.xml +++ b/spring-tx/src/test/resources/org/springframework/transaction/annotation/annotationTransactionNamespaceHandlerTests.xml @@ -9,7 +9,7 @@ - + diff --git a/spring-tx/src/test/resources/org/springframework/transaction/config/annotationDrivenProxyTargetClassTests.xml b/spring-tx/src/test/resources/org/springframework/transaction/config/annotationDrivenProxyTargetClassTests.xml index fc59ae34b5b..69ff36c4ae7 100644 --- a/spring-tx/src/test/resources/org/springframework/transaction/config/annotationDrivenProxyTargetClassTests.xml +++ b/spring-tx/src/test/resources/org/springframework/transaction/config/annotationDrivenProxyTargetClassTests.xml @@ -12,11 +12,11 @@ - + - + diff --git a/spring-tx/src/test/resources/org/springframework/transaction/txNamespaceHandlerTests.xml b/spring-tx/src/test/resources/org/springframework/transaction/txNamespaceHandlerTests.xml index 8e3b2411fda..5214570c815 100644 --- a/spring-tx/src/test/resources/org/springframework/transaction/txNamespaceHandlerTests.xml +++ b/spring-tx/src/test/resources/org/springframework/transaction/txNamespaceHandlerTests.xml @@ -26,7 +26,7 @@ - + diff --git a/spring-tx/src/test/java/org/springframework/tests/transaction/CallCountingTransactionManager.java b/spring-tx/src/testFixtures/java/org/springframework/transaction/testfixture/CallCountingTransactionManager.java similarity index 93% rename from spring-tx/src/test/java/org/springframework/tests/transaction/CallCountingTransactionManager.java rename to spring-tx/src/testFixtures/java/org/springframework/transaction/testfixture/CallCountingTransactionManager.java index fd6acbad77f..8295522e843 100644 --- a/spring-tx/src/test/java/org/springframework/tests/transaction/CallCountingTransactionManager.java +++ b/spring-tx/src/testFixtures/java/org/springframework/transaction/testfixture/CallCountingTransactionManager.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2012 the original author or authors. + * Copyright 2002-2019 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. @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.tests.transaction; +package org.springframework.transaction.testfixture; import org.springframework.transaction.TransactionDefinition; import org.springframework.transaction.support.AbstractPlatformTransactionManager; From 8a371c76697a596ff409cb63c6cadde6660e140c Mon Sep 17 00:00:00 2001 From: Sam Brannen Date: Sun, 29 Dec 2019 19:15:23 +0100 Subject: [PATCH 10/13] Use Gradle test fixture support for spring-aop See gh-23550 --- .../build/testsources/TestSourcesPlugin.java | 3 +- integration-tests/integration-tests.gradle | 1 + ...visorAutoProxyCreatorIntegrationTests.java | 6 ++-- ...toProxyCreatorIntegrationTests-context.xml | 2 +- spring-aop/spring-aop.gradle | 1 + .../aop/framework/ProxyFactoryTests.java | 30 ++----------------- .../adapter/ThrowsAdviceInterceptorTests.java | 24 +-------------- .../aop/support/AopUtilsTests.java | 2 +- .../aop/support/ControlFlowPointcutTests.java | 2 +- ...elegatingIntroductionInterceptorTests.java | 2 +- .../support/NameMatchMethodPointcutTests.java | 4 +-- ...MethodPointcutAdvisorIntegrationTests.java | 4 +-- .../target/HotSwappableTargetSourceTests.java | 2 +- ...poseInvocationInterceptorTests-context.xml | 4 +-- ...ointcutAdvisorIntegrationTests-context.xml | 2 +- .../PrototypeTargetSourceTests-context.xml | 2 +- .../ThreadLocalTargetSourceTests-context.xml | 2 +- .../advice/CountingAfterReturningAdvice.java | 4 +-- .../advice/CountingBeforeAdvice.java | 4 +-- .../testfixture}/advice/MethodCounter.java | 4 +-- .../testfixture}/advice/MyThrowsHandler.java | 5 +++- .../advice/TimestampIntroductionAdvisor.java | 4 +-- .../interceptor/NopInterceptor.java | 2 +- .../SerializableNopInterceptor.java | 2 +- .../TimestampIntroductionInterceptor.java | 2 +- spring-context/spring-context.gradle | 1 + .../aop/config/AopNamespaceHandlerTests.java | 2 +- .../aop/framework/AbstractAopProxyTests.java | 14 ++++----- .../aop/framework/CglibProxyTests.java | 4 +-- .../aop/framework/ProxyFactoryBeanTests.java | 8 ++--- .../AdvisorAutoProxyCreatorTests.java | 4 +-- .../BeanNameAutoProxyCreatorTests.java | 4 +-- .../support/CustomNamespaceHandlerTests.java | 2 +- .../jmx/export/MBeanExporterTests.java | 2 +- .../AbstractMetadataAssemblerTests.java | 2 +- ...pNamespaceHandlerAdviceTypeTests-error.xml | 4 +-- .../AopNamespaceHandlerAdviceTypeTests-ok.xml | 4 +-- ...AopNamespaceHandlerArgNamesTests-error.xml | 4 +-- .../AopNamespaceHandlerArgNamesTests-ok.xml | 4 +-- ...ceHandlerProxyTargetClassTests-context.xml | 4 +-- ...opNamespaceHandlerReturningTests-error.xml | 4 +-- .../AopNamespaceHandlerReturningTests-ok.xml | 4 +-- .../AopNamespaceHandlerTests-context.xml | 4 +-- ...AopNamespaceHandlerThrowingTests-error.xml | 4 +-- .../AopNamespaceHandlerThrowingTests-ok.xml | 4 +-- .../ProxyFactoryBeanTests-autowiring.xml | 2 +- .../ProxyFactoryBeanTests-context.xml | 2 +- ...xyFactoryBeanTests-double-targetsource.xml | 2 +- .../ProxyFactoryBeanTests-frozen.xml | 2 +- ...roxyFactoryBeanTests-inner-bean-target.xml | 2 +- ...yFactoryBeanTests-notlast-targetsource.xml | 2 +- .../ProxyFactoryBeanTests-prototype.xml | 2 +- .../ProxyFactoryBeanTests-serialization.xml | 4 +-- .../ProxyFactoryBeanTests-targetsource.xml | 4 +-- .../ProxyFactoryBeanTests-throws-advice.xml | 6 ++-- ...oProxyCreatorTests-common-interceptors.xml | 4 +-- ...AdvisorAutoProxyCreatorTests-optimized.xml | 2 +- .../BeanNameAutoProxyCreatorTests-context.xml | 8 ++--- .../CommonsPool2TargetSourceTests-context.xml | 4 +-- 59 files changed, 105 insertions(+), 144 deletions(-) rename spring-aop/src/{test/java/org/springframework/tests/aop => testFixtures/java/org/springframework/aop/testfixture}/advice/CountingAfterReturningAdvice.java (90%) rename spring-aop/src/{test/java/org/springframework/tests/aop => testFixtures/java/org/springframework/aop/testfixture}/advice/CountingBeforeAdvice.java (90%) rename spring-aop/src/{test/java/org/springframework/tests/aop => testFixtures/java/org/springframework/aop/testfixture}/advice/MethodCounter.java (94%) rename spring-aop/src/{test/java/org/springframework/tests/aop => testFixtures/java/org/springframework/aop/testfixture}/advice/MyThrowsHandler.java (95%) rename spring-aop/src/{test/java/org/springframework/tests/aop => testFixtures/java/org/springframework/aop/testfixture}/advice/TimestampIntroductionAdvisor.java (88%) rename spring-aop/src/{test/java/org/springframework/tests/aop => testFixtures/java/org/springframework/aop/testfixture}/interceptor/NopInterceptor.java (96%) rename spring-aop/src/{test/java/org/springframework/tests/aop => testFixtures/java/org/springframework/aop/testfixture}/interceptor/SerializableNopInterceptor.java (95%) rename spring-aop/src/{test/java/org/springframework/tests/aop => testFixtures/java/org/springframework/aop/testfixture}/interceptor/TimestampIntroductionInterceptor.java (95%) diff --git a/buildSrc/src/main/java/org/springframework/build/testsources/TestSourcesPlugin.java b/buildSrc/src/main/java/org/springframework/build/testsources/TestSourcesPlugin.java index c2ced0a4e90..130a5cac22e 100644 --- a/buildSrc/src/main/java/org/springframework/build/testsources/TestSourcesPlugin.java +++ b/buildSrc/src/main/java/org/springframework/build/testsources/TestSourcesPlugin.java @@ -62,7 +62,8 @@ public class TestSourcesPlugin implements Plugin { private static final List excludedProjects = Arrays.asList( "integration-tests", "kotlin-coroutines", - // "spring-aop", + "spring-aop", + "spring-aspects", "spring-beans", "spring-context", "spring-context-indexer", diff --git a/integration-tests/integration-tests.gradle b/integration-tests/integration-tests.gradle index add7b601218..5e18462c1e8 100644 --- a/integration-tests/integration-tests.gradle +++ b/integration-tests/integration-tests.gradle @@ -7,6 +7,7 @@ dependencies { testCompile(project(":spring-beans")) testCompile(project(":spring-context")) testCompile(project(":spring-core")) + testCompile(testFixtures(project(":spring-aop"))) testCompile(testFixtures(project(":spring-beans"))) testCompile(testFixtures(project(":spring-core"))) testCompile(testFixtures(project(":spring-tx"))) diff --git a/integration-tests/src/test/java/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorIntegrationTests.java b/integration-tests/src/test/java/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorIntegrationTests.java index ed77a451938..cf067e01415 100644 --- a/integration-tests/src/test/java/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorIntegrationTests.java +++ b/integration-tests/src/test/java/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorIntegrationTests.java @@ -26,14 +26,14 @@ import org.junit.jupiter.api.Test; import org.springframework.aop.support.AopUtils; import org.springframework.aop.support.StaticMethodMatcherPointcutAdvisor; +import org.springframework.aop.testfixture.advice.CountingBeforeAdvice; +import org.springframework.aop.testfixture.advice.MethodCounter; +import org.springframework.aop.testfixture.interceptor.NopInterceptor; import org.springframework.beans.factory.BeanFactory; import org.springframework.beans.factory.InitializingBean; import org.springframework.beans.testfixture.beans.ITestBean; import org.springframework.context.support.ClassPathXmlApplicationContext; import org.springframework.lang.Nullable; -import org.springframework.tests.aop.advice.CountingBeforeAdvice; -import org.springframework.tests.aop.advice.MethodCounter; -import org.springframework.tests.aop.interceptor.NopInterceptor; import org.springframework.transaction.NoTransactionException; import org.springframework.transaction.interceptor.TransactionInterceptor; import org.springframework.transaction.testfixture.CallCountingTransactionManager; diff --git a/integration-tests/src/test/resources/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorIntegrationTests-context.xml b/integration-tests/src/test/resources/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorIntegrationTests-context.xml index 504b7704009..90ea7dc1f66 100644 --- a/integration-tests/src/test/resources/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorIntegrationTests-context.xml +++ b/integration-tests/src/test/resources/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorIntegrationTests-context.xml @@ -85,7 +85,7 @@ org.springframework.beans.testfixture.beans.ITestBean.getName - + 4 diff --git a/spring-aop/spring-aop.gradle b/spring-aop/spring-aop.gradle index 64c8fc6ef60..73bb378f39a 100644 --- a/spring-aop/spring-aop.gradle +++ b/spring-aop/spring-aop.gradle @@ -8,4 +8,5 @@ dependencies { optional("com.jamonapi:jamon") testCompile(testFixtures(project(":spring-beans"))) testCompile(testFixtures(project(":spring-core"))) + testFixturesImplementation(testFixtures(project(":spring-core"))) } diff --git a/spring-aop/src/test/java/org/springframework/aop/framework/ProxyFactoryTests.java b/spring-aop/src/test/java/org/springframework/aop/framework/ProxyFactoryTests.java index 033824508e2..2ae1d635116 100644 --- a/spring-aop/src/test/java/org/springframework/aop/framework/ProxyFactoryTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/framework/ProxyFactoryTests.java @@ -33,15 +33,15 @@ import org.springframework.aop.interceptor.DebugInterceptor; import org.springframework.aop.support.AopUtils; import org.springframework.aop.support.DefaultIntroductionAdvisor; import org.springframework.aop.support.DefaultPointcutAdvisor; -import org.springframework.aop.support.DelegatingIntroductionInterceptor; +import org.springframework.aop.testfixture.advice.CountingBeforeAdvice; +import org.springframework.aop.testfixture.interceptor.NopInterceptor; +import org.springframework.aop.testfixture.interceptor.TimestampIntroductionInterceptor; import org.springframework.beans.testfixture.beans.IOther; import org.springframework.beans.testfixture.beans.ITestBean; import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.core.annotation.AnnotationAwareOrderComparator; import org.springframework.core.annotation.Order; import org.springframework.core.testfixture.TimeStamped; -import org.springframework.tests.aop.advice.CountingBeforeAdvice; -import org.springframework.tests.aop.interceptor.NopInterceptor; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; @@ -371,30 +371,6 @@ public class ProxyFactoryTests { } - @SuppressWarnings("serial") - private static class TimestampIntroductionInterceptor extends DelegatingIntroductionInterceptor - implements TimeStamped { - - private long ts; - - public TimestampIntroductionInterceptor() { - } - - public TimestampIntroductionInterceptor(long ts) { - this.ts = ts; - } - - public void setTime(long ts) { - this.ts = ts; - } - - @Override - public long getTimeStamp() { - return ts; - } - } - - @Order(2) public static class A implements Runnable { diff --git a/spring-aop/src/test/java/org/springframework/aop/framework/adapter/ThrowsAdviceInterceptorTests.java b/spring-aop/src/test/java/org/springframework/aop/framework/adapter/ThrowsAdviceInterceptorTests.java index a836bcc0031..2c1060274e7 100644 --- a/spring-aop/src/test/java/org/springframework/aop/framework/adapter/ThrowsAdviceInterceptorTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/framework/adapter/ThrowsAdviceInterceptorTests.java @@ -17,16 +17,13 @@ package org.springframework.aop.framework.adapter; import java.io.FileNotFoundException; -import java.io.IOException; -import java.lang.reflect.Method; import java.rmi.ConnectException; import java.rmi.RemoteException; import org.aopalliance.intercept.MethodInvocation; import org.junit.jupiter.api.Test; -import org.springframework.aop.ThrowsAdvice; -import org.springframework.tests.aop.advice.MethodCounter; +import org.springframework.aop.testfixture.advice.MyThrowsHandler; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; @@ -128,23 +125,4 @@ public class ThrowsAdviceInterceptorTests { assertThat(th.getCalls("remoteException")).isEqualTo(1); } - - @SuppressWarnings("serial") - static class MyThrowsHandler extends MethodCounter implements ThrowsAdvice { - - // Full method signature - public void afterThrowing(Method m, Object[] args, Object target, IOException ex) { - count("ioException"); - } - - public void afterThrowing(RemoteException ex) throws Throwable { - count("remoteException"); - } - - /** Not valid, wrong number of arguments */ - public void afterThrowing(Method m, Exception ex) throws Throwable { - throw new UnsupportedOperationException("Shouldn't be called"); - } - } - } diff --git a/spring-aop/src/test/java/org/springframework/aop/support/AopUtilsTests.java b/spring-aop/src/test/java/org/springframework/aop/support/AopUtilsTests.java index eeeedd8efb9..dc5437e6cd6 100644 --- a/spring-aop/src/test/java/org/springframework/aop/support/AopUtilsTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/support/AopUtilsTests.java @@ -25,10 +25,10 @@ import org.springframework.aop.MethodMatcher; import org.springframework.aop.Pointcut; import org.springframework.aop.interceptor.ExposeInvocationInterceptor; import org.springframework.aop.target.EmptyTargetSource; +import org.springframework.aop.testfixture.interceptor.NopInterceptor; import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.core.testfixture.io.SerializationTestUtils; import org.springframework.lang.Nullable; -import org.springframework.tests.aop.interceptor.NopInterceptor; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-aop/src/test/java/org/springframework/aop/support/ControlFlowPointcutTests.java b/spring-aop/src/test/java/org/springframework/aop/support/ControlFlowPointcutTests.java index 69251aaebc4..f86c6e7ca9f 100644 --- a/spring-aop/src/test/java/org/springframework/aop/support/ControlFlowPointcutTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/support/ControlFlowPointcutTests.java @@ -20,9 +20,9 @@ import org.junit.jupiter.api.Test; import org.springframework.aop.Pointcut; import org.springframework.aop.framework.ProxyFactory; +import org.springframework.aop.testfixture.interceptor.NopInterceptor; import org.springframework.beans.testfixture.beans.ITestBean; import org.springframework.beans.testfixture.beans.TestBean; -import org.springframework.tests.aop.interceptor.NopInterceptor; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-aop/src/test/java/org/springframework/aop/support/DelegatingIntroductionInterceptorTests.java b/spring-aop/src/test/java/org/springframework/aop/support/DelegatingIntroductionInterceptorTests.java index b0330ff6821..4325e582704 100644 --- a/spring-aop/src/test/java/org/springframework/aop/support/DelegatingIntroductionInterceptorTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/support/DelegatingIntroductionInterceptorTests.java @@ -24,6 +24,7 @@ import org.junit.jupiter.api.Test; import org.springframework.aop.IntroductionAdvisor; import org.springframework.aop.IntroductionInterceptor; import org.springframework.aop.framework.ProxyFactory; +import org.springframework.aop.testfixture.interceptor.SerializableNopInterceptor; import org.springframework.beans.testfixture.beans.INestedTestBean; import org.springframework.beans.testfixture.beans.ITestBean; import org.springframework.beans.testfixture.beans.NestedTestBean; @@ -32,7 +33,6 @@ import org.springframework.beans.testfixture.beans.SerializablePerson; import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.core.testfixture.TimeStamped; import org.springframework.core.testfixture.io.SerializationTestUtils; -import org.springframework.tests.aop.interceptor.SerializableNopInterceptor; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException; diff --git a/spring-aop/src/test/java/org/springframework/aop/support/NameMatchMethodPointcutTests.java b/spring-aop/src/test/java/org/springframework/aop/support/NameMatchMethodPointcutTests.java index e344536e21a..98f7ca29a97 100644 --- a/spring-aop/src/test/java/org/springframework/aop/support/NameMatchMethodPointcutTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/support/NameMatchMethodPointcutTests.java @@ -21,11 +21,11 @@ import org.junit.jupiter.api.Test; import org.springframework.aop.framework.Advised; import org.springframework.aop.framework.ProxyFactory; +import org.springframework.aop.testfixture.interceptor.NopInterceptor; +import org.springframework.aop.testfixture.interceptor.SerializableNopInterceptor; import org.springframework.beans.testfixture.beans.Person; import org.springframework.beans.testfixture.beans.SerializablePerson; import org.springframework.core.testfixture.io.SerializationTestUtils; -import org.springframework.tests.aop.interceptor.NopInterceptor; -import org.springframework.tests.aop.interceptor.SerializableNopInterceptor; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-aop/src/test/java/org/springframework/aop/support/RegexpMethodPointcutAdvisorIntegrationTests.java b/spring-aop/src/test/java/org/springframework/aop/support/RegexpMethodPointcutAdvisorIntegrationTests.java index 00021faeb8f..de3886ef85e 100644 --- a/spring-aop/src/test/java/org/springframework/aop/support/RegexpMethodPointcutAdvisorIntegrationTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/support/RegexpMethodPointcutAdvisorIntegrationTests.java @@ -19,6 +19,8 @@ package org.springframework.aop.support; import org.junit.jupiter.api.Test; import org.springframework.aop.framework.Advised; +import org.springframework.aop.testfixture.interceptor.NopInterceptor; +import org.springframework.aop.testfixture.interceptor.SerializableNopInterceptor; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; import org.springframework.beans.testfixture.beans.ITestBean; @@ -26,8 +28,6 @@ import org.springframework.beans.testfixture.beans.Person; import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.core.io.Resource; import org.springframework.core.testfixture.io.SerializationTestUtils; -import org.springframework.tests.aop.interceptor.NopInterceptor; -import org.springframework.tests.aop.interceptor.SerializableNopInterceptor; import static org.assertj.core.api.Assertions.assertThat; import static org.springframework.core.testfixture.io.ResourceTestUtils.qualifiedResource; diff --git a/spring-aop/src/test/java/org/springframework/aop/target/HotSwappableTargetSourceTests.java b/spring-aop/src/test/java/org/springframework/aop/target/HotSwappableTargetSourceTests.java index ca10d0f1b93..a3354a5587f 100644 --- a/spring-aop/src/test/java/org/springframework/aop/target/HotSwappableTargetSourceTests.java +++ b/spring-aop/src/test/java/org/springframework/aop/target/HotSwappableTargetSourceTests.java @@ -23,13 +23,13 @@ import org.junit.jupiter.api.Test; import org.springframework.aop.framework.Advised; import org.springframework.aop.framework.ProxyFactory; import org.springframework.aop.support.DefaultPointcutAdvisor; +import org.springframework.aop.testfixture.interceptor.SerializableNopInterceptor; import org.springframework.beans.factory.support.DefaultListableBeanFactory; import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; import org.springframework.beans.testfixture.beans.Person; import org.springframework.beans.testfixture.beans.SerializablePerson; import org.springframework.beans.testfixture.beans.SideEffectBean; import org.springframework.core.testfixture.io.SerializationTestUtils; -import org.springframework.tests.aop.interceptor.SerializableNopInterceptor; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException; diff --git a/spring-aop/src/test/resources/org/springframework/aop/interceptor/ExposeInvocationInterceptorTests-context.xml b/spring-aop/src/test/resources/org/springframework/aop/interceptor/ExposeInvocationInterceptorTests-context.xml index 1bfd0c2814b..a5bf0f37d9c 100644 --- a/spring-aop/src/test/resources/org/springframework/aop/interceptor/ExposeInvocationInterceptorTests-context.xml +++ b/spring-aop/src/test/resources/org/springframework/aop/interceptor/ExposeInvocationInterceptorTests-context.xml @@ -6,7 +6,7 @@ --> - + @@ -15,7 +15,7 @@ INSTANCE - + diff --git a/spring-aop/src/test/resources/org/springframework/aop/support/RegexpMethodPointcutAdvisorIntegrationTests-context.xml b/spring-aop/src/test/resources/org/springframework/aop/support/RegexpMethodPointcutAdvisorIntegrationTests-context.xml index b4e8fec10d2..967e42b6868 100644 --- a/spring-aop/src/test/resources/org/springframework/aop/support/RegexpMethodPointcutAdvisorIntegrationTests-context.xml +++ b/spring-aop/src/test/resources/org/springframework/aop/support/RegexpMethodPointcutAdvisorIntegrationTests-context.xml @@ -9,7 +9,7 @@ 666 - + diff --git a/spring-aop/src/test/resources/org/springframework/aop/target/PrototypeTargetSourceTests-context.xml b/spring-aop/src/test/resources/org/springframework/aop/target/PrototypeTargetSourceTests-context.xml index 9689ba92e8f..53513ecf1df 100644 --- a/spring-aop/src/test/resources/org/springframework/aop/target/PrototypeTargetSourceTests-context.xml +++ b/spring-aop/src/test/resources/org/springframework/aop/target/PrototypeTargetSourceTests-context.xml @@ -16,7 +16,7 @@ prototypeTest - + debugInterceptor,test diff --git a/spring-aop/src/test/resources/org/springframework/aop/target/ThreadLocalTargetSourceTests-context.xml b/spring-aop/src/test/resources/org/springframework/aop/target/ThreadLocalTargetSourceTests-context.xml index 40f77d3f979..778c8c1d7f0 100644 --- a/spring-aop/src/test/resources/org/springframework/aop/target/ThreadLocalTargetSourceTests-context.xml +++ b/spring-aop/src/test/resources/org/springframework/aop/target/ThreadLocalTargetSourceTests-context.xml @@ -11,7 +11,7 @@ prototypeTest - + diff --git a/spring-context/src/test/resources/org/springframework/aop/framework/ProxyFactoryBeanTests-context.xml b/spring-context/src/test/resources/org/springframework/aop/framework/ProxyFactoryBeanTests-context.xml index b7eaa18ef82..a8a77341e52 100644 --- a/spring-context/src/test/resources/org/springframework/aop/framework/ProxyFactoryBeanTests-context.xml +++ b/spring-context/src/test/resources/org/springframework/aop/framework/ProxyFactoryBeanTests-context.xml @@ -9,7 +9,7 @@ 666 - + org.springframework.beans.testfixture.beans.ITestBean diff --git a/spring-context/src/test/resources/org/springframework/aop/framework/ProxyFactoryBeanTests-double-targetsource.xml b/spring-context/src/test/resources/org/springframework/aop/framework/ProxyFactoryBeanTests-double-targetsource.xml index 3fb58b993c8..4738c1abc5c 100644 --- a/spring-context/src/test/resources/org/springframework/aop/framework/ProxyFactoryBeanTests-double-targetsource.xml +++ b/spring-context/src/test/resources/org/springframework/aop/framework/ProxyFactoryBeanTests-double-targetsource.xml @@ -27,7 +27,7 @@ - + - + - + - + serializableNopInterceptor diff --git a/spring-context/src/test/resources/org/springframework/aop/framework/ProxyFactoryBeanTests-targetsource.xml b/spring-context/src/test/resources/org/springframework/aop/framework/ProxyFactoryBeanTests-targetsource.xml index 46fb7b112d3..0bc1a3eb487 100644 --- a/spring-context/src/test/resources/org/springframework/aop/framework/ProxyFactoryBeanTests-targetsource.xml +++ b/spring-context/src/test/resources/org/springframework/aop/framework/ProxyFactoryBeanTests-targetsource.xml @@ -13,11 +13,11 @@ Adam - + - + - + - + diff --git a/spring-context/src/test/resources/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorTests-common-interceptors.xml b/spring-context/src/test/resources/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorTests-common-interceptors.xml index b5db44fbac4..7819d2c86db 100644 --- a/spring-context/src/test/resources/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorTests-common-interceptors.xml +++ b/spring-context/src/test/resources/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorTests-common-interceptors.xml @@ -17,7 +17,7 @@ - + @@ -26,7 +26,7 @@ - + diff --git a/spring-context/src/test/resources/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorTests-optimized.xml b/spring-context/src/test/resources/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorTests-optimized.xml index 20adb97333c..a3da2c1bb2b 100644 --- a/spring-context/src/test/resources/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorTests-optimized.xml +++ b/spring-context/src/test/resources/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorTests-optimized.xml @@ -7,7 +7,7 @@ - + diff --git a/spring-context/src/test/resources/org/springframework/aop/framework/autoproxy/BeanNameAutoProxyCreatorTests-context.xml b/spring-context/src/test/resources/org/springframework/aop/framework/autoproxy/BeanNameAutoProxyCreatorTests-context.xml index 3a228ff01db..95f25cdedb9 100644 --- a/spring-context/src/test/resources/org/springframework/aop/framework/autoproxy/BeanNameAutoProxyCreatorTests-context.xml +++ b/spring-context/src/test/resources/org/springframework/aop/framework/autoproxy/BeanNameAutoProxyCreatorTests-context.xml @@ -59,7 +59,7 @@ - + - + From 7b6d83a106a0e2267f40d57d2aa24503196533af Mon Sep 17 00:00:00 2001 From: Sam Brannen Date: Tue, 31 Dec 2019 14:58:51 +0100 Subject: [PATCH 11/13] Use Gradle test fixture support for spring-web See gh-23550 --- .../build/testsources/TestSourcesPlugin.java | 8 +- spring-orm/spring-orm.gradle | 1 + .../support/OpenEntityManagerInViewTests.java | 12 +- spring-test/spring-test.gradle | 1 + .../server/samples/bind/HttpServerTests.java | 2 +- .../setup/StandaloneMockMvcBuilderTests.java | 2 +- spring-web/spring-web.gradle | 6 + .../codec/CancelWithoutDemandCodecTests.java | 1 + .../codec/EncoderHttpMessageWriterTests.java | 2 +- .../codec/FormHttpMessageReaderTests.java | 2 +- .../codec/FormHttpMessageWriterTests.java | 2 +- .../codec/ResourceHttpMessageWriterTests.java | 6 +- ...ServerSentEventHttpMessageReaderTests.java | 3 +- ...ServerSentEventHttpMessageWriterTests.java | 3 +- .../codec/cbor/Jackson2CborDecoderTests.java | 2 +- .../codec/cbor/Jackson2CborEncoderTests.java | 2 +- .../codec/json/Jackson2JsonDecoderTests.java | 2 +- .../codec/json/Jackson2JsonEncoderTests.java | 2 +- .../codec/json/Jackson2SmileDecoderTests.java | 2 +- .../codec/json/Jackson2SmileEncoderTests.java | 2 +- .../MultipartHttpMessageWriterTests.java | 4 +- ...SynchronossPartHttpMessageReaderTests.java | 4 +- .../http/codec/xml/Jaxb2XmlDecoderTests.java | 2 +- .../http/codec/xml/Jaxb2XmlEncoderTests.java | 2 +- ...jectToStringHttpMessageConverterTests.java | 4 +- .../server/ServletServerHttpRequestTests.java | 2 +- .../ServletServerHttpResponseTests.java | 2 +- .../reactive/AsyncIntegrationTests.java | 3 +- .../ContextPathCompositeHandlerTests.java | 4 +- .../reactive/CookieIntegrationTests.java | 3 +- .../reactive/EchoHandlerIntegrationTests.java | 3 +- .../ErrorHandlerIntegrationTests.java | 3 +- .../HttpHeadResponseDecoratorTests.java | 2 +- .../reactive/MultipartIntegrationTests.java | 3 +- .../RandomHandlerIntegrationTests.java | 3 +- .../ServerHttpRequestIntegrationTests.java | 3 +- .../reactive/ServerHttpRequestTests.java | 8 +- .../ServerHttpsRequestIntegrationTests.java | 4 +- .../WriteOnlyHandlerIntegrationTests.java | 3 +- .../reactive/ZeroCopyIntegrationTests.java | 24 ++-- .../reactive/bootstrap/package-info.java | 5 - .../httpinvoker/HttpInvokerTests.java | 4 +- ...entNegotiationManagerFactoryBeanTests.java | 4 +- ...HeaderContentNegotiationStrategyTests.java | 2 +- ...ensionContentNegotiationStrategyTests.java | 2 +- .../bind/ServletRequestDataBinderTests.java | 2 +- .../web/bind/ServletRequestUtilsTests.java | 2 +- .../support/WebExchangeDataBinderTests.java | 8 +- .../support/WebRequestDataBinderTests.java | 6 +- .../ContextLoaderInitializerTests.java | 2 +- .../RequestAndSessionScopedBeanTests.java | 2 +- .../request/RequestContextListenerTests.java | 4 +- .../context/request/RequestScopeTests.java | 2 +- .../request/RequestScopedProxyTests.java | 2 +- .../ServletRequestAttributesTests.java | 4 +- .../ServletWebRequestHttpMethodsTests.java | 4 +- .../request/ServletWebRequestTests.java | 4 +- .../context/request/SessionScopeTests.java | 4 +- .../WebApplicationContextScopeTests.java | 4 +- .../StandardServletAsyncWebRequestTests.java | 6 +- .../async/WebAsyncManagerErrorTests.java | 6 +- .../request/async/WebAsyncManagerTests.java | 2 +- .../async/WebAsyncManagerTimeoutTests.java | 6 +- .../web/context/support/ResourceTests.java | 2 +- .../web/context/support/Spr8510Tests.java | 2 +- .../SpringBeanAutowiringSupportTests.java | 2 +- .../web/cors/CorsUtilsTests.java | 2 +- .../web/cors/DefaultCorsProcessorTests.java | 4 +- .../UrlBasedCorsConfigurationSourceTests.java | 2 +- .../web/cors/reactive/CorsUtilsTests.java | 8 +- .../web/cors/reactive/CorsWebFilterTests.java | 4 +- .../reactive/DefaultCorsProcessorTests.java | 4 +- .../UrlBasedCorsConfigurationSourceTests.java | 4 +- .../filter/CharacterEncodingFilterTests.java | 6 +- .../web/filter/CompositeFilterTests.java | 8 +- .../web/filter/CorsFilterTests.java | 4 +- .../filter/DelegatingFilterProxyTests.java | 8 +- .../web/filter/FormContentFilterTests.java | 6 +- .../filter/ForwardedHeaderFilterTests.java | 6 +- .../filter/HiddenHttpMethodFilterTests.java | 4 +- .../web/filter/OncePerRequestFilterTests.java | 6 +- .../filter/RelativeRedirectFilterTests.java | 6 +- .../web/filter/RequestContextFilterTests.java | 8 +- .../web/filter/RequestLoggingFilterTests.java | 6 +- .../filter/ShallowEtagHeaderFilterTests.java | 4 +- .../reactive/HiddenHttpMethodFilterTests.java | 4 +- .../ServerWebExchangeContextFilterTests.java | 4 +- ...ookieValueMethodArgumentResolverTests.java | 4 +- .../ErrorsMethodArgumentResolverTests.java | 2 +- ...ssionValueMethodArgumentResolverTests.java | 4 +- .../InitBinderDataBinderFactoryTests.java | 2 +- .../annotation/MapMethodProcessorTests.java | 4 +- .../ModelAttributeMethodProcessorTests.java | 2 +- .../annotation/ModelFactoryOrderingTests.java | 4 +- .../method/annotation/ModelFactoryTests.java | 2 +- .../annotation/ModelMethodProcessorTests.java | 2 +- ...tHeaderMapMethodArgumentResolverTests.java | 4 +- ...uestHeaderMethodArgumentResolverTests.java | 4 +- ...stParamMapMethodArgumentResolverTests.java | 14 +-- ...questParamMethodArgumentResolverTests.java | 16 +-- .../SessionAttributesHandlerTests.java | 2 +- .../WebArgumentResolverAdapterTests.java | 2 +- .../support/InvocableHandlerMethodTests.java | 6 +- .../CommonsMultipartResolverTests.java | 10 +- ...faultMultipartHttpServletRequestTests.java | 2 +- ...uestPartServletServerHttpRequestTests.java | 4 +- ...ndardMultipartHttpServletRequestTests.java | 4 +- ...erverWebExchangeCheckNotModifiedTests.java | 6 +- .../DefaultServerWebExchangeTests.java | 4 +- .../ForwardedHeaderTransformerTests.java | 2 +- .../adapter/WebHttpHandlerBuilderTests.java | 4 +- .../ExceptionHandlingWebHandlerTests.java | 4 +- .../handler/FilteringWebHandlerTests.java | 6 +- .../ResponseStatusExceptionHandlerTests.java | 87 +------------- ...cceptHeaderLocaleContextResolverTests.java | 4 +- .../i18n/FixedLocaleContextResolverTests.java | 4 +- .../CookieWebSessionIdResolverTests.java | 4 +- .../DefaultWebSessionManagerTests.java | 4 +- .../HeaderWebSessionIdResolverTests.java | 4 +- .../session/WebSessionIntegrationTests.java | 4 +- .../ContentCachingRequestWrapperTests.java | 2 +- .../ServletContextPropertyUtilsTests.java | 2 +- .../web/util/UriComponentsBuilderTests.java | 2 +- .../web/util/UrlPathHelperTests.java | 2 +- .../web/util/WebUtilsTests.java | 6 +- ...tParamMethodArgumentResolverKotlinTests.kt | 8 +- .../{http/server/reactive => web}/spring.png | Bin .../reactive}/MockClientHttpRequest.java | 2 +- .../reactive}/MockClientHttpResponse.java | 2 +- .../reactive}/MockServerHttpRequest.java | 2 +- .../reactive}/MockServerHttpResponse.java | 2 +- .../AbstractHttpHandlerIntegrationTests.java | 10 +- .../bootstrap/AbstractHttpServer.java | 2 +- .../server/reactive/bootstrap/HttpServer.java | 2 +- .../reactive/bootstrap/JettyHttpServer.java | 2 +- .../reactive/bootstrap/ReactorHttpServer.java | 2 +- .../bootstrap/ReactorHttpsServer.java | 2 +- .../reactive/bootstrap/TomcatHttpServer.java | 2 +- .../bootstrap/UndertowHttpServer.java | 2 +- .../reactive/bootstrap/package-info.java | 6 + .../http/server/reactive}/package-info.java | 2 +- .../method/MvcAnnotationPredicates.java | 6 +- .../testfixture}/method/ResolvableMethod.java | 12 +- .../server/MockServerWebExchange.java | 6 +- .../testfixture}/server/MockWebSession.java | 2 +- ...ctResponseStatusExceptionHandlerTests.java | 113 ++++++++++++++++++ .../web/testfixture}/server/package-info.java | 2 +- .../DelegatingServletInputStream.java | 2 +- .../DelegatingServletOutputStream.java | 2 +- .../servlet}/HeaderValueHolder.java | 2 +- .../servlet}/MockAsyncContext.java | 2 +- .../testfixture/servlet}/MockBodyContent.java | 2 +- .../web/testfixture/servlet}/MockCookie.java | 2 +- .../servlet}/MockExpressionEvaluator.java | 2 +- .../testfixture/servlet}/MockFilterChain.java | 2 +- .../servlet}/MockFilterConfig.java | 2 +- .../servlet}/MockHttpServletRequest.java | 2 +- .../servlet}/MockHttpServletResponse.java | 2 +- .../testfixture/servlet}/MockHttpSession.java | 2 +- .../testfixture/servlet}/MockJspWriter.java | 2 +- .../servlet}/MockMultipartFile.java | 2 +- .../MockMultipartHttpServletRequest.java | 2 +- .../testfixture/servlet}/MockPageContext.java | 2 +- .../web/testfixture/servlet}/MockPart.java | 2 +- .../servlet}/MockRequestDispatcher.java | 2 +- .../servlet}/MockServletConfig.java | 2 +- .../servlet}/MockServletContext.java | 2 +- .../servlet}/MockSessionCookieConfig.java | 2 +- .../servlet}/PassThroughFilterChain.java | 2 +- .../web/testfixture/xml}/Pojo.java | 2 +- .../http/codec/multipart/foo.txt | 0 spring-webflux/spring-webflux.gradle | 1 + .../reactive/DispatcherHandlerErrorTests.java | 4 +- .../web/reactive/DispatcherHandlerTests.java | 6 +- .../reactive/FlushingIntegrationTests.java | 4 +- .../HeaderContentTypeResolverTests.java | 4 +- .../ParameterContentTypeResolverTests.java | 4 +- ...uestedContentTypeResolverBuilderTests.java | 4 +- .../config/ResourceHandlerRegistryTests.java | 4 +- .../WebFluxConfigurationSupportTests.java | 4 +- .../function/BodyExtractorsTests.java | 4 +- .../reactive/function/BodyInsertersTests.java | 6 +- .../function/MultipartIntegrationTests.java | 2 +- .../DefaultClientRequestBuilderTests.java | 2 +- .../client/WebClientIntegrationTests.java | 2 +- ...bstractRouterFunctionIntegrationTests.java | 2 +- .../DefaultEntityResponseBuilderTests.java | 6 +- .../server/DefaultRenderingResponseTests.java | 6 +- .../DefaultServerRequestBuilderTests.java | 4 +- .../server/DefaultServerRequestTests.java | 4 +- .../DefaultServerResponseBuilderTests.java | 6 +- .../DispatcherHandlerIntegrationTests.java | 4 +- .../InvalidHttpMethodIntegrationTests.java | 2 +- ...LocaleContextResolverIntegrationTests.java | 2 +- .../server/NestedRouteIntegrationTests.java | 2 +- ...lisherHandlerFunctionIntegrationTests.java | 2 +- .../RenderingResponseIntegrationTests.java | 2 +- .../RequestPredicateAttributesTests.java | 4 +- .../server/ResourceHandlerFunctionTests.java | 6 +- .../function/server/RouterFunctionsTests.java | 4 +- .../SseHandlerFunctionIntegrationTests.java | 2 +- .../DispatcherHandlerIntegrationTests.java | 4 +- .../support/RouterFunctionMappingTests.java | 4 +- .../handler/CorsUrlHandlerMappingTests.java | 4 +- .../handler/SimpleUrlHandlerMappingTests.java | 4 +- ...uxResponseStatusExceptionHandlerTests.java | 4 +- .../AppCacheManifestTransformerTests.java | 4 +- .../CachingResourceResolverTests.java | 4 +- .../CssLinkResourceTransformerTests.java | 4 +- .../EncodedResourceResolverTests.java | 4 +- .../ResourceTransformerSupportTests.java | 4 +- .../resource/ResourceUrlProviderTests.java | 6 +- .../resource/ResourceWebHandlerTests.java | 6 +- .../VersionResourceResolverTests.java | 4 +- .../WebJarsResourceResolverTests.java | 4 +- .../result/HandlerResultHandlerTests.java | 4 +- ...mpleUrlHandlerMappingIntegrationTests.java | 4 +- .../CompositeRequestConditionTests.java | 4 +- .../ConsumesRequestConditionTests.java | 4 +- .../HeadersRequestConditionTests.java | 4 +- .../ParamsRequestConditionTests.java | 4 +- .../PatternsRequestConditionTests.java | 4 +- .../ProducesRequestConditionTests.java | 4 +- .../RequestConditionHolderTests.java | 4 +- .../condition/RequestMappingInfoTests.java | 4 +- .../RequestMethodsRequestConditionTests.java | 4 +- .../method/HandlerMethodMappingTests.java | 4 +- .../method/InvocableHandlerMethodTests.java | 8 +- ...RequestMappingInfoHandlerMappingTests.java | 18 +-- ...bstractRequestMappingIntegrationTests.java | 2 +- .../ContextPathIntegrationTests.java | 4 +- .../annotation/ControllerAdviceTests.java | 4 +- .../ControllerInputIntegrationTests.java | 2 +- .../ControllerMethodResolverTests.java | 2 +- ...ookieValueMethodArgumentResolverTests.java | 4 +- ...CrossOriginAnnotationIntegrationTests.java | 2 +- .../ErrorsMethodArgumentResolverTests.java | 6 +- ...ssionValueMethodArgumentResolverTests.java | 4 +- .../GlobalCorsConfigIntegrationTests.java | 2 +- ...HttpEntityMethodArgumentResolverTests.java | 6 +- .../InitBinderBindingContextTests.java | 4 +- .../JacksonHintsIntegrationTests.java | 2 +- .../JacksonStreamingIntegrationTests.java | 4 +- ...riablesMapMethodArgumentResolverTests.java | 8 +- ...xVariablesMethodArgumentResolverTests.java | 8 +- .../MessageReaderArgumentResolverTests.java | 8 +- .../MessageWriterResultHandlerTests.java | 6 +- ...lAttributeMethodArgumentResolverTests.java | 6 +- .../annotation/ModelInitializerTests.java | 6 +- .../ModelMethodArgumentResolverTests.java | 6 +- .../annotation/MultipartIntegrationTests.java | 8 +- ...ariableMapMethodArgumentResolverTests.java | 4 +- ...thVariableMethodArgumentResolverTests.java | 4 +- .../PrincipalMethodArgumentResolverTests.java | 6 +- .../annotation/ProtobufIntegrationTests.java | 2 +- ...tAttributeMethodArgumentResolverTests.java | 8 +- ...equestBodyMethodArgumentResolverTests.java | 8 +- ...tHeaderMapMethodArgumentResolverTests.java | 4 +- ...uestHeaderMethodArgumentResolverTests.java | 4 +- ...estMappingDataBindingIntegrationTests.java | 2 +- ...pingExceptionHandlingIntegrationTests.java | 2 +- .../RequestMappingIntegrationTests.java | 2 +- ...pingMessageConversionIntegrationTests.java | 5 +- ...MappingViewResolutionIntegrationTests.java | 2 +- ...stParamMapMethodArgumentResolverTests.java | 8 +- ...questParamMethodArgumentResolverTests.java | 8 +- ...equestPartMethodArgumentResolverTests.java | 10 +- .../ResponseBodyResultHandlerTests.java | 2 +- .../ResponseEntityResultHandlerTests.java | 6 +- ...ebExchangeMethodArgumentResolverTests.java | 6 +- ...nAttributeMethodArgumentResolverTests.java | 4 +- .../SessionAttributesHandlerTests.java | 2 +- .../annotation/SseIntegrationTests.java | 12 +- ...WebSessionMethodArgumentResolverTests.java | 6 +- .../result/view/AbstractViewTests.java | 4 +- .../view/HttpMessageWriterViewTests.java | 4 +- ...LocaleContextResolverIntegrationTests.java | 2 +- .../result/view/RedirectViewTests.java | 4 +- .../result/view/RequestContextTests.java | 4 +- .../ViewResolutionResultHandlerTests.java | 8 +- .../view/freemarker/FreeMarkerMacroTests.java | 4 +- .../view/freemarker/FreeMarkerViewTests.java | 4 +- .../view/script/JRubyScriptTemplateTests.java | 6 +- .../script/JythonScriptTemplateTests.java | 6 +- .../script/KotlinScriptTemplateTests.java | 6 +- .../script/NashornScriptTemplateTests.java | 6 +- .../AbstractWebSocketIntegrationTests.java | 10 +- .../socket/WebSocketIntegrationTests.java | 2 +- .../HandshakeWebSocketServiceTests.java | 6 +- .../KotlinInvocableHandlerMethodTests.kt | 4 +- .../annotation/CoroutinesIntegrationTests.kt | 2 +- ...tParamMethodArgumentResolverKotlinTests.kt | 4 +- .../springframework/web/reactive/spring.png | Bin 0 -> 951 bytes spring-webmvc/spring-webmvc.gradle | 1 + .../web/servlet/mvc/Controller.java | 4 +- .../web/context/ContextLoaderTests.java | 4 +- .../ServletContextAwareProcessorTests.java | 4 +- .../XmlWebApplicationContextTests.java | 2 +- .../support/HttpRequestHandlerTests.java | 8 +- .../support/ServletContextSupportTests.java | 2 +- .../WebApplicationObjectSupportTests.java | 2 +- .../web/servlet/DispatcherServletTests.java | 8 +- .../servlet/HandlerExecutionChainTests.java | 4 +- .../web/servlet/config/MvcNamespaceTests.java | 8 +- .../ContentNegotiationConfigurerTests.java | 2 +- .../DefaultServletHandlerConfigurerTests.java | 8 +- ...ngWebMvcConfigurationIntegrationTests.java | 2 +- .../annotation/InterceptorRegistryTests.java | 4 +- .../ResourceHandlerRegistryTests.java | 6 +- .../ViewControllerRegistryTests.java | 4 +- .../ViewResolutionIntegrationTests.java | 8 +- ...MvcConfigurationSupportExtensionTests.java | 4 +- .../WebMvcConfigurationSupportTests.java | 6 +- .../DefaultEntityResponseBuilderTests.java | 4 +- .../DefaultRenderingResponseTests.java | 4 +- .../DefaultServerRequestBuilderTests.java | 2 +- .../function/DefaultServerRequestTests.java | 4 +- .../DefaultServerResponseBuilderTests.java | 4 +- .../PathResourceLookupFunctionTests.java | 2 +- .../function/RequestPredicateTests.java | 2 +- .../function/RequestPredicatesTests.java | 2 +- .../ResourceHandlerFunctionTests.java | 4 +- .../function/RouterFunctionBuilderTests.java | 2 +- .../servlet/function/RouterFunctionTests.java | 2 +- .../function/RouterFunctionsTests.java | 2 +- .../BeanNameUrlHandlerMappingTests.java | 4 +- .../CorsAbstractHandlerMappingTests.java | 2 +- .../HandlerMappingIntrospectorTests.java | 2 +- .../servlet/handler/HandlerMappingTests.java | 2 +- .../handler/HandlerMethodMappingTests.java | 2 +- .../PathMatchingUrlHandlerMappingTests.java | 4 +- .../SimpleMappingExceptionResolverTests.java | 4 +- .../handler/SimpleUrlHandlerMappingTests.java | 4 +- .../i18n/AcceptHeaderLocaleResolverTests.java | 2 +- .../i18n/CookieLocaleResolverTests.java | 4 +- .../web/servlet/i18n/LocaleResolverTests.java | 6 +- .../i18n/SessionLocaleResolverTests.java | 4 +- .../web/servlet/mvc/ControllerTests.java | 4 +- .../ParameterizableViewControllerTests.java | 4 +- .../mvc/UrlFilenameViewControllerTests.java | 4 +- .../mvc/WebContentInterceptorTests.java | 4 +- .../annotation/CglibProxyControllerTests.java | 6 +- .../annotation/JdkProxyControllerTests.java | 6 +- .../ResponseStatusExceptionResolverTests.java | 4 +- .../CompositeRequestConditionTests.java | 2 +- .../ConsumesRequestConditionTests.java | 2 +- .../HeadersRequestConditionTests.java | 2 +- .../ParamsRequestConditionTests.java | 2 +- .../PatternsRequestConditionTests.java | 2 +- .../ProducesRequestConditionTests.java | 2 +- .../RequestConditionHolderTests.java | 2 +- .../RequestMethodsRequestConditionTests.java | 2 +- ...RequestMappingInfoHandlerMappingTests.java | 2 +- .../mvc/method/RequestMappingInfoTests.java | 2 +- ...equestAttributesArgumentResolverTests.java | 4 +- .../AbstractServletHandlerMethodTests.java | 2 +- .../method/annotation/CrossOriginTests.java | 2 +- ...DeferredResultReturnValueHandlerTests.java | 6 +- ...xceptionHandlerExceptionResolverTests.java | 4 +- ...ExtendedServletRequestDataBinderTests.java | 2 +- ...HandlerMethodAnnotationDetectionTests.java | 4 +- .../HttpEntityMethodProcessorMockTests.java | 4 +- .../HttpEntityMethodProcessorTests.java | 4 +- ...riablesMapMethodArgumentResolverTests.java | 8 +- ...xVariablesMethodArgumentResolverTests.java | 8 +- ...lAndViewMethodReturnValueHandlerTests.java | 2 +- ...ResolverMethodReturnValueHandlerTests.java | 2 +- .../MvcUriComponentsBuilderTests.java | 8 +- ...ariableMapMethodArgumentResolverTests.java | 4 +- ...thVariableMethodArgumentResolverTests.java | 4 +- .../annotation/ReactiveTypeHandlerTests.java | 6 +- ...MappingHandlerAdapterIntegrationTests.java | 8 +- .../RequestMappingHandlerAdapterTests.java | 4 +- .../RequestMappingHandlerMappingTests.java | 2 +- ...equestPartMethodArgumentResolverTests.java | 10 +- .../RequestResponseBodyAdviceChainTests.java | 4 +- ...tResponseBodyMethodProcessorMockTests.java | 4 +- ...questResponseBodyMethodProcessorTests.java | 4 +- ...copedControllerAdviceIntegrationTests.java | 2 +- ...nseBodyEmitterReturnValueHandlerTests.java | 8 +- .../ResponseEntityExceptionHandlerTests.java | 6 +- ...nnotationControllerHandlerMethodTests.java | 12 +- ...ookieValueMethodArgumentResolverTests.java | 4 +- .../ServletInvocableHandlerMethodTests.java | 4 +- ...letModelAttributeMethodProcessorTests.java | 2 +- ...letRequestMethodArgumentResolverTests.java | 6 +- ...etResponseMethodArgumentResolverTests.java | 4 +- ...ngResponseBodyReturnValueHandlerTests.java | 4 +- ...ntsBuilderMethodArgumentResolverTests.java | 2 +- ...nnotationControllerHandlerMethodTests.java | 4 +- .../ViewMethodReturnValueHandlerTests.java | 2 +- ...ViewNameMethodReturnValueHandlerTests.java | 2 +- .../DefaultHandlerExceptionResolverTests.java | 4 +- .../ParameterizableViewControllerTests.java | 4 +- .../AppCacheManifestTransformerTests.java | 2 +- .../CachingResourceResolverTests.java | 2 +- .../CssLinkResourceTransformerTests.java | 2 +- .../EncodedResourceResolverTests.java | 2 +- .../resource/PathResourceResolverTests.java | 4 +- .../ResourceHttpRequestHandlerTests.java | 6 +- .../ResourceTransformerSupportTests.java | 2 +- .../ResourceUrlEncodingFilterTests.java | 4 +- .../ResourceUrlProviderJavaConfigTests.java | 8 +- .../resource/ResourceUrlProviderTests.java | 4 +- .../VersionResourceResolverTests.java | 2 +- .../WebJarsResourceResolverTests.java | 2 +- ...nfigDispatcherServletInitializerTests.java | 4 +- .../DispatcherServletInitializerTests.java | 2 +- .../servlet/support/FlashMapManagerTests.java | 4 +- .../servlet/support/RequestContextTests.java | 6 +- .../ServletUriComponentsBuilderTests.java | 6 +- .../support/WebContentGeneratorTests.java | 2 +- .../web/servlet/tags/AbstractTagTests.java | 8 +- .../web/servlet/tags/ArgumentTagTests.java | 4 +- .../web/servlet/tags/EvalTagTests.java | 4 +- .../web/servlet/tags/HtmlEscapeTagTests.java | 2 +- .../web/servlet/tags/ParamTagTests.java | 4 +- .../web/servlet/tags/UrlTagTests.java | 4 +- .../tags/form/AbstractFormTagTests.java | 4 +- .../form/AbstractHtmlElementTagTests.java | 4 +- .../web/servlet/tags/form/ErrorsTagTests.java | 4 +- .../web/servlet/tags/form/FormTagTests.java | 2 +- .../web/servlet/tags/form/LabelTagTests.java | 2 +- .../web/servlet/tags/form/OptionTagTests.java | 4 +- .../servlet/tags/form/OptionsTagTests.java | 4 +- .../tags/form/TagIdGeneratorTests.java | 2 +- .../web/servlet/theme/ThemeResolverTests.java | 6 +- .../web/servlet/view/BaseViewTests.java | 6 +- .../ContentNegotiatingViewResolverTests.java | 6 +- ...faultRequestToViewNameTranslatorTests.java | 2 +- .../view/InternalResourceViewTests.java | 8 +- .../web/servlet/view/RedirectViewTests.java | 6 +- .../view/RedirectViewUriTemplateTests.java | 4 +- .../view/ResourceBundleViewResolverTests.java | 2 +- .../web/servlet/view/ViewResolverTests.java | 8 +- .../servlet/view/document/XlsViewTests.java | 4 +- .../servlet/view/feed/AtomFeedViewTests.java | 4 +- .../servlet/view/feed/RssFeedViewTests.java | 4 +- .../view/freemarker/FreeMarkerMacroTests.java | 6 +- .../view/freemarker/FreeMarkerViewTests.java | 6 +- .../view/groovy/GroovyMarkupViewTests.java | 6 +- .../json/MappingJackson2JsonViewTests.java | 4 +- .../view/script/JRubyScriptTemplateTests.java | 6 +- .../script/JythonScriptTemplateTests.java | 6 +- .../script/KotlinScriptTemplateTests.java | 6 +- .../script/NashornScriptTemplateTests.java | 6 +- .../view/script/ScriptTemplateViewTests.java | 6 +- .../view/tiles3/TilesConfigurerTests.java | 6 +- .../view/tiles3/TilesViewResolverTests.java | 2 +- .../servlet/view/tiles3/TilesViewTests.java | 6 +- .../view/xml/MappingJackson2XmlViewTests.java | 4 +- .../view/xml/MarshallingViewTests.java | 4 +- .../web/servlet/view/xslt/XsltViewTests.java | 4 +- .../function/RouterFunctionDslTests.kt | 2 +- ...ationControllerHandlerMethodKotlinTests.kt | 4 +- spring-websocket/spring-websocket.gradle | 1 + .../web/socket/AbstractHttpRequestTests.java | 4 +- ...essageBrokerBeanDefinitionParserTests.java | 2 +- .../standard/ServerEndpointExporterTests.java | 2 +- .../standard/SpringConfiguratorTests.java | 2 +- .../HttpSessionHandshakeInterceptorTests.java | 2 +- .../WebSocketHttpRequestHandlerTests.java | 4 +- .../session/HttpSockJsSessionTests.java | 4 +- 463 files changed, 1055 insertions(+), 1003 deletions(-) delete mode 100644 spring-web/src/test/java/org/springframework/http/server/reactive/bootstrap/package-info.java rename spring-web/src/test/resources/org/springframework/{http/server/reactive => web}/spring.png (100%) rename spring-web/src/{test/java/org/springframework/mock/http/client/reactive/test => testFixtures/java/org/springframework/web/testfixture/http/client/reactive}/MockClientHttpRequest.java (98%) rename spring-web/src/{test/java/org/springframework/mock/http/client/reactive/test => testFixtures/java/org/springframework/web/testfixture/http/client/reactive}/MockClientHttpResponse.java (98%) rename spring-web/src/{test/java/org/springframework/mock/http/server/reactive/test => testFixtures/java/org/springframework/web/testfixture/http/server/reactive}/MockServerHttpRequest.java (99%) rename spring-web/src/{test/java/org/springframework/mock/http/server/reactive/test => testFixtures/java/org/springframework/web/testfixture/http/server/reactive}/MockServerHttpResponse.java (98%) rename spring-web/src/{test/java/org/springframework/http/server/reactive => testFixtures/java/org/springframework/web/testfixture/http/server/reactive/bootstrap}/AbstractHttpHandlerIntegrationTests.java (88%) rename spring-web/src/{test/java/org/springframework => testFixtures/java/org/springframework/web/testfixture}/http/server/reactive/bootstrap/AbstractHttpServer.java (98%) rename spring-web/src/{test/java/org/springframework => testFixtures/java/org/springframework/web/testfixture}/http/server/reactive/bootstrap/HttpServer.java (92%) rename spring-web/src/{test/java/org/springframework => testFixtures/java/org/springframework/web/testfixture}/http/server/reactive/bootstrap/JettyHttpServer.java (97%) rename spring-web/src/{test/java/org/springframework => testFixtures/java/org/springframework/web/testfixture}/http/server/reactive/bootstrap/ReactorHttpServer.java (96%) rename spring-web/src/{test/java/org/springframework => testFixtures/java/org/springframework/web/testfixture}/http/server/reactive/bootstrap/ReactorHttpsServer.java (96%) rename spring-web/src/{test/java/org/springframework => testFixtures/java/org/springframework/web/testfixture}/http/server/reactive/bootstrap/TomcatHttpServer.java (97%) rename spring-web/src/{test/java/org/springframework => testFixtures/java/org/springframework/web/testfixture}/http/server/reactive/bootstrap/UndertowHttpServer.java (95%) create mode 100644 spring-web/src/testFixtures/java/org/springframework/web/testfixture/http/server/reactive/bootstrap/package-info.java rename spring-web/src/{test/java/org/springframework/mock/http/server/reactive/test => testFixtures/java/org/springframework/web/testfixture/http/server/reactive}/package-info.java (73%) rename spring-web/src/{test/java/org/springframework/web => testFixtures/java/org/springframework/web/testfixture}/method/MvcAnnotationPredicates.java (98%) rename spring-web/src/{test/java/org/springframework/web => testFixtures/java/org/springframework/web/testfixture}/method/ResolvableMethod.java (97%) rename spring-web/src/{test/java/org/springframework/mock/web/test => testFixtures/java/org/springframework/web/testfixture}/server/MockServerWebExchange.java (94%) rename spring-web/src/{test/java/org/springframework/mock/web/test => testFixtures/java/org/springframework/web/testfixture}/server/MockWebSession.java (98%) create mode 100644 spring-web/src/testFixtures/java/org/springframework/web/testfixture/server/handler/AbstractResponseStatusExceptionHandlerTests.java rename spring-web/src/{test/java/org/springframework/mock/web/test => testFixtures/java/org/springframework/web/testfixture}/server/package-info.java (77%) rename spring-web/src/{test/java/org/springframework/mock/web/test => testFixtures/java/org/springframework/web/testfixture/servlet}/DelegatingServletInputStream.java (97%) rename spring-web/src/{test/java/org/springframework/mock/web/test => testFixtures/java/org/springframework/web/testfixture/servlet}/DelegatingServletOutputStream.java (97%) rename spring-web/src/{test/java/org/springframework/mock/web/test => testFixtures/java/org/springframework/web/testfixture/servlet}/HeaderValueHolder.java (98%) rename spring-web/src/{test/java/org/springframework/mock/web/test => testFixtures/java/org/springframework/web/testfixture/servlet}/MockAsyncContext.java (98%) rename spring-web/src/{test/java/org/springframework/mock/web/test => testFixtures/java/org/springframework/web/testfixture/servlet}/MockBodyContent.java (99%) rename spring-web/src/{test/java/org/springframework/mock/web/test => testFixtures/java/org/springframework/web/testfixture/servlet}/MockCookie.java (98%) rename spring-web/src/{test/java/org/springframework/mock/web/test => testFixtures/java/org/springframework/web/testfixture/servlet}/MockExpressionEvaluator.java (98%) rename spring-web/src/{test/java/org/springframework/mock/web/test => testFixtures/java/org/springframework/web/testfixture/servlet}/MockFilterChain.java (98%) rename spring-web/src/{test/java/org/springframework/mock/web/test => testFixtures/java/org/springframework/web/testfixture/servlet}/MockFilterConfig.java (98%) rename spring-web/src/{test/java/org/springframework/mock/web/test => testFixtures/java/org/springframework/web/testfixture/servlet}/MockHttpServletRequest.java (99%) rename spring-web/src/{test/java/org/springframework/mock/web/test => testFixtures/java/org/springframework/web/testfixture/servlet}/MockHttpServletResponse.java (99%) rename spring-web/src/{test/java/org/springframework/mock/web/test => testFixtures/java/org/springframework/web/testfixture/servlet}/MockHttpSession.java (99%) rename spring-web/src/{test/java/org/springframework/mock/web/test => testFixtures/java/org/springframework/web/testfixture/servlet}/MockJspWriter.java (98%) rename spring-web/src/{test/java/org/springframework/mock/web/test => testFixtures/java/org/springframework/web/testfixture/servlet}/MockMultipartFile.java (98%) rename spring-web/src/{test/java/org/springframework/mock/web/test => testFixtures/java/org/springframework/web/testfixture/servlet}/MockMultipartHttpServletRequest.java (98%) rename spring-web/src/{test/java/org/springframework/mock/web/test => testFixtures/java/org/springframework/web/testfixture/servlet}/MockPageContext.java (99%) rename spring-web/src/{test/java/org/springframework/mock/web/test => testFixtures/java/org/springframework/web/testfixture/servlet}/MockPart.java (98%) rename spring-web/src/{test/java/org/springframework/mock/web/test => testFixtures/java/org/springframework/web/testfixture/servlet}/MockRequestDispatcher.java (98%) rename spring-web/src/{test/java/org/springframework/mock/web/test => testFixtures/java/org/springframework/web/testfixture/servlet}/MockServletConfig.java (98%) rename spring-web/src/{test/java/org/springframework/mock/web/test => testFixtures/java/org/springframework/web/testfixture/servlet}/MockServletContext.java (99%) rename spring-web/src/{test/java/org/springframework/mock/web/test => testFixtures/java/org/springframework/web/testfixture/servlet}/MockSessionCookieConfig.java (97%) rename spring-web/src/{test/java/org/springframework/mock/web/test => testFixtures/java/org/springframework/web/testfixture/servlet}/PassThroughFilterChain.java (98%) rename spring-web/src/{test/java/org/springframework/http/codec => testFixtures/java/org/springframework/web/testfixture/xml}/Pojo.java (96%) rename spring-web/src/{test => testFixtures}/resources/org/springframework/http/codec/multipart/foo.txt (100%) create mode 100644 spring-webflux/src/test/resources/org/springframework/web/reactive/spring.png diff --git a/buildSrc/src/main/java/org/springframework/build/testsources/TestSourcesPlugin.java b/buildSrc/src/main/java/org/springframework/build/testsources/TestSourcesPlugin.java index 130a5cac22e..b05e08214c3 100644 --- a/buildSrc/src/main/java/org/springframework/build/testsources/TestSourcesPlugin.java +++ b/buildSrc/src/main/java/org/springframework/build/testsources/TestSourcesPlugin.java @@ -78,11 +78,11 @@ public class TestSourcesPlugin implements Plugin { "spring-orm", "spring-oxm", // "spring-test", - "spring-tx" - // "spring-web", - // "spring-webflux", + "spring-tx", + "spring-web", + "spring-webflux", // "spring-webmvc", - // "spring-websocket" + "spring-websocket" ); diff --git a/spring-orm/spring-orm.gradle b/spring-orm/spring-orm.gradle index 06686d31d2c..8a8ad57ac4c 100644 --- a/spring-orm/spring-orm.gradle +++ b/spring-orm/spring-orm.gradle @@ -14,6 +14,7 @@ dependencies { testCompile(testFixtures(project(":spring-beans"))) testCompile(testFixtures(project(":spring-context"))) testCompile(testFixtures(project(":spring-core"))) + testCompile(testFixtures(project(":spring-web"))) testCompile("org.aspectj:aspectjweaver") testCompile("org.hsqldb:hsqldb") testRuntime("javax.xml.bind:jaxb-api") diff --git a/spring-orm/src/test/java/org/springframework/orm/jpa/support/OpenEntityManagerInViewTests.java b/spring-orm/src/test/java/org/springframework/orm/jpa/support/OpenEntityManagerInViewTests.java index ef68907f2cb..ad1a84e70f7 100644 --- a/spring-orm/src/test/java/org/springframework/orm/jpa/support/OpenEntityManagerInViewTests.java +++ b/spring-orm/src/test/java/org/springframework/orm/jpa/support/OpenEntityManagerInViewTests.java @@ -34,12 +34,6 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.springframework.core.task.SimpleAsyncTaskExecutor; -import org.springframework.mock.web.test.MockAsyncContext; -import org.springframework.mock.web.test.MockFilterConfig; -import org.springframework.mock.web.test.MockHttpServletRequest; -import org.springframework.mock.web.test.MockHttpServletResponse; -import org.springframework.mock.web.test.MockServletContext; -import org.springframework.mock.web.test.PassThroughFilterChain; import org.springframework.transaction.support.TransactionSynchronizationManager; import org.springframework.web.context.WebApplicationContext; import org.springframework.web.context.request.ServletWebRequest; @@ -48,6 +42,12 @@ import org.springframework.web.context.request.async.StandardServletAsyncWebRequ import org.springframework.web.context.request.async.WebAsyncManager; import org.springframework.web.context.request.async.WebAsyncUtils; import org.springframework.web.context.support.StaticWebApplicationContext; +import org.springframework.web.testfixture.servlet.MockAsyncContext; +import org.springframework.web.testfixture.servlet.MockFilterConfig; +import org.springframework.web.testfixture.servlet.MockHttpServletRequest; +import org.springframework.web.testfixture.servlet.MockHttpServletResponse; +import org.springframework.web.testfixture.servlet.MockServletContext; +import org.springframework.web.testfixture.servlet.PassThroughFilterChain; import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.ArgumentMatchers.any; diff --git a/spring-test/spring-test.gradle b/spring-test/spring-test.gradle index ec8708a8854..e240001a1b6 100644 --- a/spring-test/spring-test.gradle +++ b/spring-test/spring-test.gradle @@ -46,6 +46,7 @@ dependencies { testCompile(testFixtures(project(":spring-context"))) testCompile(testFixtures(project(":spring-core"))) testCompile(testFixtures(project(":spring-tx"))) + testCompile(testFixtures(project(":spring-web"))) testCompile("javax.annotation:javax.annotation-api") testCompile("javax.cache:cache-api") testCompile("javax.ejb:javax.ejb-api") diff --git a/spring-test/src/test/java/org/springframework/test/web/reactive/server/samples/bind/HttpServerTests.java b/spring-test/src/test/java/org/springframework/test/web/reactive/server/samples/bind/HttpServerTests.java index 27f69a04b80..d61fc416c22 100644 --- a/spring-test/src/test/java/org/springframework/test/web/reactive/server/samples/bind/HttpServerTests.java +++ b/spring-test/src/test/java/org/springframework/test/web/reactive/server/samples/bind/HttpServerTests.java @@ -21,10 +21,10 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.springframework.http.server.reactive.HttpHandler; -import org.springframework.http.server.reactive.bootstrap.ReactorHttpServer; import org.springframework.test.web.reactive.server.WebTestClient; import org.springframework.web.reactive.function.server.RouterFunctions; import org.springframework.web.reactive.function.server.ServerResponse; +import org.springframework.web.testfixture.http.server.reactive.bootstrap.ReactorHttpServer; import static org.springframework.web.reactive.function.server.RequestPredicates.GET; import static org.springframework.web.reactive.function.server.RouterFunctions.route; diff --git a/spring-test/src/test/java/org/springframework/test/web/servlet/setup/StandaloneMockMvcBuilderTests.java b/spring-test/src/test/java/org/springframework/test/web/servlet/setup/StandaloneMockMvcBuilderTests.java index dd85d0a4b3c..07850455748 100644 --- a/spring-test/src/test/java/org/springframework/test/web/servlet/setup/StandaloneMockMvcBuilderTests.java +++ b/spring-test/src/test/java/org/springframework/test/web/servlet/setup/StandaloneMockMvcBuilderTests.java @@ -29,7 +29,7 @@ import com.fasterxml.jackson.databind.ser.impl.UnknownSerializer; import org.junit.jupiter.api.Test; import org.springframework.http.converter.json.SpringHandlerInstantiator; -import org.springframework.mock.web.test.MockHttpServletRequest; +import org.springframework.mock.web.MockHttpServletRequest; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.context.WebApplicationContext; diff --git a/spring-web/spring-web.gradle b/spring-web/spring-web.gradle index bb86f10cc51..60c40ed4eee 100644 --- a/spring-web/spring-web.gradle +++ b/spring-web/spring-web.gradle @@ -77,4 +77,10 @@ dependencies { testRuntime("com.sun.xml.bind:jaxb-impl") testRuntime("javax.json:javax.json-api") testRuntime("org.apache.johnzon:johnzon-jsonb") + testFixturesApi("javax.servlet:javax.servlet-api") + testFixturesApi("org.junit.jupiter:junit-jupiter-api") + testFixturesApi("org.junit.jupiter:junit-jupiter-params") + testFixturesImplementation("io.projectreactor:reactor-test") + testFixturesImplementation("org.apache.taglibs:taglibs-standard-jstlel") + testFixturesImplementation("org.assertj:assertj-core") } diff --git a/spring-web/src/test/java/org/springframework/http/codec/CancelWithoutDemandCodecTests.java b/spring-web/src/test/java/org/springframework/http/codec/CancelWithoutDemandCodecTests.java index 2bb2e8c6fa4..2935e9fa233 100644 --- a/spring-web/src/test/java/org/springframework/http/codec/CancelWithoutDemandCodecTests.java +++ b/spring-web/src/test/java/org/springframework/http/codec/CancelWithoutDemandCodecTests.java @@ -46,6 +46,7 @@ import org.springframework.http.codec.xml.Jaxb2XmlEncoder; import org.springframework.protobuf.Msg; import org.springframework.protobuf.SecondMsg; import org.springframework.util.MimeType; +import org.springframework.web.testfixture.xml.Pojo; /** * Test scenarios for data buffer leaks. diff --git a/spring-web/src/test/java/org/springframework/http/codec/EncoderHttpMessageWriterTests.java b/spring-web/src/test/java/org/springframework/http/codec/EncoderHttpMessageWriterTests.java index 5fbc2866d82..c7133f3f28e 100644 --- a/spring-web/src/test/java/org/springframework/http/codec/EncoderHttpMessageWriterTests.java +++ b/spring-web/src/test/java/org/springframework/http/codec/EncoderHttpMessageWriterTests.java @@ -37,10 +37,10 @@ import org.springframework.core.codec.CharSequenceEncoder; import org.springframework.core.io.buffer.DataBuffer; import org.springframework.core.io.buffer.DefaultDataBufferFactory; import org.springframework.http.MediaType; -import org.springframework.mock.http.server.reactive.test.MockServerHttpResponse; import org.springframework.util.MimeType; import org.springframework.util.MimeTypeUtils; import org.springframework.util.ReflectionUtils; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpResponse; import static java.nio.charset.StandardCharsets.ISO_8859_1; import static java.nio.charset.StandardCharsets.UTF_8; diff --git a/spring-web/src/test/java/org/springframework/http/codec/FormHttpMessageReaderTests.java b/spring-web/src/test/java/org/springframework/http/codec/FormHttpMessageReaderTests.java index 161c467b5c0..5555d04e6b8 100644 --- a/spring-web/src/test/java/org/springframework/http/codec/FormHttpMessageReaderTests.java +++ b/spring-web/src/test/java/org/springframework/http/codec/FormHttpMessageReaderTests.java @@ -32,9 +32,9 @@ import org.springframework.core.testfixture.io.buffer.AbstractLeakCheckingTests; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpMethod; import org.springframework.http.MediaType; -import org.springframework.mock.http.server.reactive.test.MockServerHttpRequest; import org.springframework.util.LinkedMultiValueMap; import org.springframework.util.MultiValueMap; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-web/src/test/java/org/springframework/http/codec/FormHttpMessageWriterTests.java b/spring-web/src/test/java/org/springframework/http/codec/FormHttpMessageWriterTests.java index 6a133141ce4..04f4a889ec5 100644 --- a/spring-web/src/test/java/org/springframework/http/codec/FormHttpMessageWriterTests.java +++ b/spring-web/src/test/java/org/springframework/http/codec/FormHttpMessageWriterTests.java @@ -31,9 +31,9 @@ import org.springframework.core.testfixture.io.buffer.AbstractLeakCheckingTests; import org.springframework.core.testfixture.io.buffer.DataBufferTestUtils; import org.springframework.http.HttpHeaders; import org.springframework.http.MediaType; -import org.springframework.mock.http.server.reactive.test.MockServerHttpResponse; import org.springframework.util.LinkedMultiValueMap; import org.springframework.util.MultiValueMap; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpResponse; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-web/src/test/java/org/springframework/http/codec/ResourceHttpMessageWriterTests.java b/spring-web/src/test/java/org/springframework/http/codec/ResourceHttpMessageWriterTests.java index 4ca926aaf1f..b63e613be61 100644 --- a/spring-web/src/test/java/org/springframework/http/codec/ResourceHttpMessageWriterTests.java +++ b/spring-web/src/test/java/org/springframework/http/codec/ResourceHttpMessageWriterTests.java @@ -30,14 +30,14 @@ import org.springframework.core.io.Resource; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpRange; import org.springframework.http.HttpStatus; -import org.springframework.mock.http.server.reactive.test.MockServerHttpRequest; -import org.springframework.mock.http.server.reactive.test.MockServerHttpResponse; import org.springframework.util.MimeTypeUtils; import org.springframework.util.StringUtils; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpResponse; import static org.assertj.core.api.Assertions.assertThat; import static org.springframework.http.MediaType.TEXT_PLAIN; -import static org.springframework.mock.http.server.reactive.test.MockServerHttpRequest.get; +import static org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest.get; /** * Unit tests for {@link ResourceHttpMessageWriter}. diff --git a/spring-web/src/test/java/org/springframework/http/codec/ServerSentEventHttpMessageReaderTests.java b/spring-web/src/test/java/org/springframework/http/codec/ServerSentEventHttpMessageReaderTests.java index d6ef84b73f1..01d9a34376f 100644 --- a/spring-web/src/test/java/org/springframework/http/codec/ServerSentEventHttpMessageReaderTests.java +++ b/spring-web/src/test/java/org/springframework/http/codec/ServerSentEventHttpMessageReaderTests.java @@ -30,7 +30,8 @@ import org.springframework.core.io.buffer.DataBuffer; import org.springframework.core.testfixture.io.buffer.AbstractLeakCheckingTests; import org.springframework.http.MediaType; import org.springframework.http.codec.json.Jackson2JsonDecoder; -import org.springframework.mock.http.server.reactive.test.MockServerHttpRequest; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest; +import org.springframework.web.testfixture.xml.Pojo; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-web/src/test/java/org/springframework/http/codec/ServerSentEventHttpMessageWriterTests.java b/spring-web/src/test/java/org/springframework/http/codec/ServerSentEventHttpMessageWriterTests.java index 2bd290d9b88..5411540c55b 100644 --- a/spring-web/src/test/java/org/springframework/http/codec/ServerSentEventHttpMessageWriterTests.java +++ b/spring-web/src/test/java/org/springframework/http/codec/ServerSentEventHttpMessageWriterTests.java @@ -36,7 +36,8 @@ import org.springframework.core.testfixture.io.buffer.DataBufferTestUtils; import org.springframework.http.MediaType; import org.springframework.http.codec.json.Jackson2JsonEncoder; import org.springframework.http.converter.json.Jackson2ObjectMapperBuilder; -import org.springframework.mock.http.server.reactive.test.MockServerHttpResponse; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpResponse; +import org.springframework.web.testfixture.xml.Pojo; import static org.assertj.core.api.Assertions.assertThat; import static org.springframework.core.ResolvableType.forClass; diff --git a/spring-web/src/test/java/org/springframework/http/codec/cbor/Jackson2CborDecoderTests.java b/spring-web/src/test/java/org/springframework/http/codec/cbor/Jackson2CborDecoderTests.java index b434b2fdd15..63eaf2488cf 100644 --- a/spring-web/src/test/java/org/springframework/http/codec/cbor/Jackson2CborDecoderTests.java +++ b/spring-web/src/test/java/org/springframework/http/codec/cbor/Jackson2CborDecoderTests.java @@ -27,9 +27,9 @@ import reactor.core.publisher.Flux; import org.springframework.core.ResolvableType; import org.springframework.core.io.buffer.DataBuffer; import org.springframework.core.testfixture.codec.AbstractDecoderTests; -import org.springframework.http.codec.Pojo; import org.springframework.http.converter.json.Jackson2ObjectMapperBuilder; import org.springframework.util.MimeType; +import org.springframework.web.testfixture.xml.Pojo; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; diff --git a/spring-web/src/test/java/org/springframework/http/codec/cbor/Jackson2CborEncoderTests.java b/spring-web/src/test/java/org/springframework/http/codec/cbor/Jackson2CborEncoderTests.java index b3ae238a8ca..a2ce8c51a3d 100644 --- a/spring-web/src/test/java/org/springframework/http/codec/cbor/Jackson2CborEncoderTests.java +++ b/spring-web/src/test/java/org/springframework/http/codec/cbor/Jackson2CborEncoderTests.java @@ -28,10 +28,10 @@ import org.springframework.core.ResolvableType; import org.springframework.core.io.buffer.DataBuffer; import org.springframework.core.testfixture.io.buffer.AbstractLeakCheckingTests; import org.springframework.core.testfixture.io.buffer.DataBufferTestUtils; -import org.springframework.http.codec.Pojo; import org.springframework.http.codec.ServerSentEvent; import org.springframework.http.converter.json.Jackson2ObjectMapperBuilder; import org.springframework.util.MimeType; +import org.springframework.web.testfixture.xml.Pojo; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; diff --git a/spring-web/src/test/java/org/springframework/http/codec/json/Jackson2JsonDecoderTests.java b/spring-web/src/test/java/org/springframework/http/codec/json/Jackson2JsonDecoderTests.java index c1e0b61715d..dd2ba1334b2 100644 --- a/spring-web/src/test/java/org/springframework/http/codec/json/Jackson2JsonDecoderTests.java +++ b/spring-web/src/test/java/org/springframework/http/codec/json/Jackson2JsonDecoderTests.java @@ -39,10 +39,10 @@ import org.springframework.core.codec.DecodingException; import org.springframework.core.io.buffer.DataBuffer; import org.springframework.core.testfixture.codec.AbstractDecoderTests; import org.springframework.http.MediaType; -import org.springframework.http.codec.Pojo; import org.springframework.http.codec.json.JacksonViewBean.MyJacksonView1; import org.springframework.http.codec.json.JacksonViewBean.MyJacksonView3; import org.springframework.util.MimeType; +import org.springframework.web.testfixture.xml.Pojo; import static java.util.Arrays.asList; import static java.util.Collections.emptyMap; diff --git a/spring-web/src/test/java/org/springframework/http/codec/json/Jackson2JsonEncoderTests.java b/spring-web/src/test/java/org/springframework/http/codec/json/Jackson2JsonEncoderTests.java index 946b730f6c2..718c928a7b1 100644 --- a/spring-web/src/test/java/org/springframework/http/codec/json/Jackson2JsonEncoderTests.java +++ b/spring-web/src/test/java/org/springframework/http/codec/json/Jackson2JsonEncoderTests.java @@ -36,12 +36,12 @@ import org.springframework.core.io.buffer.DataBuffer; import org.springframework.core.io.buffer.DataBufferUtils; import org.springframework.core.testfixture.codec.AbstractEncoderTests; import org.springframework.http.MediaType; -import org.springframework.http.codec.Pojo; import org.springframework.http.codec.ServerSentEvent; import org.springframework.http.codec.json.JacksonViewBean.MyJacksonView1; import org.springframework.http.codec.json.JacksonViewBean.MyJacksonView3; import org.springframework.util.MimeType; import org.springframework.util.MimeTypeUtils; +import org.springframework.web.testfixture.xml.Pojo; import static java.util.Collections.singletonMap; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-web/src/test/java/org/springframework/http/codec/json/Jackson2SmileDecoderTests.java b/spring-web/src/test/java/org/springframework/http/codec/json/Jackson2SmileDecoderTests.java index b672918fcb9..f02b19b7286 100644 --- a/spring-web/src/test/java/org/springframework/http/codec/json/Jackson2SmileDecoderTests.java +++ b/spring-web/src/test/java/org/springframework/http/codec/json/Jackson2SmileDecoderTests.java @@ -27,9 +27,9 @@ import reactor.core.publisher.Flux; import org.springframework.core.ResolvableType; import org.springframework.core.io.buffer.DataBuffer; import org.springframework.core.testfixture.codec.AbstractDecoderTests; -import org.springframework.http.codec.Pojo; import org.springframework.http.converter.json.Jackson2ObjectMapperBuilder; import org.springframework.util.MimeType; +import org.springframework.web.testfixture.xml.Pojo; import static org.assertj.core.api.Assertions.assertThat; import static org.springframework.core.ResolvableType.forClass; diff --git a/spring-web/src/test/java/org/springframework/http/codec/json/Jackson2SmileEncoderTests.java b/spring-web/src/test/java/org/springframework/http/codec/json/Jackson2SmileEncoderTests.java index 7b39ac59f44..ef2a9d84883 100644 --- a/spring-web/src/test/java/org/springframework/http/codec/json/Jackson2SmileEncoderTests.java +++ b/spring-web/src/test/java/org/springframework/http/codec/json/Jackson2SmileEncoderTests.java @@ -31,10 +31,10 @@ import org.springframework.core.ResolvableType; import org.springframework.core.io.buffer.DataBuffer; import org.springframework.core.testfixture.codec.AbstractEncoderTests; import org.springframework.core.testfixture.io.buffer.DataBufferTestUtils; -import org.springframework.http.codec.Pojo; import org.springframework.http.codec.ServerSentEvent; import org.springframework.http.converter.json.Jackson2ObjectMapperBuilder; import org.springframework.util.MimeType; +import org.springframework.web.testfixture.xml.Pojo; import static org.assertj.core.api.Assertions.assertThat; import static org.springframework.core.io.buffer.DataBufferUtils.release; diff --git a/spring-web/src/test/java/org/springframework/http/codec/multipart/MultipartHttpMessageWriterTests.java b/spring-web/src/test/java/org/springframework/http/codec/multipart/MultipartHttpMessageWriterTests.java index 36bfc18302e..497ad9559f3 100644 --- a/spring-web/src/test/java/org/springframework/http/codec/multipart/MultipartHttpMessageWriterTests.java +++ b/spring-web/src/test/java/org/springframework/http/codec/multipart/MultipartHttpMessageWriterTests.java @@ -40,9 +40,9 @@ import org.springframework.http.HttpEntity; import org.springframework.http.MediaType; import org.springframework.http.client.MultipartBodyBuilder; import org.springframework.http.codec.ClientCodecConfigurer; -import org.springframework.mock.http.server.reactive.test.MockServerHttpRequest; -import org.springframework.mock.http.server.reactive.test.MockServerHttpResponse; import org.springframework.util.MultiValueMap; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpResponse; import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.BDDMockito.given; diff --git a/spring-web/src/test/java/org/springframework/http/codec/multipart/SynchronossPartHttpMessageReaderTests.java b/spring-web/src/test/java/org/springframework/http/codec/multipart/SynchronossPartHttpMessageReaderTests.java index 7d6661dfa9c..bf60a6c7911 100644 --- a/spring-web/src/test/java/org/springframework/http/codec/multipart/SynchronossPartHttpMessageReaderTests.java +++ b/spring-web/src/test/java/org/springframework/http/codec/multipart/SynchronossPartHttpMessageReaderTests.java @@ -42,9 +42,9 @@ import org.springframework.http.HttpMethod; import org.springframework.http.MediaType; import org.springframework.http.client.MultipartBodyBuilder; import org.springframework.http.server.reactive.ServerHttpRequest; -import org.springframework.mock.http.client.reactive.test.MockClientHttpRequest; -import org.springframework.mock.http.server.reactive.test.MockServerHttpRequest; import org.springframework.util.MultiValueMap; +import org.springframework.web.testfixture.http.client.reactive.MockClientHttpRequest; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest; import static java.util.Collections.emptyMap; import static java.util.Collections.singletonMap; diff --git a/spring-web/src/test/java/org/springframework/http/codec/xml/Jaxb2XmlDecoderTests.java b/spring-web/src/test/java/org/springframework/http/codec/xml/Jaxb2XmlDecoderTests.java index 7fda7067f20..8e736de9e0a 100644 --- a/spring-web/src/test/java/org/springframework/http/codec/xml/Jaxb2XmlDecoderTests.java +++ b/spring-web/src/test/java/org/springframework/http/codec/xml/Jaxb2XmlDecoderTests.java @@ -32,13 +32,13 @@ import org.springframework.core.ResolvableType; import org.springframework.core.io.buffer.DataBuffer; import org.springframework.core.testfixture.io.buffer.AbstractLeakCheckingTests; import org.springframework.http.MediaType; -import org.springframework.http.codec.Pojo; import org.springframework.http.codec.xml.jaxb.XmlRootElement; import org.springframework.http.codec.xml.jaxb.XmlRootElementWithName; import org.springframework.http.codec.xml.jaxb.XmlRootElementWithNameAndNamespace; import org.springframework.http.codec.xml.jaxb.XmlType; import org.springframework.http.codec.xml.jaxb.XmlTypeWithName; import org.springframework.http.codec.xml.jaxb.XmlTypeWithNameAndNamespace; +import org.springframework.web.testfixture.xml.Pojo; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-web/src/test/java/org/springframework/http/codec/xml/Jaxb2XmlEncoderTests.java b/spring-web/src/test/java/org/springframework/http/codec/xml/Jaxb2XmlEncoderTests.java index 81d5767c15d..8c22f80956a 100644 --- a/spring-web/src/test/java/org/springframework/http/codec/xml/Jaxb2XmlEncoderTests.java +++ b/spring-web/src/test/java/org/springframework/http/codec/xml/Jaxb2XmlEncoderTests.java @@ -33,7 +33,7 @@ import org.springframework.core.io.buffer.DataBuffer; import org.springframework.core.testfixture.codec.AbstractEncoderTests; import org.springframework.core.testfixture.xml.XmlContent; import org.springframework.http.MediaType; -import org.springframework.http.codec.Pojo; +import org.springframework.web.testfixture.xml.Pojo; import static java.nio.charset.StandardCharsets.UTF_8; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-web/src/test/java/org/springframework/http/converter/ObjectToStringHttpMessageConverterTests.java b/spring-web/src/test/java/org/springframework/http/converter/ObjectToStringHttpMessageConverterTests.java index 77eed699994..b212dc3668b 100644 --- a/spring-web/src/test/java/org/springframework/http/converter/ObjectToStringHttpMessageConverterTests.java +++ b/spring-web/src/test/java/org/springframework/http/converter/ObjectToStringHttpMessageConverterTests.java @@ -31,8 +31,8 @@ import org.springframework.core.io.Resource; import org.springframework.http.MediaType; import org.springframework.http.server.ServletServerHttpRequest; import org.springframework.http.server.ServletServerHttpResponse; -import org.springframework.mock.web.test.MockHttpServletRequest; -import org.springframework.mock.web.test.MockHttpServletResponse; +import org.springframework.web.testfixture.servlet.MockHttpServletRequest; +import org.springframework.web.testfixture.servlet.MockHttpServletResponse; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException; diff --git a/spring-web/src/test/java/org/springframework/http/server/ServletServerHttpRequestTests.java b/spring-web/src/test/java/org/springframework/http/server/ServletServerHttpRequestTests.java index 771d468ca26..b0aa8e1cda0 100644 --- a/spring-web/src/test/java/org/springframework/http/server/ServletServerHttpRequestTests.java +++ b/spring-web/src/test/java/org/springframework/http/server/ServletServerHttpRequestTests.java @@ -28,8 +28,8 @@ import org.junit.jupiter.api.Test; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpMethod; import org.springframework.http.MediaType; -import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.util.FileCopyUtils; +import org.springframework.web.testfixture.servlet.MockHttpServletRequest; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-web/src/test/java/org/springframework/http/server/ServletServerHttpResponseTests.java b/spring-web/src/test/java/org/springframework/http/server/ServletServerHttpResponseTests.java index 1048847e105..4f37e8d193b 100644 --- a/spring-web/src/test/java/org/springframework/http/server/ServletServerHttpResponseTests.java +++ b/spring-web/src/test/java/org/springframework/http/server/ServletServerHttpResponseTests.java @@ -26,8 +26,8 @@ import org.junit.jupiter.api.Test; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; -import org.springframework.mock.web.test.MockHttpServletResponse; import org.springframework.util.FileCopyUtils; +import org.springframework.web.testfixture.servlet.MockHttpServletResponse; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-web/src/test/java/org/springframework/http/server/reactive/AsyncIntegrationTests.java b/spring-web/src/test/java/org/springframework/http/server/reactive/AsyncIntegrationTests.java index dbe943e0522..44d757b61c6 100644 --- a/spring-web/src/test/java/org/springframework/http/server/reactive/AsyncIntegrationTests.java +++ b/spring-web/src/test/java/org/springframework/http/server/reactive/AsyncIntegrationTests.java @@ -28,8 +28,9 @@ import org.springframework.core.io.buffer.DataBufferFactory; import org.springframework.core.io.buffer.DefaultDataBufferFactory; import org.springframework.http.RequestEntity; import org.springframework.http.ResponseEntity; -import org.springframework.http.server.reactive.bootstrap.HttpServer; import org.springframework.web.client.RestTemplate; +import org.springframework.web.testfixture.http.server.reactive.bootstrap.AbstractHttpHandlerIntegrationTests; +import org.springframework.web.testfixture.http.server.reactive.bootstrap.HttpServer; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-web/src/test/java/org/springframework/http/server/reactive/ContextPathCompositeHandlerTests.java b/spring-web/src/test/java/org/springframework/http/server/reactive/ContextPathCompositeHandlerTests.java index 26d5298dca9..0672f67b332 100644 --- a/spring-web/src/test/java/org/springframework/http/server/reactive/ContextPathCompositeHandlerTests.java +++ b/spring-web/src/test/java/org/springframework/http/server/reactive/ContextPathCompositeHandlerTests.java @@ -27,8 +27,8 @@ import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; import org.springframework.http.HttpStatus; -import org.springframework.mock.http.server.reactive.test.MockServerHttpRequest; -import org.springframework.mock.http.server.reactive.test.MockServerHttpResponse; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpResponse; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException; diff --git a/spring-web/src/test/java/org/springframework/http/server/reactive/CookieIntegrationTests.java b/spring-web/src/test/java/org/springframework/http/server/reactive/CookieIntegrationTests.java index 7474abc09fb..432a0ce6e5b 100644 --- a/spring-web/src/test/java/org/springframework/http/server/reactive/CookieIntegrationTests.java +++ b/spring-web/src/test/java/org/springframework/http/server/reactive/CookieIntegrationTests.java @@ -27,8 +27,9 @@ import org.springframework.http.HttpCookie; import org.springframework.http.RequestEntity; import org.springframework.http.ResponseCookie; import org.springframework.http.ResponseEntity; -import org.springframework.http.server.reactive.bootstrap.HttpServer; import org.springframework.web.client.RestTemplate; +import org.springframework.web.testfixture.http.server.reactive.bootstrap.AbstractHttpHandlerIntegrationTests; +import org.springframework.web.testfixture.http.server.reactive.bootstrap.HttpServer; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-web/src/test/java/org/springframework/http/server/reactive/EchoHandlerIntegrationTests.java b/spring-web/src/test/java/org/springframework/http/server/reactive/EchoHandlerIntegrationTests.java index d26b650a9ed..83e7694309f 100644 --- a/spring-web/src/test/java/org/springframework/http/server/reactive/EchoHandlerIntegrationTests.java +++ b/spring-web/src/test/java/org/springframework/http/server/reactive/EchoHandlerIntegrationTests.java @@ -23,8 +23,9 @@ import reactor.core.publisher.Mono; import org.springframework.http.RequestEntity; import org.springframework.http.ResponseEntity; -import org.springframework.http.server.reactive.bootstrap.HttpServer; import org.springframework.web.client.RestTemplate; +import org.springframework.web.testfixture.http.server.reactive.bootstrap.AbstractHttpHandlerIntegrationTests; +import org.springframework.web.testfixture.http.server.reactive.bootstrap.HttpServer; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-web/src/test/java/org/springframework/http/server/reactive/ErrorHandlerIntegrationTests.java b/spring-web/src/test/java/org/springframework/http/server/reactive/ErrorHandlerIntegrationTests.java index 6cc09505b37..3e58088cd5e 100644 --- a/spring-web/src/test/java/org/springframework/http/server/reactive/ErrorHandlerIntegrationTests.java +++ b/spring-web/src/test/java/org/springframework/http/server/reactive/ErrorHandlerIntegrationTests.java @@ -23,9 +23,10 @@ import reactor.core.publisher.Mono; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.http.client.ClientHttpResponse; -import org.springframework.http.server.reactive.bootstrap.HttpServer; import org.springframework.web.client.ResponseErrorHandler; import org.springframework.web.client.RestTemplate; +import org.springframework.web.testfixture.http.server.reactive.bootstrap.AbstractHttpHandlerIntegrationTests; +import org.springframework.web.testfixture.http.server.reactive.bootstrap.HttpServer; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-web/src/test/java/org/springframework/http/server/reactive/HttpHeadResponseDecoratorTests.java b/spring-web/src/test/java/org/springframework/http/server/reactive/HttpHeadResponseDecoratorTests.java index 55695bca646..a3d32c5f139 100644 --- a/spring-web/src/test/java/org/springframework/http/server/reactive/HttpHeadResponseDecoratorTests.java +++ b/spring-web/src/test/java/org/springframework/http/server/reactive/HttpHeadResponseDecoratorTests.java @@ -25,7 +25,7 @@ import reactor.core.publisher.Flux; import org.springframework.core.io.buffer.DataBuffer; import org.springframework.core.io.buffer.NettyDataBufferFactory; import org.springframework.core.testfixture.io.buffer.LeakAwareDataBufferFactory; -import org.springframework.mock.http.server.reactive.test.MockServerHttpResponse; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpResponse; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-web/src/test/java/org/springframework/http/server/reactive/MultipartIntegrationTests.java b/spring-web/src/test/java/org/springframework/http/server/reactive/MultipartIntegrationTests.java index 3b763ba7296..b5eac6a0b23 100644 --- a/spring-web/src/test/java/org/springframework/http/server/reactive/MultipartIntegrationTests.java +++ b/spring-web/src/test/java/org/springframework/http/server/reactive/MultipartIntegrationTests.java @@ -32,13 +32,14 @@ import org.springframework.http.ResponseEntity; import org.springframework.http.codec.multipart.FilePart; import org.springframework.http.codec.multipart.FormFieldPart; import org.springframework.http.codec.multipart.Part; -import org.springframework.http.server.reactive.bootstrap.HttpServer; import org.springframework.util.LinkedMultiValueMap; import org.springframework.util.MultiValueMap; import org.springframework.web.client.RestTemplate; import org.springframework.web.server.ServerWebExchange; import org.springframework.web.server.WebHandler; import org.springframework.web.server.adapter.HttpWebHandlerAdapter; +import org.springframework.web.testfixture.http.server.reactive.bootstrap.AbstractHttpHandlerIntegrationTests; +import org.springframework.web.testfixture.http.server.reactive.bootstrap.HttpServer; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-web/src/test/java/org/springframework/http/server/reactive/RandomHandlerIntegrationTests.java b/spring-web/src/test/java/org/springframework/http/server/reactive/RandomHandlerIntegrationTests.java index e8f03ee9868..7cbc1089c84 100644 --- a/spring-web/src/test/java/org/springframework/http/server/reactive/RandomHandlerIntegrationTests.java +++ b/spring-web/src/test/java/org/springframework/http/server/reactive/RandomHandlerIntegrationTests.java @@ -28,8 +28,9 @@ import org.springframework.core.io.buffer.DataBufferFactory; import org.springframework.core.io.buffer.DefaultDataBufferFactory; import org.springframework.http.RequestEntity; import org.springframework.http.ResponseEntity; -import org.springframework.http.server.reactive.bootstrap.HttpServer; import org.springframework.web.client.RestTemplate; +import org.springframework.web.testfixture.http.server.reactive.bootstrap.AbstractHttpHandlerIntegrationTests; +import org.springframework.web.testfixture.http.server.reactive.bootstrap.HttpServer; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-web/src/test/java/org/springframework/http/server/reactive/ServerHttpRequestIntegrationTests.java b/spring-web/src/test/java/org/springframework/http/server/reactive/ServerHttpRequestIntegrationTests.java index b108e797fa6..901180f5e18 100644 --- a/spring-web/src/test/java/org/springframework/http/server/reactive/ServerHttpRequestIntegrationTests.java +++ b/spring-web/src/test/java/org/springframework/http/server/reactive/ServerHttpRequestIntegrationTests.java @@ -23,8 +23,9 @@ import reactor.core.publisher.Mono; import org.springframework.http.HttpStatus; import org.springframework.http.RequestEntity; import org.springframework.http.ResponseEntity; -import org.springframework.http.server.reactive.bootstrap.HttpServer; import org.springframework.web.client.RestTemplate; +import org.springframework.web.testfixture.http.server.reactive.bootstrap.AbstractHttpHandlerIntegrationTests; +import org.springframework.web.testfixture.http.server.reactive.bootstrap.HttpServer; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-web/src/test/java/org/springframework/http/server/reactive/ServerHttpRequestTests.java b/spring-web/src/test/java/org/springframework/http/server/reactive/ServerHttpRequestTests.java index 8bd7b00b5ac..c6917031bc0 100644 --- a/spring-web/src/test/java/org/springframework/http/server/reactive/ServerHttpRequestTests.java +++ b/spring-web/src/test/java/org/springframework/http/server/reactive/ServerHttpRequestTests.java @@ -29,11 +29,11 @@ import org.junit.jupiter.api.Test; import org.springframework.core.io.buffer.DefaultDataBufferFactory; import org.springframework.http.HttpMethod; -import org.springframework.mock.web.test.DelegatingServletInputStream; -import org.springframework.mock.web.test.MockAsyncContext; -import org.springframework.mock.web.test.MockHttpServletRequest; -import org.springframework.mock.web.test.MockHttpServletResponse; import org.springframework.util.MultiValueMap; +import org.springframework.web.testfixture.servlet.DelegatingServletInputStream; +import org.springframework.web.testfixture.servlet.MockAsyncContext; +import org.springframework.web.testfixture.servlet.MockHttpServletRequest; +import org.springframework.web.testfixture.servlet.MockHttpServletResponse; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException; diff --git a/spring-web/src/test/java/org/springframework/http/server/reactive/ServerHttpsRequestIntegrationTests.java b/spring-web/src/test/java/org/springframework/http/server/reactive/ServerHttpsRequestIntegrationTests.java index cda8ce2b212..0599911088e 100644 --- a/spring-web/src/test/java/org/springframework/http/server/reactive/ServerHttpsRequestIntegrationTests.java +++ b/spring-web/src/test/java/org/springframework/http/server/reactive/ServerHttpsRequestIntegrationTests.java @@ -33,9 +33,9 @@ import org.springframework.http.HttpStatus; import org.springframework.http.RequestEntity; import org.springframework.http.ResponseEntity; import org.springframework.http.client.HttpComponentsClientHttpRequestFactory; -import org.springframework.http.server.reactive.bootstrap.HttpServer; -import org.springframework.http.server.reactive.bootstrap.ReactorHttpsServer; import org.springframework.web.client.RestTemplate; +import org.springframework.web.testfixture.http.server.reactive.bootstrap.HttpServer; +import org.springframework.web.testfixture.http.server.reactive.bootstrap.ReactorHttpsServer; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-web/src/test/java/org/springframework/http/server/reactive/WriteOnlyHandlerIntegrationTests.java b/spring-web/src/test/java/org/springframework/http/server/reactive/WriteOnlyHandlerIntegrationTests.java index a7be114968c..09ccb1272d9 100644 --- a/spring-web/src/test/java/org/springframework/http/server/reactive/WriteOnlyHandlerIntegrationTests.java +++ b/spring-web/src/test/java/org/springframework/http/server/reactive/WriteOnlyHandlerIntegrationTests.java @@ -26,8 +26,9 @@ import reactor.core.publisher.Mono; import org.springframework.core.io.buffer.DataBuffer; import org.springframework.http.RequestEntity; import org.springframework.http.ResponseEntity; -import org.springframework.http.server.reactive.bootstrap.HttpServer; import org.springframework.web.client.RestTemplate; +import org.springframework.web.testfixture.http.server.reactive.bootstrap.AbstractHttpHandlerIntegrationTests; +import org.springframework.web.testfixture.http.server.reactive.bootstrap.HttpServer; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-web/src/test/java/org/springframework/http/server/reactive/ZeroCopyIntegrationTests.java b/spring-web/src/test/java/org/springframework/http/server/reactive/ZeroCopyIntegrationTests.java index ea045b8e86b..79ba2eb64b4 100644 --- a/spring-web/src/test/java/org/springframework/http/server/reactive/ZeroCopyIntegrationTests.java +++ b/spring-web/src/test/java/org/springframework/http/server/reactive/ZeroCopyIntegrationTests.java @@ -27,10 +27,11 @@ import org.springframework.http.MediaType; import org.springframework.http.RequestEntity; import org.springframework.http.ResponseEntity; import org.springframework.http.ZeroCopyHttpOutputMessage; -import org.springframework.http.server.reactive.bootstrap.HttpServer; -import org.springframework.http.server.reactive.bootstrap.ReactorHttpServer; -import org.springframework.http.server.reactive.bootstrap.UndertowHttpServer; import org.springframework.web.client.RestTemplate; +import org.springframework.web.testfixture.http.server.reactive.bootstrap.AbstractHttpHandlerIntegrationTests; +import org.springframework.web.testfixture.http.server.reactive.bootstrap.HttpServer; +import org.springframework.web.testfixture.http.server.reactive.bootstrap.ReactorHttpServer; +import org.springframework.web.testfixture.http.server.reactive.bootstrap.UndertowHttpServer; import static org.assertj.core.api.Assertions.assertThat; import static org.junit.jupiter.api.Assumptions.assumeTrue; @@ -38,7 +39,9 @@ import static org.junit.jupiter.api.Assumptions.assumeTrue; /** * @author Arjen Poutsma */ -public class ZeroCopyIntegrationTests extends AbstractHttpHandlerIntegrationTests { +class ZeroCopyIntegrationTests extends AbstractHttpHandlerIntegrationTests { + + private static final Resource springLogoResource = new ClassPathResource("/org/springframework/web/spring.png"); private final ZeroCopyHandler handler = new ZeroCopyHandler(); @@ -50,9 +53,9 @@ public class ZeroCopyIntegrationTests extends AbstractHttpHandlerIntegrationTest @ParameterizedHttpServerTest - public void zeroCopy(HttpServer httpServer) throws Exception { + void zeroCopy(HttpServer httpServer) throws Exception { assumeTrue(httpServer instanceof ReactorHttpServer || httpServer instanceof UndertowHttpServer, - "Zero-copy only does not support servlet"); + "Zero-copy does not support Servlet"); startServer(httpServer); @@ -60,11 +63,9 @@ public class ZeroCopyIntegrationTests extends AbstractHttpHandlerIntegrationTest RequestEntity request = RequestEntity.get(url).build(); ResponseEntity response = new RestTemplate().exchange(request, byte[].class); - Resource logo = new ClassPathResource("spring.png", ZeroCopyIntegrationTests.class); - assertThat(response.hasBody()).isTrue(); - assertThat(response.getHeaders().getContentLength()).isEqualTo(logo.contentLength()); - assertThat(response.getBody().length).isEqualTo(logo.contentLength()); + assertThat(response.getHeaders().getContentLength()).isEqualTo(springLogoResource.contentLength()); + assertThat(response.getBody().length).isEqualTo(springLogoResource.contentLength()); assertThat(response.getHeaders().getContentType()).isEqualTo(MediaType.IMAGE_PNG); } @@ -75,8 +76,7 @@ public class ZeroCopyIntegrationTests extends AbstractHttpHandlerIntegrationTest public Mono handle(ServerHttpRequest request, ServerHttpResponse response) { try { ZeroCopyHttpOutputMessage zeroCopyResponse = (ZeroCopyHttpOutputMessage) response; - Resource logo = new ClassPathResource("spring.png", ZeroCopyIntegrationTests.class); - File logoFile = logo.getFile(); + File logoFile = springLogoResource.getFile(); zeroCopyResponse.getHeaders().setContentType(MediaType.IMAGE_PNG); zeroCopyResponse.getHeaders().setContentLength(logoFile.length()); return zeroCopyResponse.writeWith(logoFile, 0, logoFile.length()); diff --git a/spring-web/src/test/java/org/springframework/http/server/reactive/bootstrap/package-info.java b/spring-web/src/test/java/org/springframework/http/server/reactive/bootstrap/package-info.java deleted file mode 100644 index 93e5dac5494..00000000000 --- a/spring-web/src/test/java/org/springframework/http/server/reactive/bootstrap/package-info.java +++ /dev/null @@ -1,5 +0,0 @@ -/** - * This package contains temporary interfaces and classes for running embedded servers. - * They are expected to be replaced by an upcoming Spring Boot support. - */ -package org.springframework.http.server.reactive.bootstrap; diff --git a/spring-web/src/test/java/org/springframework/remoting/httpinvoker/HttpInvokerTests.java b/spring-web/src/test/java/org/springframework/remoting/httpinvoker/HttpInvokerTests.java index cbb8eda58ff..91981540b7e 100644 --- a/spring-web/src/test/java/org/springframework/remoting/httpinvoker/HttpInvokerTests.java +++ b/spring-web/src/test/java/org/springframework/remoting/httpinvoker/HttpInvokerTests.java @@ -39,13 +39,13 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.factory.BeanClassLoaderAware; import org.springframework.beans.testfixture.beans.ITestBean; import org.springframework.beans.testfixture.beans.TestBean; -import org.springframework.mock.web.test.MockHttpServletRequest; -import org.springframework.mock.web.test.MockHttpServletResponse; import org.springframework.remoting.RemoteAccessException; import org.springframework.remoting.support.DefaultRemoteInvocationExecutor; import org.springframework.remoting.support.RemoteInvocation; import org.springframework.remoting.support.RemoteInvocationFactory; import org.springframework.remoting.support.RemoteInvocationResult; +import org.springframework.web.testfixture.servlet.MockHttpServletRequest; +import org.springframework.web.testfixture.servlet.MockHttpServletResponse; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; diff --git a/spring-web/src/test/java/org/springframework/web/accept/ContentNegotiationManagerFactoryBeanTests.java b/spring-web/src/test/java/org/springframework/web/accept/ContentNegotiationManagerFactoryBeanTests.java index b8443d9812f..1b5ac13d795 100644 --- a/spring-web/src/test/java/org/springframework/web/accept/ContentNegotiationManagerFactoryBeanTests.java +++ b/spring-web/src/test/java/org/springframework/web/accept/ContentNegotiationManagerFactoryBeanTests.java @@ -26,12 +26,12 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.springframework.http.MediaType; -import org.springframework.mock.web.test.MockHttpServletRequest; -import org.springframework.mock.web.test.MockServletContext; import org.springframework.util.StringUtils; import org.springframework.web.HttpMediaTypeNotAcceptableException; import org.springframework.web.context.request.NativeWebRequest; import org.springframework.web.context.request.ServletWebRequest; +import org.springframework.web.testfixture.servlet.MockHttpServletRequest; +import org.springframework.web.testfixture.servlet.MockServletContext; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; diff --git a/spring-web/src/test/java/org/springframework/web/accept/HeaderContentNegotiationStrategyTests.java b/spring-web/src/test/java/org/springframework/web/accept/HeaderContentNegotiationStrategyTests.java index 2ee89454f66..49f945cea1d 100644 --- a/spring-web/src/test/java/org/springframework/web/accept/HeaderContentNegotiationStrategyTests.java +++ b/spring-web/src/test/java/org/springframework/web/accept/HeaderContentNegotiationStrategyTests.java @@ -21,10 +21,10 @@ import java.util.List; import org.junit.jupiter.api.Test; import org.springframework.http.MediaType; -import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.web.HttpMediaTypeNotAcceptableException; import org.springframework.web.context.request.NativeWebRequest; import org.springframework.web.context.request.ServletWebRequest; +import org.springframework.web.testfixture.servlet.MockHttpServletRequest; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; diff --git a/spring-web/src/test/java/org/springframework/web/accept/PathExtensionContentNegotiationStrategyTests.java b/spring-web/src/test/java/org/springframework/web/accept/PathExtensionContentNegotiationStrategyTests.java index 633e66add1d..5f394907da2 100644 --- a/spring-web/src/test/java/org/springframework/web/accept/PathExtensionContentNegotiationStrategyTests.java +++ b/spring-web/src/test/java/org/springframework/web/accept/PathExtensionContentNegotiationStrategyTests.java @@ -24,10 +24,10 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.springframework.http.MediaType; -import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.web.HttpMediaTypeNotAcceptableException; import org.springframework.web.context.request.NativeWebRequest; import org.springframework.web.context.request.ServletWebRequest; +import org.springframework.web.testfixture.servlet.MockHttpServletRequest; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; diff --git a/spring-web/src/test/java/org/springframework/web/bind/ServletRequestDataBinderTests.java b/spring-web/src/test/java/org/springframework/web/bind/ServletRequestDataBinderTests.java index 3a2c729fc3e..f6704d39e28 100644 --- a/spring-web/src/test/java/org/springframework/web/bind/ServletRequestDataBinderTests.java +++ b/spring-web/src/test/java/org/springframework/web/bind/ServletRequestDataBinderTests.java @@ -27,7 +27,7 @@ import org.springframework.beans.PropertyValue; import org.springframework.beans.PropertyValues; import org.springframework.beans.testfixture.beans.ITestBean; import org.springframework.beans.testfixture.beans.TestBean; -import org.springframework.mock.web.test.MockHttpServletRequest; +import org.springframework.web.testfixture.servlet.MockHttpServletRequest; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-web/src/test/java/org/springframework/web/bind/ServletRequestUtilsTests.java b/spring-web/src/test/java/org/springframework/web/bind/ServletRequestUtilsTests.java index c9a9553f255..f567a8b4313 100644 --- a/spring-web/src/test/java/org/springframework/web/bind/ServletRequestUtilsTests.java +++ b/spring-web/src/test/java/org/springframework/web/bind/ServletRequestUtilsTests.java @@ -19,8 +19,8 @@ package org.springframework.web.bind; import org.junit.jupiter.api.Test; import org.springframework.core.testfixture.EnabledForTestGroups; -import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.util.StopWatch; +import org.springframework.web.testfixture.servlet.MockHttpServletRequest; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; diff --git a/spring-web/src/test/java/org/springframework/web/bind/support/WebExchangeDataBinderTests.java b/spring-web/src/test/java/org/springframework/web/bind/support/WebExchangeDataBinderTests.java index 57382b94070..176397e5e39 100644 --- a/spring-web/src/test/java/org/springframework/web/bind/support/WebExchangeDataBinderTests.java +++ b/spring-web/src/test/java/org/springframework/web/bind/support/WebExchangeDataBinderTests.java @@ -34,12 +34,12 @@ import org.springframework.http.MediaType; import org.springframework.http.codec.FormHttpMessageWriter; import org.springframework.http.codec.multipart.FilePart; import org.springframework.http.codec.multipart.MultipartHttpMessageWriter; -import org.springframework.mock.http.client.reactive.test.MockClientHttpRequest; -import org.springframework.mock.http.server.reactive.test.MockServerHttpRequest; -import org.springframework.mock.web.test.server.MockServerWebExchange; import org.springframework.util.LinkedMultiValueMap; import org.springframework.util.MultiValueMap; import org.springframework.web.server.ServerWebExchange; +import org.springframework.web.testfixture.http.client.reactive.MockClientHttpRequest; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest; +import org.springframework.web.testfixture.server.MockServerWebExchange; import static org.assertj.core.api.Assertions.assertThat; import static org.springframework.core.ResolvableType.forClass; @@ -198,7 +198,7 @@ public class WebExchangeDataBinderTests { data.add("someArray", "456"); data.add("part", new ClassPathResource("org/springframework/http/codec/multipart/foo.txt")); data.add("somePartList", new ClassPathResource("org/springframework/http/codec/multipart/foo.txt")); - data.add("somePartList", new ClassPathResource("org/springframework/http/server/reactive/spring.png")); + data.add("somePartList", new ClassPathResource("/org/springframework/web/spring.png")); binder.bind(exchangeMultipart(data)).block(Duration.ofMillis(5000)); assertThat(bean.getName()).isEqualTo("bar"); diff --git a/spring-web/src/test/java/org/springframework/web/bind/support/WebRequestDataBinderTests.java b/spring-web/src/test/java/org/springframework/web/bind/support/WebRequestDataBinderTests.java index 62dc077ad02..b01cd408b98 100644 --- a/spring-web/src/test/java/org/springframework/web/bind/support/WebRequestDataBinderTests.java +++ b/spring-web/src/test/java/org/springframework/web/bind/support/WebRequestDataBinderTests.java @@ -29,12 +29,12 @@ import org.springframework.beans.PropertyValue; import org.springframework.beans.PropertyValues; import org.springframework.beans.testfixture.beans.ITestBean; import org.springframework.beans.testfixture.beans.TestBean; -import org.springframework.mock.web.test.MockHttpServletRequest; -import org.springframework.mock.web.test.MockMultipartFile; -import org.springframework.mock.web.test.MockMultipartHttpServletRequest; import org.springframework.web.bind.ServletRequestParameterPropertyValues; import org.springframework.web.context.request.ServletWebRequest; import org.springframework.web.multipart.support.StringMultipartFileEditor; +import org.springframework.web.testfixture.servlet.MockHttpServletRequest; +import org.springframework.web.testfixture.servlet.MockMultipartFile; +import org.springframework.web.testfixture.servlet.MockMultipartHttpServletRequest; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-web/src/test/java/org/springframework/web/context/ContextLoaderInitializerTests.java b/spring-web/src/test/java/org/springframework/web/context/ContextLoaderInitializerTests.java index 099d250197a..4c252fffd34 100644 --- a/spring-web/src/test/java/org/springframework/web/context/ContextLoaderInitializerTests.java +++ b/spring-web/src/test/java/org/springframework/web/context/ContextLoaderInitializerTests.java @@ -24,9 +24,9 @@ import javax.servlet.ServletException; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; -import org.springframework.mock.web.test.MockServletContext; import org.springframework.web.context.support.StaticWebApplicationContext; import org.springframework.web.context.support.WebApplicationContextUtils; +import org.springframework.web.testfixture.servlet.MockServletContext; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-web/src/test/java/org/springframework/web/context/request/RequestAndSessionScopedBeanTests.java b/spring-web/src/test/java/org/springframework/web/context/request/RequestAndSessionScopedBeanTests.java index 322ca97a63a..c413f2ca410 100644 --- a/spring-web/src/test/java/org/springframework/web/context/request/RequestAndSessionScopedBeanTests.java +++ b/spring-web/src/test/java/org/springframework/web/context/request/RequestAndSessionScopedBeanTests.java @@ -23,9 +23,9 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.factory.BeanCreationException; import org.springframework.beans.factory.support.RootBeanDefinition; import org.springframework.beans.testfixture.beans.TestBean; -import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.web.context.WebApplicationContext; import org.springframework.web.context.support.StaticWebApplicationContext; +import org.springframework.web.testfixture.servlet.MockHttpServletRequest; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; diff --git a/spring-web/src/test/java/org/springframework/web/context/request/RequestContextListenerTests.java b/spring-web/src/test/java/org/springframework/web/context/request/RequestContextListenerTests.java index a8b4166151c..4e4bdedb134 100644 --- a/spring-web/src/test/java/org/springframework/web/context/request/RequestContextListenerTests.java +++ b/spring-web/src/test/java/org/springframework/web/context/request/RequestContextListenerTests.java @@ -21,8 +21,8 @@ import javax.servlet.ServletRequestEvent; import org.junit.jupiter.api.Test; import org.springframework.core.task.MockRunnable; -import org.springframework.mock.web.test.MockHttpServletRequest; -import org.springframework.mock.web.test.MockServletContext; +import org.springframework.web.testfixture.servlet.MockHttpServletRequest; +import org.springframework.web.testfixture.servlet.MockServletContext; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-web/src/test/java/org/springframework/web/context/request/RequestScopeTests.java b/spring-web/src/test/java/org/springframework/web/context/request/RequestScopeTests.java index 37a98e46c8e..bd52c22d277 100644 --- a/spring-web/src/test/java/org/springframework/web/context/request/RequestScopeTests.java +++ b/spring-web/src/test/java/org/springframework/web/context/request/RequestScopeTests.java @@ -29,7 +29,7 @@ import org.springframework.beans.testfixture.beans.DerivedTestBean; import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.context.expression.StandardBeanExpressionResolver; import org.springframework.core.io.ClassPathResource; -import org.springframework.mock.web.test.MockHttpServletRequest; +import org.springframework.web.testfixture.servlet.MockHttpServletRequest; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; diff --git a/spring-web/src/test/java/org/springframework/web/context/request/RequestScopedProxyTests.java b/spring-web/src/test/java/org/springframework/web/context/request/RequestScopedProxyTests.java index 6c705e3d9df..af46e06b94c 100644 --- a/spring-web/src/test/java/org/springframework/web/context/request/RequestScopedProxyTests.java +++ b/spring-web/src/test/java/org/springframework/web/context/request/RequestScopedProxyTests.java @@ -29,7 +29,7 @@ import org.springframework.beans.testfixture.beans.ITestBean; import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.beans.testfixture.beans.factory.DummyFactory; import org.springframework.core.io.ClassPathResource; -import org.springframework.mock.web.test.MockHttpServletRequest; +import org.springframework.web.testfixture.servlet.MockHttpServletRequest; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-web/src/test/java/org/springframework/web/context/request/ServletRequestAttributesTests.java b/spring-web/src/test/java/org/springframework/web/context/request/ServletRequestAttributesTests.java index 091f416a888..579515d517f 100644 --- a/spring-web/src/test/java/org/springframework/web/context/request/ServletRequestAttributesTests.java +++ b/spring-web/src/test/java/org/springframework/web/context/request/ServletRequestAttributesTests.java @@ -24,8 +24,8 @@ import javax.servlet.http.HttpSession; import org.junit.jupiter.api.Test; -import org.springframework.mock.web.test.MockHttpServletRequest; -import org.springframework.mock.web.test.MockHttpSession; +import org.springframework.web.testfixture.servlet.MockHttpServletRequest; +import org.springframework.web.testfixture.servlet.MockHttpSession; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException; diff --git a/spring-web/src/test/java/org/springframework/web/context/request/ServletWebRequestHttpMethodsTests.java b/spring-web/src/test/java/org/springframework/web/context/request/ServletWebRequestHttpMethodsTests.java index 4c1d0b7be27..daac2991889 100644 --- a/spring-web/src/test/java/org/springframework/web/context/request/ServletWebRequestHttpMethodsTests.java +++ b/spring-web/src/test/java/org/springframework/web/context/request/ServletWebRequestHttpMethodsTests.java @@ -26,8 +26,8 @@ import java.util.Date; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.ValueSource; -import org.springframework.mock.web.test.MockHttpServletRequest; -import org.springframework.mock.web.test.MockHttpServletResponse; +import org.springframework.web.testfixture.servlet.MockHttpServletRequest; +import org.springframework.web.testfixture.servlet.MockHttpServletResponse; import static java.time.format.DateTimeFormatter.RFC_1123_DATE_TIME; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-web/src/test/java/org/springframework/web/context/request/ServletWebRequestTests.java b/spring-web/src/test/java/org/springframework/web/context/request/ServletWebRequestTests.java index ef5257ce266..db295dc5a99 100644 --- a/spring-web/src/test/java/org/springframework/web/context/request/ServletWebRequestTests.java +++ b/spring-web/src/test/java/org/springframework/web/context/request/ServletWebRequestTests.java @@ -29,9 +29,9 @@ import javax.servlet.http.HttpServletResponseWrapper; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; -import org.springframework.mock.web.test.MockHttpServletRequest; -import org.springframework.mock.web.test.MockHttpServletResponse; import org.springframework.web.multipart.MultipartRequest; +import org.springframework.web.testfixture.servlet.MockHttpServletRequest; +import org.springframework.web.testfixture.servlet.MockHttpServletResponse; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-web/src/test/java/org/springframework/web/context/request/SessionScopeTests.java b/spring-web/src/test/java/org/springframework/web/context/request/SessionScopeTests.java index 908c4db4242..eb9d95807e0 100644 --- a/spring-web/src/test/java/org/springframework/web/context/request/SessionScopeTests.java +++ b/spring-web/src/test/java/org/springframework/web/context/request/SessionScopeTests.java @@ -32,8 +32,8 @@ import org.springframework.beans.testfixture.beans.DerivedTestBean; import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.core.io.ClassPathResource; import org.springframework.core.testfixture.io.SerializationTestUtils; -import org.springframework.mock.web.test.MockHttpServletRequest; -import org.springframework.mock.web.test.MockHttpSession; +import org.springframework.web.testfixture.servlet.MockHttpServletRequest; +import org.springframework.web.testfixture.servlet.MockHttpSession; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-web/src/test/java/org/springframework/web/context/request/WebApplicationContextScopeTests.java b/spring-web/src/test/java/org/springframework/web/context/request/WebApplicationContextScopeTests.java index 6fffbb6c3a2..8315021b4b5 100644 --- a/spring-web/src/test/java/org/springframework/web/context/request/WebApplicationContextScopeTests.java +++ b/spring-web/src/test/java/org/springframework/web/context/request/WebApplicationContextScopeTests.java @@ -22,11 +22,11 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.factory.support.GenericBeanDefinition; import org.springframework.beans.testfixture.beans.DerivedTestBean; -import org.springframework.mock.web.test.MockHttpServletRequest; -import org.springframework.mock.web.test.MockServletContext; import org.springframework.web.context.ContextCleanupListener; import org.springframework.web.context.WebApplicationContext; import org.springframework.web.context.support.GenericWebApplicationContext; +import org.springframework.web.testfixture.servlet.MockHttpServletRequest; +import org.springframework.web.testfixture.servlet.MockServletContext; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-web/src/test/java/org/springframework/web/context/request/async/StandardServletAsyncWebRequestTests.java b/spring-web/src/test/java/org/springframework/web/context/request/async/StandardServletAsyncWebRequestTests.java index 966fc0e9403..6a71cf98582 100644 --- a/spring-web/src/test/java/org/springframework/web/context/request/async/StandardServletAsyncWebRequestTests.java +++ b/spring-web/src/test/java/org/springframework/web/context/request/async/StandardServletAsyncWebRequestTests.java @@ -23,9 +23,9 @@ import javax.servlet.AsyncEvent; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; -import org.springframework.mock.web.test.MockAsyncContext; -import org.springframework.mock.web.test.MockHttpServletRequest; -import org.springframework.mock.web.test.MockHttpServletResponse; +import org.springframework.web.testfixture.servlet.MockAsyncContext; +import org.springframework.web.testfixture.servlet.MockHttpServletRequest; +import org.springframework.web.testfixture.servlet.MockHttpServletResponse; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatIllegalStateException; diff --git a/spring-web/src/test/java/org/springframework/web/context/request/async/WebAsyncManagerErrorTests.java b/spring-web/src/test/java/org/springframework/web/context/request/async/WebAsyncManagerErrorTests.java index 4888379f662..6ecb5fd2fd5 100644 --- a/spring-web/src/test/java/org/springframework/web/context/request/async/WebAsyncManagerErrorTests.java +++ b/spring-web/src/test/java/org/springframework/web/context/request/async/WebAsyncManagerErrorTests.java @@ -25,10 +25,10 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.springframework.core.task.AsyncTaskExecutor; -import org.springframework.mock.web.test.MockAsyncContext; -import org.springframework.mock.web.test.MockHttpServletRequest; -import org.springframework.mock.web.test.MockHttpServletResponse; import org.springframework.web.context.request.NativeWebRequest; +import org.springframework.web.testfixture.servlet.MockAsyncContext; +import org.springframework.web.testfixture.servlet.MockHttpServletRequest; +import org.springframework.web.testfixture.servlet.MockHttpServletResponse; import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.BDDMockito.given; diff --git a/spring-web/src/test/java/org/springframework/web/context/request/async/WebAsyncManagerTests.java b/spring-web/src/test/java/org/springframework/web/context/request/async/WebAsyncManagerTests.java index 0a90ea36c39..ccde83a39c4 100644 --- a/spring-web/src/test/java/org/springframework/web/context/request/async/WebAsyncManagerTests.java +++ b/spring-web/src/test/java/org/springframework/web/context/request/async/WebAsyncManagerTests.java @@ -26,7 +26,7 @@ import org.junit.jupiter.api.Test; import org.springframework.core.task.AsyncTaskExecutor; import org.springframework.core.task.SimpleAsyncTaskExecutor; -import org.springframework.mock.web.test.MockHttpServletRequest; +import org.springframework.web.testfixture.servlet.MockHttpServletRequest; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; diff --git a/spring-web/src/test/java/org/springframework/web/context/request/async/WebAsyncManagerTimeoutTests.java b/spring-web/src/test/java/org/springframework/web/context/request/async/WebAsyncManagerTimeoutTests.java index 2397acb1ffd..7fcba13b179 100644 --- a/spring-web/src/test/java/org/springframework/web/context/request/async/WebAsyncManagerTimeoutTests.java +++ b/spring-web/src/test/java/org/springframework/web/context/request/async/WebAsyncManagerTimeoutTests.java @@ -25,10 +25,10 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.springframework.core.task.AsyncTaskExecutor; -import org.springframework.mock.web.test.MockAsyncContext; -import org.springframework.mock.web.test.MockHttpServletRequest; -import org.springframework.mock.web.test.MockHttpServletResponse; import org.springframework.web.context.request.NativeWebRequest; +import org.springframework.web.testfixture.servlet.MockAsyncContext; +import org.springframework.web.testfixture.servlet.MockHttpServletRequest; +import org.springframework.web.testfixture.servlet.MockHttpServletResponse; import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.ArgumentMatchers.any; diff --git a/spring-web/src/test/java/org/springframework/web/context/support/ResourceTests.java b/spring-web/src/test/java/org/springframework/web/context/support/ResourceTests.java index ead4700185d..34083887181 100644 --- a/spring-web/src/test/java/org/springframework/web/context/support/ResourceTests.java +++ b/spring-web/src/test/java/org/springframework/web/context/support/ResourceTests.java @@ -21,7 +21,7 @@ import java.io.IOException; import org.junit.jupiter.api.Test; import org.springframework.core.io.Resource; -import org.springframework.mock.web.test.MockServletContext; +import org.springframework.web.testfixture.servlet.MockServletContext; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-web/src/test/java/org/springframework/web/context/support/Spr8510Tests.java b/spring-web/src/test/java/org/springframework/web/context/support/Spr8510Tests.java index 094c042455a..c8036faac90 100644 --- a/spring-web/src/test/java/org/springframework/web/context/support/Spr8510Tests.java +++ b/spring-web/src/test/java/org/springframework/web/context/support/Spr8510Tests.java @@ -21,9 +21,9 @@ import javax.servlet.ServletContextEvent; import org.junit.jupiter.api.Test; import org.springframework.context.annotation.ClassPathBeanDefinitionScanner; -import org.springframework.mock.web.test.MockServletContext; import org.springframework.web.context.ContextLoader; import org.springframework.web.context.ContextLoaderListener; +import org.springframework.web.testfixture.servlet.MockServletContext; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; diff --git a/spring-web/src/test/java/org/springframework/web/context/support/SpringBeanAutowiringSupportTests.java b/spring-web/src/test/java/org/springframework/web/context/support/SpringBeanAutowiringSupportTests.java index a03dac5a6bb..9a9f1b879e7 100644 --- a/spring-web/src/test/java/org/springframework/web/context/support/SpringBeanAutowiringSupportTests.java +++ b/spring-web/src/test/java/org/springframework/web/context/support/SpringBeanAutowiringSupportTests.java @@ -24,8 +24,8 @@ import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.testfixture.beans.ITestBean; import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.context.annotation.AnnotationConfigUtils; -import org.springframework.mock.web.test.MockServletContext; import org.springframework.web.context.WebApplicationContext; +import org.springframework.web.testfixture.servlet.MockServletContext; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-web/src/test/java/org/springframework/web/cors/CorsUtilsTests.java b/spring-web/src/test/java/org/springframework/web/cors/CorsUtilsTests.java index defa940ca87..d68c677ddf1 100644 --- a/spring-web/src/test/java/org/springframework/web/cors/CorsUtilsTests.java +++ b/spring-web/src/test/java/org/springframework/web/cors/CorsUtilsTests.java @@ -20,7 +20,7 @@ import org.junit.jupiter.api.Test; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpMethod; -import org.springframework.mock.web.test.MockHttpServletRequest; +import org.springframework.web.testfixture.servlet.MockHttpServletRequest; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-web/src/test/java/org/springframework/web/cors/DefaultCorsProcessorTests.java b/spring-web/src/test/java/org/springframework/web/cors/DefaultCorsProcessorTests.java index 72970cd7b14..e655cc71585 100644 --- a/spring-web/src/test/java/org/springframework/web/cors/DefaultCorsProcessorTests.java +++ b/spring-web/src/test/java/org/springframework/web/cors/DefaultCorsProcessorTests.java @@ -23,8 +23,8 @@ import org.junit.jupiter.api.Test; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpMethod; -import org.springframework.mock.web.test.MockHttpServletRequest; -import org.springframework.mock.web.test.MockHttpServletResponse; +import org.springframework.web.testfixture.servlet.MockHttpServletRequest; +import org.springframework.web.testfixture.servlet.MockHttpServletResponse; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-web/src/test/java/org/springframework/web/cors/UrlBasedCorsConfigurationSourceTests.java b/spring-web/src/test/java/org/springframework/web/cors/UrlBasedCorsConfigurationSourceTests.java index 5ef4ca99a73..f818b169dca 100644 --- a/spring-web/src/test/java/org/springframework/web/cors/UrlBasedCorsConfigurationSourceTests.java +++ b/spring-web/src/test/java/org/springframework/web/cors/UrlBasedCorsConfigurationSourceTests.java @@ -19,7 +19,7 @@ package org.springframework.web.cors; import org.junit.jupiter.api.Test; import org.springframework.http.HttpMethod; -import org.springframework.mock.web.test.MockHttpServletRequest; +import org.springframework.web.testfixture.servlet.MockHttpServletRequest; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; diff --git a/spring-web/src/test/java/org/springframework/web/cors/reactive/CorsUtilsTests.java b/spring-web/src/test/java/org/springframework/web/cors/reactive/CorsUtilsTests.java index 5b530a2ae25..617655643d5 100644 --- a/spring-web/src/test/java/org/springframework/web/cors/reactive/CorsUtilsTests.java +++ b/spring-web/src/test/java/org/springframework/web/cors/reactive/CorsUtilsTests.java @@ -23,12 +23,12 @@ import reactor.core.publisher.Mono; import org.springframework.http.HttpHeaders; import org.springframework.http.server.reactive.ServerHttpRequest; -import org.springframework.mock.http.server.reactive.test.MockServerHttpRequest; -import org.springframework.mock.web.test.server.MockServerWebExchange; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest; +import org.springframework.web.testfixture.server.MockServerWebExchange; import static org.assertj.core.api.Assertions.assertThat; -import static org.springframework.mock.http.server.reactive.test.MockServerHttpRequest.get; -import static org.springframework.mock.http.server.reactive.test.MockServerHttpRequest.options; +import static org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest.get; +import static org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest.options; /** * Test case for reactive {@link CorsUtils}. diff --git a/spring-web/src/test/java/org/springframework/web/cors/reactive/CorsWebFilterTests.java b/spring-web/src/test/java/org/springframework/web/cors/reactive/CorsWebFilterTests.java index 938d80f6e31..2a269ad5534 100644 --- a/spring-web/src/test/java/org/springframework/web/cors/reactive/CorsWebFilterTests.java +++ b/spring-web/src/test/java/org/springframework/web/cors/reactive/CorsWebFilterTests.java @@ -27,10 +27,10 @@ import reactor.core.publisher.Mono; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpMethod; -import org.springframework.mock.http.server.reactive.test.MockServerHttpRequest; -import org.springframework.mock.web.test.server.MockServerWebExchange; import org.springframework.web.cors.CorsConfiguration; import org.springframework.web.server.WebFilterChain; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest; +import org.springframework.web.testfixture.server.MockServerWebExchange; import static org.assertj.core.api.Assertions.assertThat; import static org.springframework.http.HttpHeaders.ACCESS_CONTROL_ALLOW_HEADERS; diff --git a/spring-web/src/test/java/org/springframework/web/cors/reactive/DefaultCorsProcessorTests.java b/spring-web/src/test/java/org/springframework/web/cors/reactive/DefaultCorsProcessorTests.java index 42d46222f38..8e317268f19 100644 --- a/spring-web/src/test/java/org/springframework/web/cors/reactive/DefaultCorsProcessorTests.java +++ b/spring-web/src/test/java/org/springframework/web/cors/reactive/DefaultCorsProcessorTests.java @@ -23,10 +23,10 @@ import org.springframework.http.HttpHeaders; import org.springframework.http.HttpMethod; import org.springframework.http.HttpStatus; import org.springframework.http.server.reactive.ServerHttpResponse; -import org.springframework.mock.http.server.reactive.test.MockServerHttpRequest; -import org.springframework.mock.web.test.server.MockServerWebExchange; import org.springframework.web.cors.CorsConfiguration; import org.springframework.web.server.ServerWebExchange; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest; +import org.springframework.web.testfixture.server.MockServerWebExchange; import static org.assertj.core.api.Assertions.assertThat; import static org.springframework.http.HttpHeaders.ACCESS_CONTROL_ALLOW_HEADERS; diff --git a/spring-web/src/test/java/org/springframework/web/cors/reactive/UrlBasedCorsConfigurationSourceTests.java b/spring-web/src/test/java/org/springframework/web/cors/reactive/UrlBasedCorsConfigurationSourceTests.java index e05e8652d9e..6aecd98a511 100644 --- a/spring-web/src/test/java/org/springframework/web/cors/reactive/UrlBasedCorsConfigurationSourceTests.java +++ b/spring-web/src/test/java/org/springframework/web/cors/reactive/UrlBasedCorsConfigurationSourceTests.java @@ -18,9 +18,9 @@ package org.springframework.web.cors.reactive; import org.junit.jupiter.api.Test; -import org.springframework.mock.http.server.reactive.test.MockServerHttpRequest; -import org.springframework.mock.web.test.server.MockServerWebExchange; import org.springframework.web.cors.CorsConfiguration; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest; +import org.springframework.web.testfixture.server.MockServerWebExchange; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-web/src/test/java/org/springframework/web/filter/CharacterEncodingFilterTests.java b/spring-web/src/test/java/org/springframework/web/filter/CharacterEncodingFilterTests.java index 7ee5c856848..19bd055b006 100644 --- a/spring-web/src/test/java/org/springframework/web/filter/CharacterEncodingFilterTests.java +++ b/spring-web/src/test/java/org/springframework/web/filter/CharacterEncodingFilterTests.java @@ -22,9 +22,9 @@ import javax.servlet.http.HttpServletResponse; import org.junit.jupiter.api.Test; -import org.springframework.mock.web.test.MockFilterConfig; -import org.springframework.mock.web.test.MockHttpServletResponse; -import org.springframework.mock.web.test.MockServletContext; +import org.springframework.web.testfixture.servlet.MockFilterConfig; +import org.springframework.web.testfixture.servlet.MockHttpServletResponse; +import org.springframework.web.testfixture.servlet.MockServletContext; import org.springframework.web.util.WebUtils; import static org.mockito.BDDMockito.given; diff --git a/spring-web/src/test/java/org/springframework/web/filter/CompositeFilterTests.java b/spring-web/src/test/java/org/springframework/web/filter/CompositeFilterTests.java index 23930bb0fca..fe9a21dd88a 100644 --- a/spring-web/src/test/java/org/springframework/web/filter/CompositeFilterTests.java +++ b/spring-web/src/test/java/org/springframework/web/filter/CompositeFilterTests.java @@ -29,10 +29,10 @@ import javax.servlet.ServletResponse; import org.junit.jupiter.api.Test; -import org.springframework.mock.web.test.MockFilterConfig; -import org.springframework.mock.web.test.MockHttpServletRequest; -import org.springframework.mock.web.test.MockHttpServletResponse; -import org.springframework.mock.web.test.MockServletContext; +import org.springframework.web.testfixture.servlet.MockFilterConfig; +import org.springframework.web.testfixture.servlet.MockHttpServletRequest; +import org.springframework.web.testfixture.servlet.MockHttpServletResponse; +import org.springframework.web.testfixture.servlet.MockServletContext; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-web/src/test/java/org/springframework/web/filter/CorsFilterTests.java b/spring-web/src/test/java/org/springframework/web/filter/CorsFilterTests.java index 64ca23a0260..00db048c69d 100644 --- a/spring-web/src/test/java/org/springframework/web/filter/CorsFilterTests.java +++ b/spring-web/src/test/java/org/springframework/web/filter/CorsFilterTests.java @@ -27,9 +27,9 @@ import org.junit.jupiter.api.Test; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpMethod; -import org.springframework.mock.web.test.MockHttpServletRequest; -import org.springframework.mock.web.test.MockHttpServletResponse; import org.springframework.web.cors.CorsConfiguration; +import org.springframework.web.testfixture.servlet.MockHttpServletRequest; +import org.springframework.web.testfixture.servlet.MockHttpServletResponse; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.fail; diff --git a/spring-web/src/test/java/org/springframework/web/filter/DelegatingFilterProxyTests.java b/spring-web/src/test/java/org/springframework/web/filter/DelegatingFilterProxyTests.java index 003bfd02cc5..3454a81d4eb 100644 --- a/spring-web/src/test/java/org/springframework/web/filter/DelegatingFilterProxyTests.java +++ b/spring-web/src/test/java/org/springframework/web/filter/DelegatingFilterProxyTests.java @@ -28,12 +28,12 @@ import javax.servlet.ServletResponse; import org.junit.jupiter.api.Test; -import org.springframework.mock.web.test.MockFilterConfig; -import org.springframework.mock.web.test.MockHttpServletRequest; -import org.springframework.mock.web.test.MockHttpServletResponse; -import org.springframework.mock.web.test.MockServletContext; import org.springframework.web.context.WebApplicationContext; import org.springframework.web.context.support.StaticWebApplicationContext; +import org.springframework.web.testfixture.servlet.MockFilterConfig; +import org.springframework.web.testfixture.servlet.MockHttpServletRequest; +import org.springframework.web.testfixture.servlet.MockHttpServletResponse; +import org.springframework.web.testfixture.servlet.MockServletContext; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatIllegalStateException; diff --git a/spring-web/src/test/java/org/springframework/web/filter/FormContentFilterTests.java b/spring-web/src/test/java/org/springframework/web/filter/FormContentFilterTests.java index d583610b252..1273628b19f 100644 --- a/spring-web/src/test/java/org/springframework/web/filter/FormContentFilterTests.java +++ b/spring-web/src/test/java/org/springframework/web/filter/FormContentFilterTests.java @@ -25,9 +25,9 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.springframework.http.HttpMethod; -import org.springframework.mock.web.test.MockFilterChain; -import org.springframework.mock.web.test.MockHttpServletRequest; -import org.springframework.mock.web.test.MockHttpServletResponse; +import org.springframework.web.testfixture.servlet.MockFilterChain; +import org.springframework.web.testfixture.servlet.MockHttpServletRequest; +import org.springframework.web.testfixture.servlet.MockHttpServletResponse; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-web/src/test/java/org/springframework/web/filter/ForwardedHeaderFilterTests.java b/spring-web/src/test/java/org/springframework/web/filter/ForwardedHeaderFilterTests.java index 4fb97248e02..ca073a04985 100644 --- a/spring-web/src/test/java/org/springframework/web/filter/ForwardedHeaderFilterTests.java +++ b/spring-web/src/test/java/org/springframework/web/filter/ForwardedHeaderFilterTests.java @@ -30,9 +30,9 @@ import javax.servlet.http.HttpServletResponse; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; -import org.springframework.mock.web.test.MockFilterChain; -import org.springframework.mock.web.test.MockHttpServletRequest; -import org.springframework.mock.web.test.MockHttpServletResponse; +import org.springframework.web.testfixture.servlet.MockFilterChain; +import org.springframework.web.testfixture.servlet.MockHttpServletRequest; +import org.springframework.web.testfixture.servlet.MockHttpServletResponse; import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; diff --git a/spring-web/src/test/java/org/springframework/web/filter/HiddenHttpMethodFilterTests.java b/spring-web/src/test/java/org/springframework/web/filter/HiddenHttpMethodFilterTests.java index 3d85486242f..c35c86b6036 100644 --- a/spring-web/src/test/java/org/springframework/web/filter/HiddenHttpMethodFilterTests.java +++ b/spring-web/src/test/java/org/springframework/web/filter/HiddenHttpMethodFilterTests.java @@ -26,8 +26,8 @@ import javax.servlet.http.HttpServletRequest; import org.junit.jupiter.api.Test; -import org.springframework.mock.web.test.MockHttpServletRequest; -import org.springframework.mock.web.test.MockHttpServletResponse; +import org.springframework.web.testfixture.servlet.MockHttpServletRequest; +import org.springframework.web.testfixture.servlet.MockHttpServletResponse; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-web/src/test/java/org/springframework/web/filter/OncePerRequestFilterTests.java b/spring-web/src/test/java/org/springframework/web/filter/OncePerRequestFilterTests.java index 7f1b70da680..94024a67492 100644 --- a/spring-web/src/test/java/org/springframework/web/filter/OncePerRequestFilterTests.java +++ b/spring-web/src/test/java/org/springframework/web/filter/OncePerRequestFilterTests.java @@ -28,9 +28,9 @@ import javax.servlet.http.HttpServletResponse; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; -import org.springframework.mock.web.test.MockFilterChain; -import org.springframework.mock.web.test.MockHttpServletRequest; -import org.springframework.mock.web.test.MockHttpServletResponse; +import org.springframework.web.testfixture.servlet.MockFilterChain; +import org.springframework.web.testfixture.servlet.MockHttpServletRequest; +import org.springframework.web.testfixture.servlet.MockHttpServletResponse; import org.springframework.web.util.WebUtils; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-web/src/test/java/org/springframework/web/filter/RelativeRedirectFilterTests.java b/spring-web/src/test/java/org/springframework/web/filter/RelativeRedirectFilterTests.java index 71c94994d45..dd23fd6ac27 100644 --- a/spring-web/src/test/java/org/springframework/web/filter/RelativeRedirectFilterTests.java +++ b/spring-web/src/test/java/org/springframework/web/filter/RelativeRedirectFilterTests.java @@ -25,9 +25,9 @@ import org.mockito.Mockito; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpStatus; -import org.springframework.mock.web.test.MockFilterChain; -import org.springframework.mock.web.test.MockHttpServletRequest; -import org.springframework.mock.web.test.MockHttpServletResponse; +import org.springframework.web.testfixture.servlet.MockFilterChain; +import org.springframework.web.testfixture.servlet.MockHttpServletRequest; +import org.springframework.web.testfixture.servlet.MockHttpServletResponse; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException; diff --git a/spring-web/src/test/java/org/springframework/web/filter/RequestContextFilterTests.java b/spring-web/src/test/java/org/springframework/web/filter/RequestContextFilterTests.java index a785af134a8..c88b2e36c95 100644 --- a/spring-web/src/test/java/org/springframework/web/filter/RequestContextFilterTests.java +++ b/spring-web/src/test/java/org/springframework/web/filter/RequestContextFilterTests.java @@ -25,12 +25,12 @@ import javax.servlet.ServletResponse; import org.junit.jupiter.api.Test; -import org.springframework.mock.web.test.MockFilterConfig; -import org.springframework.mock.web.test.MockHttpServletRequest; -import org.springframework.mock.web.test.MockHttpServletResponse; -import org.springframework.mock.web.test.MockServletContext; import org.springframework.web.context.request.RequestAttributes; import org.springframework.web.context.request.RequestContextHolder; +import org.springframework.web.testfixture.servlet.MockFilterConfig; +import org.springframework.web.testfixture.servlet.MockHttpServletRequest; +import org.springframework.web.testfixture.servlet.MockHttpServletResponse; +import org.springframework.web.testfixture.servlet.MockServletContext; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatIllegalStateException; diff --git a/spring-web/src/test/java/org/springframework/web/filter/RequestLoggingFilterTests.java b/spring-web/src/test/java/org/springframework/web/filter/RequestLoggingFilterTests.java index 9d378a6a5c0..e3053bbb1b4 100644 --- a/spring-web/src/test/java/org/springframework/web/filter/RequestLoggingFilterTests.java +++ b/spring-web/src/test/java/org/springframework/web/filter/RequestLoggingFilterTests.java @@ -24,10 +24,10 @@ import javax.servlet.http.HttpServletResponse; import org.junit.jupiter.api.Test; -import org.springframework.mock.web.test.MockHttpServletRequest; -import org.springframework.mock.web.test.MockHttpServletResponse; -import org.springframework.mock.web.test.MockHttpSession; import org.springframework.util.FileCopyUtils; +import org.springframework.web.testfixture.servlet.MockHttpServletRequest; +import org.springframework.web.testfixture.servlet.MockHttpServletResponse; +import org.springframework.web.testfixture.servlet.MockHttpSession; import org.springframework.web.util.ContentCachingRequestWrapper; import org.springframework.web.util.WebUtils; diff --git a/spring-web/src/test/java/org/springframework/web/filter/ShallowEtagHeaderFilterTests.java b/spring-web/src/test/java/org/springframework/web/filter/ShallowEtagHeaderFilterTests.java index f0144bd86b5..804a3c5b0ff 100644 --- a/spring-web/src/test/java/org/springframework/web/filter/ShallowEtagHeaderFilterTests.java +++ b/spring-web/src/test/java/org/springframework/web/filter/ShallowEtagHeaderFilterTests.java @@ -21,10 +21,10 @@ import javax.servlet.http.HttpServletResponse; import org.junit.jupiter.api.Test; -import org.springframework.mock.web.test.MockHttpServletRequest; -import org.springframework.mock.web.test.MockHttpServletResponse; import org.springframework.util.FileCopyUtils; import org.springframework.util.StreamUtils; +import org.springframework.web.testfixture.servlet.MockHttpServletRequest; +import org.springframework.web.testfixture.servlet.MockHttpServletResponse; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-web/src/test/java/org/springframework/web/filter/reactive/HiddenHttpMethodFilterTests.java b/spring-web/src/test/java/org/springframework/web/filter/reactive/HiddenHttpMethodFilterTests.java index 61d79238a26..4bf21aa0803 100644 --- a/spring-web/src/test/java/org/springframework/web/filter/reactive/HiddenHttpMethodFilterTests.java +++ b/spring-web/src/test/java/org/springframework/web/filter/reactive/HiddenHttpMethodFilterTests.java @@ -25,10 +25,10 @@ import reactor.test.StepVerifier; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpMethod; import org.springframework.http.MediaType; -import org.springframework.mock.http.server.reactive.test.MockServerHttpRequest; -import org.springframework.mock.web.test.server.MockServerWebExchange; import org.springframework.web.server.ServerWebExchange; import org.springframework.web.server.WebFilterChain; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest; +import org.springframework.web.testfixture.server.MockServerWebExchange; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-web/src/test/java/org/springframework/web/filter/reactive/ServerWebExchangeContextFilterTests.java b/spring-web/src/test/java/org/springframework/web/filter/reactive/ServerWebExchangeContextFilterTests.java index fee9f9293ae..62c62b553d6 100644 --- a/spring-web/src/test/java/org/springframework/web/filter/reactive/ServerWebExchangeContextFilterTests.java +++ b/spring-web/src/test/java/org/springframework/web/filter/reactive/ServerWebExchangeContextFilterTests.java @@ -22,10 +22,10 @@ import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; import org.springframework.http.server.reactive.HttpHandler; -import org.springframework.mock.http.server.reactive.test.MockServerHttpRequest; -import org.springframework.mock.http.server.reactive.test.MockServerHttpResponse; import org.springframework.web.server.ServerWebExchange; import org.springframework.web.server.adapter.WebHttpHandlerBuilder; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpResponse; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-web/src/test/java/org/springframework/web/method/annotation/CookieValueMethodArgumentResolverTests.java b/spring-web/src/test/java/org/springframework/web/method/annotation/CookieValueMethodArgumentResolverTests.java index 5f032f94551..47b184f4881 100644 --- a/spring-web/src/test/java/org/springframework/web/method/annotation/CookieValueMethodArgumentResolverTests.java +++ b/spring-web/src/test/java/org/springframework/web/method/annotation/CookieValueMethodArgumentResolverTests.java @@ -25,12 +25,12 @@ import org.junit.jupiter.api.Test; import org.springframework.core.MethodParameter; import org.springframework.core.annotation.SynthesizingMethodParameter; -import org.springframework.mock.web.test.MockHttpServletRequest; -import org.springframework.mock.web.test.MockHttpServletResponse; import org.springframework.web.bind.ServletRequestBindingException; import org.springframework.web.bind.annotation.CookieValue; import org.springframework.web.context.request.NativeWebRequest; import org.springframework.web.context.request.ServletWebRequest; +import org.springframework.web.testfixture.servlet.MockHttpServletRequest; +import org.springframework.web.testfixture.servlet.MockHttpServletResponse; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; diff --git a/spring-web/src/test/java/org/springframework/web/method/annotation/ErrorsMethodArgumentResolverTests.java b/spring-web/src/test/java/org/springframework/web/method/annotation/ErrorsMethodArgumentResolverTests.java index a3444193fc0..1bf57b4bb2e 100644 --- a/spring-web/src/test/java/org/springframework/web/method/annotation/ErrorsMethodArgumentResolverTests.java +++ b/spring-web/src/test/java/org/springframework/web/method/annotation/ErrorsMethodArgumentResolverTests.java @@ -20,13 +20,13 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.springframework.core.MethodParameter; -import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.validation.BindingResult; import org.springframework.validation.Errors; import org.springframework.web.bind.WebDataBinder; import org.springframework.web.context.request.NativeWebRequest; import org.springframework.web.context.request.ServletWebRequest; import org.springframework.web.method.support.ModelAndViewContainer; +import org.springframework.web.testfixture.servlet.MockHttpServletRequest; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatIllegalStateException; diff --git a/spring-web/src/test/java/org/springframework/web/method/annotation/ExpressionValueMethodArgumentResolverTests.java b/spring-web/src/test/java/org/springframework/web/method/annotation/ExpressionValueMethodArgumentResolverTests.java index 74d06bdd126..86c419c8dd1 100644 --- a/spring-web/src/test/java/org/springframework/web/method/annotation/ExpressionValueMethodArgumentResolverTests.java +++ b/spring-web/src/test/java/org/springframework/web/method/annotation/ExpressionValueMethodArgumentResolverTests.java @@ -24,12 +24,12 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Value; import org.springframework.core.MethodParameter; -import org.springframework.mock.web.test.MockHttpServletRequest; -import org.springframework.mock.web.test.MockHttpServletResponse; import org.springframework.web.context.request.NativeWebRequest; import org.springframework.web.context.request.RequestContextHolder; import org.springframework.web.context.request.ServletWebRequest; import org.springframework.web.context.support.GenericWebApplicationContext; +import org.springframework.web.testfixture.servlet.MockHttpServletRequest; +import org.springframework.web.testfixture.servlet.MockHttpServletResponse; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-web/src/test/java/org/springframework/web/method/annotation/InitBinderDataBinderFactoryTests.java b/spring-web/src/test/java/org/springframework/web/method/annotation/InitBinderDataBinderFactoryTests.java index c74c221ec18..1126d2bf251 100644 --- a/spring-web/src/test/java/org/springframework/web/method/annotation/InitBinderDataBinderFactoryTests.java +++ b/spring-web/src/test/java/org/springframework/web/method/annotation/InitBinderDataBinderFactoryTests.java @@ -24,7 +24,6 @@ import org.junit.jupiter.api.Test; import org.springframework.core.LocalVariableTableParameterNameDiscoverer; import org.springframework.core.convert.ConversionService; import org.springframework.format.support.DefaultFormattingConversionService; -import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.web.bind.WebDataBinder; import org.springframework.web.bind.annotation.InitBinder; import org.springframework.web.bind.annotation.RequestParam; @@ -35,6 +34,7 @@ import org.springframework.web.context.request.NativeWebRequest; import org.springframework.web.context.request.ServletWebRequest; import org.springframework.web.method.support.HandlerMethodArgumentResolverComposite; import org.springframework.web.method.support.InvocableHandlerMethod; +import org.springframework.web.testfixture.servlet.MockHttpServletRequest; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatIllegalStateException; diff --git a/spring-web/src/test/java/org/springframework/web/method/annotation/MapMethodProcessorTests.java b/spring-web/src/test/java/org/springframework/web/method/annotation/MapMethodProcessorTests.java index 635dff6a3d8..4482307abe7 100644 --- a/spring-web/src/test/java/org/springframework/web/method/annotation/MapMethodProcessorTests.java +++ b/spring-web/src/test/java/org/springframework/web/method/annotation/MapMethodProcessorTests.java @@ -22,14 +22,14 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.springframework.core.MethodParameter; -import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.ui.ModelMap; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.context.request.NativeWebRequest; import org.springframework.web.context.request.ServletWebRequest; -import org.springframework.web.method.ResolvableMethod; import org.springframework.web.method.support.ModelAndViewContainer; +import org.springframework.web.testfixture.method.ResolvableMethod; +import org.springframework.web.testfixture.servlet.MockHttpServletRequest; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-web/src/test/java/org/springframework/web/method/annotation/ModelAttributeMethodProcessorTests.java b/spring-web/src/test/java/org/springframework/web/method/annotation/ModelAttributeMethodProcessorTests.java index 7171fdd7e29..038f28bfa34 100644 --- a/spring-web/src/test/java/org/springframework/web/method/annotation/ModelAttributeMethodProcessorTests.java +++ b/spring-web/src/test/java/org/springframework/web/method/annotation/ModelAttributeMethodProcessorTests.java @@ -26,7 +26,6 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.core.MethodParameter; import org.springframework.core.annotation.SynthesizingMethodParameter; -import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.validation.BindException; import org.springframework.validation.BindingResult; import org.springframework.validation.Errors; @@ -39,6 +38,7 @@ import org.springframework.web.context.request.NativeWebRequest; import org.springframework.web.context.request.ServletWebRequest; import org.springframework.web.context.request.WebRequest; import org.springframework.web.method.support.ModelAndViewContainer; +import org.springframework.web.testfixture.servlet.MockHttpServletRequest; import static java.lang.annotation.ElementType.CONSTRUCTOR; import static java.lang.annotation.ElementType.FIELD; diff --git a/spring-web/src/test/java/org/springframework/web/method/annotation/ModelFactoryOrderingTests.java b/spring-web/src/test/java/org/springframework/web/method/annotation/ModelFactoryOrderingTests.java index 31a3a271551..9e4b9f3c0b3 100644 --- a/spring-web/src/test/java/org/springframework/web/method/annotation/ModelFactoryOrderingTests.java +++ b/spring-web/src/test/java/org/springframework/web/method/annotation/ModelFactoryOrderingTests.java @@ -30,8 +30,6 @@ import org.junit.jupiter.api.Test; import org.springframework.core.MethodIntrospector; import org.springframework.core.annotation.AnnotationUtils; -import org.springframework.mock.web.test.MockHttpServletRequest; -import org.springframework.mock.web.test.MockHttpServletResponse; import org.springframework.ui.Model; import org.springframework.util.ReflectionUtils; import org.springframework.web.bind.annotation.ModelAttribute; @@ -46,6 +44,8 @@ import org.springframework.web.method.HandlerMethod; import org.springframework.web.method.support.HandlerMethodArgumentResolverComposite; import org.springframework.web.method.support.InvocableHandlerMethod; import org.springframework.web.method.support.ModelAndViewContainer; +import org.springframework.web.testfixture.servlet.MockHttpServletRequest; +import org.springframework.web.testfixture.servlet.MockHttpServletResponse; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-web/src/test/java/org/springframework/web/method/annotation/ModelFactoryTests.java b/spring-web/src/test/java/org/springframework/web/method/annotation/ModelFactoryTests.java index afcfdc1b2d6..1275c08b695 100644 --- a/spring-web/src/test/java/org/springframework/web/method/annotation/ModelFactoryTests.java +++ b/spring-web/src/test/java/org/springframework/web/method/annotation/ModelFactoryTests.java @@ -23,7 +23,6 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.springframework.core.LocalVariableTableParameterNameDiscoverer; -import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.ui.Model; import org.springframework.ui.ModelMap; import org.springframework.validation.BindingResult; @@ -40,6 +39,7 @@ import org.springframework.web.method.HandlerMethod; import org.springframework.web.method.support.HandlerMethodArgumentResolverComposite; import org.springframework.web.method.support.InvocableHandlerMethod; import org.springframework.web.method.support.ModelAndViewContainer; +import org.springframework.web.testfixture.servlet.MockHttpServletRequest; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; diff --git a/spring-web/src/test/java/org/springframework/web/method/annotation/ModelMethodProcessorTests.java b/spring-web/src/test/java/org/springframework/web/method/annotation/ModelMethodProcessorTests.java index f3c5564c598..8b28fdd4cf9 100644 --- a/spring-web/src/test/java/org/springframework/web/method/annotation/ModelMethodProcessorTests.java +++ b/spring-web/src/test/java/org/springframework/web/method/annotation/ModelMethodProcessorTests.java @@ -22,12 +22,12 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.springframework.core.MethodParameter; -import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.ui.ExtendedModelMap; import org.springframework.ui.Model; import org.springframework.web.context.request.NativeWebRequest; import org.springframework.web.context.request.ServletWebRequest; import org.springframework.web.method.support.ModelAndViewContainer; +import org.springframework.web.testfixture.servlet.MockHttpServletRequest; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-web/src/test/java/org/springframework/web/method/annotation/RequestHeaderMapMethodArgumentResolverTests.java b/spring-web/src/test/java/org/springframework/web/method/annotation/RequestHeaderMapMethodArgumentResolverTests.java index 98568ec4fc1..87e14b6a641 100644 --- a/spring-web/src/test/java/org/springframework/web/method/annotation/RequestHeaderMapMethodArgumentResolverTests.java +++ b/spring-web/src/test/java/org/springframework/web/method/annotation/RequestHeaderMapMethodArgumentResolverTests.java @@ -26,13 +26,13 @@ import org.junit.jupiter.api.Test; import org.springframework.core.MethodParameter; import org.springframework.core.annotation.SynthesizingMethodParameter; import org.springframework.http.HttpHeaders; -import org.springframework.mock.web.test.MockHttpServletRequest; -import org.springframework.mock.web.test.MockHttpServletResponse; import org.springframework.util.LinkedMultiValueMap; import org.springframework.util.MultiValueMap; import org.springframework.web.bind.annotation.RequestHeader; import org.springframework.web.context.request.NativeWebRequest; import org.springframework.web.context.request.ServletWebRequest; +import org.springframework.web.testfixture.servlet.MockHttpServletRequest; +import org.springframework.web.testfixture.servlet.MockHttpServletResponse; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-web/src/test/java/org/springframework/web/method/annotation/RequestHeaderMethodArgumentResolverTests.java b/spring-web/src/test/java/org/springframework/web/method/annotation/RequestHeaderMethodArgumentResolverTests.java index 5f272dec905..6acee9f04fb 100644 --- a/spring-web/src/test/java/org/springframework/web/method/annotation/RequestHeaderMethodArgumentResolverTests.java +++ b/spring-web/src/test/java/org/springframework/web/method/annotation/RequestHeaderMethodArgumentResolverTests.java @@ -30,8 +30,6 @@ import org.junit.jupiter.api.Test; import org.springframework.core.MethodParameter; import org.springframework.core.annotation.SynthesizingMethodParameter; import org.springframework.format.support.DefaultFormattingConversionService; -import org.springframework.mock.web.test.MockHttpServletRequest; -import org.springframework.mock.web.test.MockHttpServletResponse; import org.springframework.util.ReflectionUtils; import org.springframework.web.bind.ServletRequestBindingException; import org.springframework.web.bind.annotation.RequestHeader; @@ -41,6 +39,8 @@ import org.springframework.web.context.request.NativeWebRequest; import org.springframework.web.context.request.RequestContextHolder; import org.springframework.web.context.request.ServletWebRequest; import org.springframework.web.context.support.GenericWebApplicationContext; +import org.springframework.web.testfixture.servlet.MockHttpServletRequest; +import org.springframework.web.testfixture.servlet.MockHttpServletResponse; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; diff --git a/spring-web/src/test/java/org/springframework/web/method/annotation/RequestParamMapMethodArgumentResolverTests.java b/spring-web/src/test/java/org/springframework/web/method/annotation/RequestParamMapMethodArgumentResolverTests.java index 10f433583cd..8bc0dcb2660 100644 --- a/spring-web/src/test/java/org/springframework/web/method/annotation/RequestParamMapMethodArgumentResolverTests.java +++ b/spring-web/src/test/java/org/springframework/web/method/annotation/RequestParamMapMethodArgumentResolverTests.java @@ -24,21 +24,21 @@ import javax.servlet.http.Part; import org.junit.jupiter.api.Test; import org.springframework.core.MethodParameter; -import org.springframework.mock.web.test.MockHttpServletRequest; -import org.springframework.mock.web.test.MockHttpServletResponse; -import org.springframework.mock.web.test.MockMultipartFile; -import org.springframework.mock.web.test.MockMultipartHttpServletRequest; -import org.springframework.mock.web.test.MockPart; import org.springframework.util.LinkedMultiValueMap; import org.springframework.util.MultiValueMap; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.context.request.NativeWebRequest; import org.springframework.web.context.request.ServletWebRequest; -import org.springframework.web.method.ResolvableMethod; import org.springframework.web.multipart.MultipartFile; +import org.springframework.web.testfixture.method.ResolvableMethod; +import org.springframework.web.testfixture.servlet.MockHttpServletRequest; +import org.springframework.web.testfixture.servlet.MockHttpServletResponse; +import org.springframework.web.testfixture.servlet.MockMultipartFile; +import org.springframework.web.testfixture.servlet.MockMultipartHttpServletRequest; +import org.springframework.web.testfixture.servlet.MockPart; import static org.assertj.core.api.Assertions.assertThat; -import static org.springframework.web.method.MvcAnnotationPredicates.requestParam; +import static org.springframework.web.testfixture.method.MvcAnnotationPredicates.requestParam; /** * Test fixture with {@link RequestParamMapMethodArgumentResolver}. diff --git a/spring-web/src/test/java/org/springframework/web/method/annotation/RequestParamMethodArgumentResolverTests.java b/spring-web/src/test/java/org/springframework/web/method/annotation/RequestParamMethodArgumentResolverTests.java index 5ff9eba368f..6cef633eae0 100644 --- a/spring-web/src/test/java/org/springframework/web/method/annotation/RequestParamMethodArgumentResolverTests.java +++ b/spring-web/src/test/java/org/springframework/web/method/annotation/RequestParamMethodArgumentResolverTests.java @@ -28,11 +28,6 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.propertyeditors.StringTrimmerEditor; import org.springframework.core.MethodParameter; import org.springframework.core.convert.support.DefaultConversionService; -import org.springframework.mock.web.test.MockHttpServletRequest; -import org.springframework.mock.web.test.MockHttpServletResponse; -import org.springframework.mock.web.test.MockMultipartFile; -import org.springframework.mock.web.test.MockMultipartHttpServletRequest; -import org.springframework.mock.web.test.MockPart; import org.springframework.web.bind.MissingServletRequestParameterException; import org.springframework.web.bind.WebDataBinder; import org.springframework.web.bind.annotation.RequestParam; @@ -43,17 +38,22 @@ import org.springframework.web.bind.support.WebDataBinderFactory; import org.springframework.web.bind.support.WebRequestDataBinder; import org.springframework.web.context.request.NativeWebRequest; import org.springframework.web.context.request.ServletWebRequest; -import org.springframework.web.method.ResolvableMethod; import org.springframework.web.multipart.MultipartException; import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.support.MissingServletRequestPartException; +import org.springframework.web.testfixture.method.ResolvableMethod; +import org.springframework.web.testfixture.servlet.MockHttpServletRequest; +import org.springframework.web.testfixture.servlet.MockHttpServletResponse; +import org.springframework.web.testfixture.servlet.MockMultipartFile; +import org.springframework.web.testfixture.servlet.MockMultipartHttpServletRequest; +import org.springframework.web.testfixture.servlet.MockPart; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; import static org.mockito.BDDMockito.given; import static org.mockito.Mockito.mock; -import static org.springframework.web.method.MvcAnnotationPredicates.requestParam; -import static org.springframework.web.method.MvcAnnotationPredicates.requestPart; +import static org.springframework.web.testfixture.method.MvcAnnotationPredicates.requestParam; +import static org.springframework.web.testfixture.method.MvcAnnotationPredicates.requestPart; /** * Test fixture with {@link RequestParamMethodArgumentResolver}. diff --git a/spring-web/src/test/java/org/springframework/web/method/annotation/SessionAttributesHandlerTests.java b/spring-web/src/test/java/org/springframework/web/method/annotation/SessionAttributesHandlerTests.java index 269fc9dc830..9c856d2d533 100644 --- a/spring-web/src/test/java/org/springframework/web/method/annotation/SessionAttributesHandlerTests.java +++ b/spring-web/src/test/java/org/springframework/web/method/annotation/SessionAttributesHandlerTests.java @@ -22,13 +22,13 @@ import java.util.HashSet; import org.junit.jupiter.api.Test; import org.springframework.beans.testfixture.beans.TestBean; -import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.ui.ModelMap; import org.springframework.web.bind.annotation.SessionAttributes; import org.springframework.web.bind.support.DefaultSessionAttributeStore; import org.springframework.web.bind.support.SessionAttributeStore; import org.springframework.web.context.request.NativeWebRequest; import org.springframework.web.context.request.ServletWebRequest; +import org.springframework.web.testfixture.servlet.MockHttpServletRequest; import static java.util.Arrays.asList; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-web/src/test/java/org/springframework/web/method/annotation/WebArgumentResolverAdapterTests.java b/spring-web/src/test/java/org/springframework/web/method/annotation/WebArgumentResolverAdapterTests.java index b6d1c22b3d8..30cb6858bc7 100644 --- a/spring-web/src/test/java/org/springframework/web/method/annotation/WebArgumentResolverAdapterTests.java +++ b/spring-web/src/test/java/org/springframework/web/method/annotation/WebArgumentResolverAdapterTests.java @@ -21,11 +21,11 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.springframework.core.MethodParameter; -import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.web.bind.support.WebArgumentResolver; import org.springframework.web.context.request.NativeWebRequest; import org.springframework.web.context.request.RequestContextHolder; import org.springframework.web.context.request.ServletWebRequest; +import org.springframework.web.testfixture.servlet.MockHttpServletRequest; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; diff --git a/spring-web/src/test/java/org/springframework/web/method/support/InvocableHandlerMethodTests.java b/spring-web/src/test/java/org/springframework/web/method/support/InvocableHandlerMethodTests.java index d2f6676d508..041d5f0cc2b 100644 --- a/spring-web/src/test/java/org/springframework/web/method/support/InvocableHandlerMethodTests.java +++ b/spring-web/src/test/java/org/springframework/web/method/support/InvocableHandlerMethodTests.java @@ -22,12 +22,12 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.springframework.core.MethodParameter; -import org.springframework.mock.web.test.MockHttpServletRequest; -import org.springframework.mock.web.test.MockHttpServletResponse; import org.springframework.web.bind.support.WebDataBinderFactory; import org.springframework.web.context.request.NativeWebRequest; import org.springframework.web.context.request.ServletWebRequest; -import org.springframework.web.method.ResolvableMethod; +import org.springframework.web.testfixture.method.ResolvableMethod; +import org.springframework.web.testfixture.servlet.MockHttpServletRequest; +import org.springframework.web.testfixture.servlet.MockHttpServletResponse; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; diff --git a/spring-web/src/test/java/org/springframework/web/multipart/commons/CommonsMultipartResolverTests.java b/spring-web/src/test/java/org/springframework/web/multipart/commons/CommonsMultipartResolverTests.java index 7b7b9fd3940..e4aa779da5b 100644 --- a/spring-web/src/test/java/org/springframework/web/multipart/commons/CommonsMultipartResolverTests.java +++ b/spring-web/src/test/java/org/springframework/web/multipart/commons/CommonsMultipartResolverTests.java @@ -46,11 +46,6 @@ import org.apache.commons.fileupload.servlet.ServletFileUpload; import org.junit.jupiter.api.Test; import org.springframework.beans.MutablePropertyValues; -import org.springframework.mock.web.test.MockFilterConfig; -import org.springframework.mock.web.test.MockHttpServletRequest; -import org.springframework.mock.web.test.MockHttpServletResponse; -import org.springframework.mock.web.test.MockServletContext; -import org.springframework.mock.web.test.PassThroughFilterChain; import org.springframework.util.MultiValueMap; import org.springframework.web.bind.ServletRequestDataBinder; import org.springframework.web.context.WebApplicationContext; @@ -60,6 +55,11 @@ import org.springframework.web.multipart.MultipartHttpServletRequest; import org.springframework.web.multipart.support.ByteArrayMultipartFileEditor; import org.springframework.web.multipart.support.MultipartFilter; import org.springframework.web.multipart.support.StringMultipartFileEditor; +import org.springframework.web.testfixture.servlet.MockFilterConfig; +import org.springframework.web.testfixture.servlet.MockHttpServletRequest; +import org.springframework.web.testfixture.servlet.MockHttpServletResponse; +import org.springframework.web.testfixture.servlet.MockServletContext; +import org.springframework.web.testfixture.servlet.PassThroughFilterChain; import org.springframework.web.util.WebUtils; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-web/src/test/java/org/springframework/web/multipart/support/DefaultMultipartHttpServletRequestTests.java b/spring-web/src/test/java/org/springframework/web/multipart/support/DefaultMultipartHttpServletRequestTests.java index e98f58de2a2..b241108a123 100644 --- a/spring-web/src/test/java/org/springframework/web/multipart/support/DefaultMultipartHttpServletRequestTests.java +++ b/spring-web/src/test/java/org/springframework/web/multipart/support/DefaultMultipartHttpServletRequestTests.java @@ -21,9 +21,9 @@ import java.util.Map; import org.junit.jupiter.api.Test; -import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.util.LinkedMultiValueMap; import org.springframework.util.MultiValueMap; +import org.springframework.web.testfixture.servlet.MockHttpServletRequest; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-web/src/test/java/org/springframework/web/multipart/support/RequestPartServletServerHttpRequestTests.java b/spring-web/src/test/java/org/springframework/web/multipart/support/RequestPartServletServerHttpRequestTests.java index 1344579e2bb..9c47afeb679 100644 --- a/spring-web/src/test/java/org/springframework/web/multipart/support/RequestPartServletServerHttpRequestTests.java +++ b/spring-web/src/test/java/org/springframework/web/multipart/support/RequestPartServletServerHttpRequestTests.java @@ -28,10 +28,10 @@ import org.springframework.http.HttpHeaders; import org.springframework.http.HttpMethod; import org.springframework.http.MediaType; import org.springframework.http.server.ServerHttpRequest; -import org.springframework.mock.web.test.MockMultipartFile; -import org.springframework.mock.web.test.MockMultipartHttpServletRequest; import org.springframework.util.FileCopyUtils; import org.springframework.web.multipart.MultipartFile; +import org.springframework.web.testfixture.servlet.MockMultipartFile; +import org.springframework.web.testfixture.servlet.MockMultipartHttpServletRequest; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-web/src/test/java/org/springframework/web/multipart/support/StandardMultipartHttpServletRequestTests.java b/spring-web/src/test/java/org/springframework/web/multipart/support/StandardMultipartHttpServletRequestTests.java index 6ce3f7d0de2..529639843c7 100644 --- a/spring-web/src/test/java/org/springframework/web/multipart/support/StandardMultipartHttpServletRequestTests.java +++ b/spring-web/src/test/java/org/springframework/web/multipart/support/StandardMultipartHttpServletRequestTests.java @@ -23,11 +23,11 @@ import org.junit.jupiter.api.Test; import org.springframework.http.MockHttpOutputMessage; import org.springframework.http.converter.FormHttpMessageConverter; -import org.springframework.mock.web.test.MockHttpServletRequest; -import org.springframework.mock.web.test.MockPart; import org.springframework.util.LinkedMultiValueMap; import org.springframework.util.MultiValueMap; import org.springframework.web.multipart.MultipartFile; +import org.springframework.web.testfixture.servlet.MockHttpServletRequest; +import org.springframework.web.testfixture.servlet.MockPart; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-web/src/test/java/org/springframework/web/server/adapter/DefaultServerWebExchangeCheckNotModifiedTests.java b/spring-web/src/test/java/org/springframework/web/server/adapter/DefaultServerWebExchangeCheckNotModifiedTests.java index 3f0fdfc90ca..97b963bd32f 100644 --- a/spring-web/src/test/java/org/springframework/web/server/adapter/DefaultServerWebExchangeCheckNotModifiedTests.java +++ b/spring-web/src/test/java/org/springframework/web/server/adapter/DefaultServerWebExchangeCheckNotModifiedTests.java @@ -26,11 +26,11 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.springframework.http.HttpStatus; -import org.springframework.mock.http.server.reactive.test.MockServerHttpRequest; -import org.springframework.mock.web.test.server.MockServerWebExchange; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest; +import org.springframework.web.testfixture.server.MockServerWebExchange; import static org.assertj.core.api.Assertions.assertThat; -import static org.springframework.mock.http.server.reactive.test.MockServerHttpRequest.get; +import static org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest.get; /** * "checkNotModified" unit tests for {@link DefaultServerWebExchange}. diff --git a/spring-web/src/test/java/org/springframework/web/server/adapter/DefaultServerWebExchangeTests.java b/spring-web/src/test/java/org/springframework/web/server/adapter/DefaultServerWebExchangeTests.java index dd7045c2cd3..ad0eb02a986 100644 --- a/spring-web/src/test/java/org/springframework/web/server/adapter/DefaultServerWebExchangeTests.java +++ b/spring-web/src/test/java/org/springframework/web/server/adapter/DefaultServerWebExchangeTests.java @@ -19,11 +19,11 @@ package org.springframework.web.server.adapter; import org.junit.jupiter.api.Test; import org.springframework.http.codec.ServerCodecConfigurer; -import org.springframework.mock.http.server.reactive.test.MockServerHttpRequest; -import org.springframework.mock.http.server.reactive.test.MockServerHttpResponse; import org.springframework.web.server.ServerWebExchange; import org.springframework.web.server.i18n.AcceptHeaderLocaleContextResolver; import org.springframework.web.server.session.DefaultWebSessionManager; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpResponse; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-web/src/test/java/org/springframework/web/server/adapter/ForwardedHeaderTransformerTests.java b/spring-web/src/test/java/org/springframework/web/server/adapter/ForwardedHeaderTransformerTests.java index 3f5a674fe50..25d27be12fe 100644 --- a/spring-web/src/test/java/org/springframework/web/server/adapter/ForwardedHeaderTransformerTests.java +++ b/spring-web/src/test/java/org/springframework/web/server/adapter/ForwardedHeaderTransformerTests.java @@ -23,7 +23,7 @@ import org.junit.jupiter.api.Test; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpMethod; import org.springframework.http.server.reactive.ServerHttpRequest; -import org.springframework.mock.http.server.reactive.test.MockServerHttpRequest; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-web/src/test/java/org/springframework/web/server/adapter/WebHttpHandlerBuilderTests.java b/spring-web/src/test/java/org/springframework/web/server/adapter/WebHttpHandlerBuilderTests.java index 08e30c83b4d..d753b6c8d47 100644 --- a/spring-web/src/test/java/org/springframework/web/server/adapter/WebHttpHandlerBuilderTests.java +++ b/spring-web/src/test/java/org/springframework/web/server/adapter/WebHttpHandlerBuilderTests.java @@ -30,12 +30,12 @@ import org.springframework.core.annotation.Order; import org.springframework.core.io.buffer.DataBuffer; import org.springframework.core.io.buffer.DefaultDataBufferFactory; import org.springframework.http.server.reactive.HttpHandler; -import org.springframework.mock.http.server.reactive.test.MockServerHttpRequest; -import org.springframework.mock.http.server.reactive.test.MockServerHttpResponse; import org.springframework.web.server.ServerWebExchange; import org.springframework.web.server.WebExceptionHandler; import org.springframework.web.server.WebFilter; import org.springframework.web.server.WebHandler; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpResponse; import static java.time.Duration.ofMillis; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-web/src/test/java/org/springframework/web/server/handler/ExceptionHandlingWebHandlerTests.java b/spring-web/src/test/java/org/springframework/web/server/handler/ExceptionHandlingWebHandlerTests.java index 8524dabaee6..4e27848f5f1 100644 --- a/spring-web/src/test/java/org/springframework/web/server/handler/ExceptionHandlingWebHandlerTests.java +++ b/spring-web/src/test/java/org/springframework/web/server/handler/ExceptionHandlingWebHandlerTests.java @@ -23,12 +23,12 @@ import reactor.core.publisher.Mono; import reactor.test.StepVerifier; import org.springframework.http.HttpStatus; -import org.springframework.mock.http.server.reactive.test.MockServerHttpRequest; -import org.springframework.mock.web.test.server.MockServerWebExchange; import org.springframework.web.server.ServerWebExchange; import org.springframework.web.server.WebExceptionHandler; import org.springframework.web.server.WebHandler; import org.springframework.web.server.adapter.HttpWebHandlerAdapter; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest; +import org.springframework.web.testfixture.server.MockServerWebExchange; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-web/src/test/java/org/springframework/web/server/handler/FilteringWebHandlerTests.java b/spring-web/src/test/java/org/springframework/web/server/handler/FilteringWebHandlerTests.java index d567ff9bd41..c1b0d34406f 100644 --- a/spring-web/src/test/java/org/springframework/web/server/handler/FilteringWebHandlerTests.java +++ b/spring-web/src/test/java/org/springframework/web/server/handler/FilteringWebHandlerTests.java @@ -26,15 +26,15 @@ import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; import org.springframework.http.HttpStatus; -import org.springframework.mock.http.server.reactive.test.MockServerHttpRequest; -import org.springframework.mock.http.server.reactive.test.MockServerHttpResponse; -import org.springframework.mock.web.test.server.MockServerWebExchange; import org.springframework.web.server.ServerWebExchange; import org.springframework.web.server.WebExceptionHandler; import org.springframework.web.server.WebFilter; import org.springframework.web.server.WebFilterChain; import org.springframework.web.server.WebHandler; import org.springframework.web.server.adapter.WebHttpHandlerBuilder; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpResponse; +import org.springframework.web.testfixture.server.MockServerWebExchange; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-web/src/test/java/org/springframework/web/server/handler/ResponseStatusExceptionHandlerTests.java b/spring-web/src/test/java/org/springframework/web/server/handler/ResponseStatusExceptionHandlerTests.java index 1048dbb226c..5943d8896c3 100644 --- a/spring-web/src/test/java/org/springframework/web/server/handler/ResponseStatusExceptionHandlerTests.java +++ b/spring-web/src/test/java/org/springframework/web/server/handler/ResponseStatusExceptionHandlerTests.java @@ -16,25 +16,7 @@ package org.springframework.web.server.handler; -import java.time.Duration; -import java.util.Arrays; - -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; -import reactor.test.StepVerifier; - -import org.springframework.http.HttpMethod; -import org.springframework.http.HttpStatus; -import org.springframework.http.MediaType; -import org.springframework.mock.http.server.reactive.test.MockServerHttpRequest; -import org.springframework.mock.http.server.reactive.test.MockServerHttpResponse; -import org.springframework.mock.web.test.server.MockServerWebExchange; -import org.springframework.web.server.MethodNotAllowedException; -import org.springframework.web.server.NotAcceptableStatusException; -import org.springframework.web.server.ResponseStatusException; - -import static org.assertj.core.api.Assertions.assertThat; +import org.springframework.web.testfixture.server.handler.AbstractResponseStatusExceptionHandlerTests; /** * Unit tests for {@link ResponseStatusExceptionHandler}. @@ -42,71 +24,8 @@ import static org.assertj.core.api.Assertions.assertThat; * @author Rossen Stoyanchev * @author Juergen Hoeller */ -public class ResponseStatusExceptionHandlerTests { - - protected final MockServerWebExchange exchange = MockServerWebExchange.from(MockServerHttpRequest.get("/")); - - protected ResponseStatusExceptionHandler handler; - - - @BeforeEach - public void setup() { - this.handler = createResponseStatusExceptionHandler(); - } - - protected ResponseStatusExceptionHandler createResponseStatusExceptionHandler() { - return new ResponseStatusExceptionHandler(); - } - - - @Test - public void handleResponseStatusException() { - Throwable ex = new ResponseStatusException(HttpStatus.BAD_REQUEST, ""); - this.handler.handle(this.exchange, ex).block(Duration.ofSeconds(5)); - assertThat(this.exchange.getResponse().getStatusCode()).isEqualTo(HttpStatus.BAD_REQUEST); - } - - @Test - public void handleNestedResponseStatusException() { - Throwable ex = new Exception(new ResponseStatusException(HttpStatus.BAD_REQUEST, "")); - this.handler.handle(this.exchange, ex).block(Duration.ofSeconds(5)); - assertThat(this.exchange.getResponse().getStatusCode()).isEqualTo(HttpStatus.BAD_REQUEST); - } - - @Test // gh-23741 - public void handleMethodNotAllowed() { - Throwable ex = new MethodNotAllowedException(HttpMethod.PATCH, Arrays.asList(HttpMethod.POST, HttpMethod.PUT)); - this.handler.handle(this.exchange, ex).block(Duration.ofSeconds(5)); - - MockServerHttpResponse response = this.exchange.getResponse(); - assertThat(response.getStatusCode()).isEqualTo(HttpStatus.METHOD_NOT_ALLOWED); - assertThat(response.getHeaders().getAllow()).containsOnly(HttpMethod.POST, HttpMethod.PUT); - } - - @Test // gh-23741 - public void handleResponseStatusExceptionWithHeaders() { - Throwable ex = new NotAcceptableStatusException(Arrays.asList(MediaType.TEXT_PLAIN, MediaType.TEXT_HTML)); - this.handler.handle(this.exchange, ex).block(Duration.ofSeconds(5)); - - MockServerHttpResponse response = this.exchange.getResponse(); - assertThat(response.getStatusCode()).isEqualTo(HttpStatus.NOT_ACCEPTABLE); - assertThat(response.getHeaders().getAccept()).containsOnly(MediaType.TEXT_PLAIN, MediaType.TEXT_HTML); - } - - @Test - public void unresolvedException() { - Throwable expected = new IllegalStateException(); - Mono mono = this.handler.handle(this.exchange, expected); - StepVerifier.create(mono).consumeErrorWith(actual -> assertThat(actual).isSameAs(expected)).verify(); - } +public class ResponseStatusExceptionHandlerTests extends AbstractResponseStatusExceptionHandlerTests { - @Test // SPR-16231 - public void responseCommitted() { - Throwable ex = new ResponseStatusException(HttpStatus.INTERNAL_SERVER_ERROR, "Oops"); - this.exchange.getResponse().setStatusCode(HttpStatus.CREATED); - Mono mono = this.exchange.getResponse().setComplete() - .then(Mono.defer(() -> this.handler.handle(this.exchange, ex))); - StepVerifier.create(mono).consumeErrorWith(actual -> assertThat(actual).isSameAs(ex)).verify(); - } + // all tests in super class } diff --git a/spring-web/src/test/java/org/springframework/web/server/i18n/AcceptHeaderLocaleContextResolverTests.java b/spring-web/src/test/java/org/springframework/web/server/i18n/AcceptHeaderLocaleContextResolverTests.java index 882e7ddb8f5..c4ba2d3c676 100644 --- a/spring-web/src/test/java/org/springframework/web/server/i18n/AcceptHeaderLocaleContextResolverTests.java +++ b/spring-web/src/test/java/org/springframework/web/server/i18n/AcceptHeaderLocaleContextResolverTests.java @@ -23,9 +23,9 @@ import java.util.Locale; import org.junit.jupiter.api.Test; import org.springframework.http.HttpHeaders; -import org.springframework.mock.http.server.reactive.test.MockServerHttpRequest; -import org.springframework.mock.web.test.server.MockServerWebExchange; import org.springframework.web.server.ServerWebExchange; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest; +import org.springframework.web.testfixture.server.MockServerWebExchange; import static java.util.Locale.CANADA; import static java.util.Locale.ENGLISH; diff --git a/spring-web/src/test/java/org/springframework/web/server/i18n/FixedLocaleContextResolverTests.java b/spring-web/src/test/java/org/springframework/web/server/i18n/FixedLocaleContextResolverTests.java index 29099806718..0ed2842f158 100644 --- a/spring-web/src/test/java/org/springframework/web/server/i18n/FixedLocaleContextResolverTests.java +++ b/spring-web/src/test/java/org/springframework/web/server/i18n/FixedLocaleContextResolverTests.java @@ -24,9 +24,9 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.springframework.context.i18n.TimeZoneAwareLocaleContext; -import org.springframework.mock.http.server.reactive.test.MockServerHttpRequest; -import org.springframework.mock.web.test.server.MockServerWebExchange; import org.springframework.web.server.ServerWebExchange; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest; +import org.springframework.web.testfixture.server.MockServerWebExchange; import static java.util.Locale.CANADA; import static java.util.Locale.FRANCE; diff --git a/spring-web/src/test/java/org/springframework/web/server/session/CookieWebSessionIdResolverTests.java b/spring-web/src/test/java/org/springframework/web/server/session/CookieWebSessionIdResolverTests.java index 5eb203761c6..71d950c736c 100644 --- a/spring-web/src/test/java/org/springframework/web/server/session/CookieWebSessionIdResolverTests.java +++ b/spring-web/src/test/java/org/springframework/web/server/session/CookieWebSessionIdResolverTests.java @@ -18,9 +18,9 @@ package org.springframework.web.server.session; import org.junit.jupiter.api.Test; import org.springframework.http.ResponseCookie; -import org.springframework.mock.http.server.reactive.test.MockServerHttpRequest; -import org.springframework.mock.web.test.server.MockServerWebExchange; import org.springframework.util.MultiValueMap; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest; +import org.springframework.web.testfixture.server.MockServerWebExchange; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-web/src/test/java/org/springframework/web/server/session/DefaultWebSessionManagerTests.java b/spring-web/src/test/java/org/springframework/web/server/session/DefaultWebSessionManagerTests.java index 7dca7c1d1e6..3125862aa6c 100644 --- a/spring-web/src/test/java/org/springframework/web/server/session/DefaultWebSessionManagerTests.java +++ b/spring-web/src/test/java/org/springframework/web/server/session/DefaultWebSessionManagerTests.java @@ -28,12 +28,12 @@ import org.mockito.quality.Strictness; import reactor.core.publisher.Mono; import org.springframework.http.codec.ServerCodecConfigurer; -import org.springframework.mock.http.server.reactive.test.MockServerHttpRequest; -import org.springframework.mock.http.server.reactive.test.MockServerHttpResponse; import org.springframework.web.server.ServerWebExchange; import org.springframework.web.server.WebSession; import org.springframework.web.server.adapter.DefaultServerWebExchange; import org.springframework.web.server.i18n.AcceptHeaderLocaleContextResolver; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpResponse; import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.ArgumentMatchers.any; diff --git a/spring-web/src/test/java/org/springframework/web/server/session/HeaderWebSessionIdResolverTests.java b/spring-web/src/test/java/org/springframework/web/server/session/HeaderWebSessionIdResolverTests.java index 5e9c7f2eab1..1347e2c05cb 100644 --- a/spring-web/src/test/java/org/springframework/web/server/session/HeaderWebSessionIdResolverTests.java +++ b/spring-web/src/test/java/org/springframework/web/server/session/HeaderWebSessionIdResolverTests.java @@ -21,9 +21,9 @@ import java.util.List; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; -import org.springframework.mock.http.server.reactive.test.MockServerHttpRequest; -import org.springframework.mock.web.test.server.MockServerWebExchange; import org.springframework.web.server.ServerWebExchange; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest; +import org.springframework.web.testfixture.server.MockServerWebExchange; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException; diff --git a/spring-web/src/test/java/org/springframework/web/server/session/WebSessionIntegrationTests.java b/spring-web/src/test/java/org/springframework/web/server/session/WebSessionIntegrationTests.java index 922199e7e98..0fa99e340ba 100644 --- a/spring-web/src/test/java/org/springframework/web/server/session/WebSessionIntegrationTests.java +++ b/spring-web/src/test/java/org/springframework/web/server/session/WebSessionIntegrationTests.java @@ -29,14 +29,14 @@ import org.springframework.http.HttpHeaders; import org.springframework.http.HttpStatus; import org.springframework.http.RequestEntity; import org.springframework.http.ResponseEntity; -import org.springframework.http.server.reactive.AbstractHttpHandlerIntegrationTests; import org.springframework.http.server.reactive.HttpHandler; -import org.springframework.http.server.reactive.bootstrap.HttpServer; import org.springframework.web.client.RestTemplate; import org.springframework.web.server.ServerWebExchange; import org.springframework.web.server.WebHandler; import org.springframework.web.server.WebSession; import org.springframework.web.server.adapter.WebHttpHandlerBuilder; +import org.springframework.web.testfixture.http.server.reactive.bootstrap.AbstractHttpHandlerIntegrationTests; +import org.springframework.web.testfixture.http.server.reactive.bootstrap.HttpServer; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-web/src/test/java/org/springframework/web/util/ContentCachingRequestWrapperTests.java b/spring-web/src/test/java/org/springframework/web/util/ContentCachingRequestWrapperTests.java index 20f040715f3..8f8ac90629b 100644 --- a/spring-web/src/test/java/org/springframework/web/util/ContentCachingRequestWrapperTests.java +++ b/spring-web/src/test/java/org/springframework/web/util/ContentCachingRequestWrapperTests.java @@ -18,8 +18,8 @@ package org.springframework.web.util; import org.junit.jupiter.api.Test; -import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.util.FileCopyUtils; +import org.springframework.web.testfixture.servlet.MockHttpServletRequest; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatIllegalStateException; diff --git a/spring-web/src/test/java/org/springframework/web/util/ServletContextPropertyUtilsTests.java b/spring-web/src/test/java/org/springframework/web/util/ServletContextPropertyUtilsTests.java index 3a66ff0b228..d87c7c41651 100644 --- a/spring-web/src/test/java/org/springframework/web/util/ServletContextPropertyUtilsTests.java +++ b/spring-web/src/test/java/org/springframework/web/util/ServletContextPropertyUtilsTests.java @@ -18,7 +18,7 @@ package org.springframework.web.util; import org.junit.jupiter.api.Test; -import org.springframework.mock.web.test.MockServletContext; +import org.springframework.web.testfixture.servlet.MockServletContext; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-web/src/test/java/org/springframework/web/util/UriComponentsBuilderTests.java b/spring-web/src/test/java/org/springframework/web/util/UriComponentsBuilderTests.java index e8400799f9e..011a3d77a71 100644 --- a/spring-web/src/test/java/org/springframework/web/util/UriComponentsBuilderTests.java +++ b/spring-web/src/test/java/org/springframework/web/util/UriComponentsBuilderTests.java @@ -29,10 +29,10 @@ import org.junit.jupiter.api.Test; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpRequest; import org.springframework.http.server.ServletServerHttpRequest; -import org.springframework.mock.web.test.MockHttpServletRequest; import org.springframework.util.LinkedMultiValueMap; import org.springframework.util.MultiValueMap; import org.springframework.util.StringUtils; +import org.springframework.web.testfixture.servlet.MockHttpServletRequest; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException; diff --git a/spring-web/src/test/java/org/springframework/web/util/UrlPathHelperTests.java b/spring-web/src/test/java/org/springframework/web/util/UrlPathHelperTests.java index 11cac7f0cf0..82a069ae128 100644 --- a/spring-web/src/test/java/org/springframework/web/util/UrlPathHelperTests.java +++ b/spring-web/src/test/java/org/springframework/web/util/UrlPathHelperTests.java @@ -21,7 +21,7 @@ import java.io.UnsupportedEncodingException; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; -import org.springframework.mock.web.test.MockHttpServletRequest; +import org.springframework.web.testfixture.servlet.MockHttpServletRequest; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-web/src/test/java/org/springframework/web/util/WebUtilsTests.java b/spring-web/src/test/java/org/springframework/web/util/WebUtilsTests.java index 0a4c0a3f76a..68226877b16 100644 --- a/spring-web/src/test/java/org/springframework/web/util/WebUtilsTests.java +++ b/spring-web/src/test/java/org/springframework/web/util/WebUtilsTests.java @@ -29,11 +29,11 @@ import org.junit.jupiter.api.Test; import org.springframework.http.HttpHeaders; import org.springframework.http.server.ServerHttpRequest; import org.springframework.http.server.ServletServerHttpRequest; -import org.springframework.mock.web.test.MockFilterChain; -import org.springframework.mock.web.test.MockHttpServletRequest; -import org.springframework.mock.web.test.MockHttpServletResponse; import org.springframework.util.MultiValueMap; import org.springframework.web.filter.ForwardedHeaderFilter; +import org.springframework.web.testfixture.servlet.MockFilterChain; +import org.springframework.web.testfixture.servlet.MockHttpServletRequest; +import org.springframework.web.testfixture.servlet.MockHttpServletResponse; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-web/src/test/kotlin/org/springframework/web/method/annotation/RequestParamMethodArgumentResolverKotlinTests.kt b/spring-web/src/test/kotlin/org/springframework/web/method/annotation/RequestParamMethodArgumentResolverKotlinTests.kt index 8321d7f8119..61c32fec346 100644 --- a/spring-web/src/test/kotlin/org/springframework/web/method/annotation/RequestParamMethodArgumentResolverKotlinTests.kt +++ b/spring-web/src/test/kotlin/org/springframework/web/method/annotation/RequestParamMethodArgumentResolverKotlinTests.kt @@ -26,10 +26,10 @@ import org.springframework.core.annotation.SynthesizingMethodParameter import org.springframework.core.convert.support.DefaultConversionService import org.springframework.http.HttpMethod import org.springframework.http.MediaType -import org.springframework.mock.web.test.MockHttpServletRequest -import org.springframework.mock.web.test.MockHttpServletResponse -import org.springframework.mock.web.test.MockMultipartFile -import org.springframework.mock.web.test.MockMultipartHttpServletRequest +import org.springframework.web.testfixture.servlet.MockHttpServletRequest +import org.springframework.web.testfixture.servlet.MockHttpServletResponse +import org.springframework.web.testfixture.servlet.MockMultipartFile +import org.springframework.web.testfixture.servlet.MockMultipartHttpServletRequest import org.springframework.util.ReflectionUtils import org.springframework.web.bind.MissingServletRequestParameterException import org.springframework.web.bind.annotation.RequestParam diff --git a/spring-web/src/test/resources/org/springframework/http/server/reactive/spring.png b/spring-web/src/test/resources/org/springframework/web/spring.png similarity index 100% rename from spring-web/src/test/resources/org/springframework/http/server/reactive/spring.png rename to spring-web/src/test/resources/org/springframework/web/spring.png diff --git a/spring-web/src/test/java/org/springframework/mock/http/client/reactive/test/MockClientHttpRequest.java b/spring-web/src/testFixtures/java/org/springframework/web/testfixture/http/client/reactive/MockClientHttpRequest.java similarity index 98% rename from spring-web/src/test/java/org/springframework/mock/http/client/reactive/test/MockClientHttpRequest.java rename to spring-web/src/testFixtures/java/org/springframework/web/testfixture/http/client/reactive/MockClientHttpRequest.java index 02b9bceed26..fae88ad98df 100644 --- a/spring-web/src/test/java/org/springframework/mock/http/client/reactive/test/MockClientHttpRequest.java +++ b/spring-web/src/testFixtures/java/org/springframework/web/testfixture/http/client/reactive/MockClientHttpRequest.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.mock.http.client.reactive.test; +package org.springframework.web.testfixture.http.client.reactive; import java.net.URI; import java.nio.charset.Charset; diff --git a/spring-web/src/test/java/org/springframework/mock/http/client/reactive/test/MockClientHttpResponse.java b/spring-web/src/testFixtures/java/org/springframework/web/testfixture/http/client/reactive/MockClientHttpResponse.java similarity index 98% rename from spring-web/src/test/java/org/springframework/mock/http/client/reactive/test/MockClientHttpResponse.java rename to spring-web/src/testFixtures/java/org/springframework/web/testfixture/http/client/reactive/MockClientHttpResponse.java index e757bfad7c4..657f473b4c2 100644 --- a/spring-web/src/test/java/org/springframework/mock/http/client/reactive/test/MockClientHttpResponse.java +++ b/spring-web/src/testFixtures/java/org/springframework/web/testfixture/http/client/reactive/MockClientHttpResponse.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.mock.http.client.reactive.test; +package org.springframework.web.testfixture.http.client.reactive; import java.nio.ByteBuffer; import java.nio.charset.Charset; diff --git a/spring-web/src/test/java/org/springframework/mock/http/server/reactive/test/MockServerHttpRequest.java b/spring-web/src/testFixtures/java/org/springframework/web/testfixture/http/server/reactive/MockServerHttpRequest.java similarity index 99% rename from spring-web/src/test/java/org/springframework/mock/http/server/reactive/test/MockServerHttpRequest.java rename to spring-web/src/testFixtures/java/org/springframework/web/testfixture/http/server/reactive/MockServerHttpRequest.java index 3b7ecb11651..0f41a41d21d 100644 --- a/spring-web/src/test/java/org/springframework/mock/http/server/reactive/test/MockServerHttpRequest.java +++ b/spring-web/src/testFixtures/java/org/springframework/web/testfixture/http/server/reactive/MockServerHttpRequest.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.mock.http.server.reactive.test; +package org.springframework.web.testfixture.http.server.reactive; import java.net.InetSocketAddress; import java.net.URI; diff --git a/spring-web/src/test/java/org/springframework/mock/http/server/reactive/test/MockServerHttpResponse.java b/spring-web/src/testFixtures/java/org/springframework/web/testfixture/http/server/reactive/MockServerHttpResponse.java similarity index 98% rename from spring-web/src/test/java/org/springframework/mock/http/server/reactive/test/MockServerHttpResponse.java rename to spring-web/src/testFixtures/java/org/springframework/web/testfixture/http/server/reactive/MockServerHttpResponse.java index 98b92da526d..fc82675a443 100644 --- a/spring-web/src/test/java/org/springframework/mock/http/server/reactive/test/MockServerHttpResponse.java +++ b/spring-web/src/testFixtures/java/org/springframework/web/testfixture/http/server/reactive/MockServerHttpResponse.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.mock.http.server.reactive.test; +package org.springframework.web.testfixture.http.server.reactive; import java.nio.charset.Charset; import java.nio.charset.StandardCharsets; diff --git a/spring-web/src/test/java/org/springframework/http/server/reactive/AbstractHttpHandlerIntegrationTests.java b/spring-web/src/testFixtures/java/org/springframework/web/testfixture/http/server/reactive/bootstrap/AbstractHttpHandlerIntegrationTests.java similarity index 88% rename from spring-web/src/test/java/org/springframework/http/server/reactive/AbstractHttpHandlerIntegrationTests.java rename to spring-web/src/testFixtures/java/org/springframework/web/testfixture/http/server/reactive/bootstrap/AbstractHttpHandlerIntegrationTests.java index 88f47e37e60..90d05db9f20 100644 --- a/spring-web/src/test/java/org/springframework/http/server/reactive/AbstractHttpHandlerIntegrationTests.java +++ b/spring-web/src/testFixtures/java/org/springframework/web/testfixture/http/server/reactive/bootstrap/AbstractHttpHandlerIntegrationTests.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.http.server.reactive; +package org.springframework.web.testfixture.http.server.reactive.bootstrap; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; @@ -32,11 +32,7 @@ import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.MethodSource; import reactor.core.publisher.Flux; -import org.springframework.http.server.reactive.bootstrap.HttpServer; -import org.springframework.http.server.reactive.bootstrap.JettyHttpServer; -import org.springframework.http.server.reactive.bootstrap.ReactorHttpServer; -import org.springframework.http.server.reactive.bootstrap.TomcatHttpServer; -import org.springframework.http.server.reactive.bootstrap.UndertowHttpServer; +import org.springframework.http.server.reactive.HttpHandler; import org.springframework.util.StringUtils; import org.springframework.web.client.HttpServerErrorException; @@ -120,7 +116,7 @@ public abstract class AbstractHttpHandlerIntegrationTests { @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.METHOD) @ParameterizedTest(name = "[{index}] {0}") - @MethodSource("org.springframework.http.server.reactive.AbstractHttpHandlerIntegrationTests#httpServers()") + @MethodSource("org.springframework.web.testfixture.http.server.reactive.bootstrap.AbstractHttpHandlerIntegrationTests#httpServers()") // public for Kotlin public @interface ParameterizedHttpServerTest { } diff --git a/spring-web/src/test/java/org/springframework/http/server/reactive/bootstrap/AbstractHttpServer.java b/spring-web/src/testFixtures/java/org/springframework/web/testfixture/http/server/reactive/bootstrap/AbstractHttpServer.java similarity index 98% rename from spring-web/src/test/java/org/springframework/http/server/reactive/bootstrap/AbstractHttpServer.java rename to spring-web/src/testFixtures/java/org/springframework/web/testfixture/http/server/reactive/bootstrap/AbstractHttpServer.java index 8aca3b152e5..6713282f988 100644 --- a/spring-web/src/test/java/org/springframework/http/server/reactive/bootstrap/AbstractHttpServer.java +++ b/spring-web/src/testFixtures/java/org/springframework/web/testfixture/http/server/reactive/bootstrap/AbstractHttpServer.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.http.server.reactive.bootstrap; +package org.springframework.web.testfixture.http.server.reactive.bootstrap; import java.util.LinkedHashMap; import java.util.Map; diff --git a/spring-web/src/test/java/org/springframework/http/server/reactive/bootstrap/HttpServer.java b/spring-web/src/testFixtures/java/org/springframework/web/testfixture/http/server/reactive/bootstrap/HttpServer.java similarity index 92% rename from spring-web/src/test/java/org/springframework/http/server/reactive/bootstrap/HttpServer.java rename to spring-web/src/testFixtures/java/org/springframework/web/testfixture/http/server/reactive/bootstrap/HttpServer.java index 9abb1fe14c1..a17dbf80eab 100644 --- a/spring-web/src/test/java/org/springframework/http/server/reactive/bootstrap/HttpServer.java +++ b/spring-web/src/testFixtures/java/org/springframework/web/testfixture/http/server/reactive/bootstrap/HttpServer.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.http.server.reactive.bootstrap; +package org.springframework.web.testfixture.http.server.reactive.bootstrap; import org.springframework.beans.factory.InitializingBean; import org.springframework.context.Lifecycle; diff --git a/spring-web/src/test/java/org/springframework/http/server/reactive/bootstrap/JettyHttpServer.java b/spring-web/src/testFixtures/java/org/springframework/web/testfixture/http/server/reactive/bootstrap/JettyHttpServer.java similarity index 97% rename from spring-web/src/test/java/org/springframework/http/server/reactive/bootstrap/JettyHttpServer.java rename to spring-web/src/testFixtures/java/org/springframework/web/testfixture/http/server/reactive/bootstrap/JettyHttpServer.java index 4d63e75202b..93f828bc3dd 100644 --- a/spring-web/src/test/java/org/springframework/http/server/reactive/bootstrap/JettyHttpServer.java +++ b/spring-web/src/testFixtures/java/org/springframework/web/testfixture/http/server/reactive/bootstrap/JettyHttpServer.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.http.server.reactive.bootstrap; +package org.springframework.web.testfixture.http.server.reactive.bootstrap; import org.eclipse.jetty.server.Server; import org.eclipse.jetty.server.ServerConnector; diff --git a/spring-web/src/test/java/org/springframework/http/server/reactive/bootstrap/ReactorHttpServer.java b/spring-web/src/testFixtures/java/org/springframework/web/testfixture/http/server/reactive/bootstrap/ReactorHttpServer.java similarity index 96% rename from spring-web/src/test/java/org/springframework/http/server/reactive/bootstrap/ReactorHttpServer.java rename to spring-web/src/testFixtures/java/org/springframework/web/testfixture/http/server/reactive/bootstrap/ReactorHttpServer.java index 25e9b2ac3c7..4df1070f61f 100644 --- a/spring-web/src/test/java/org/springframework/http/server/reactive/bootstrap/ReactorHttpServer.java +++ b/spring-web/src/testFixtures/java/org/springframework/web/testfixture/http/server/reactive/bootstrap/ReactorHttpServer.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.http.server.reactive.bootstrap; +package org.springframework.web.testfixture.http.server.reactive.bootstrap; import java.util.concurrent.atomic.AtomicReference; diff --git a/spring-web/src/test/java/org/springframework/http/server/reactive/bootstrap/ReactorHttpsServer.java b/spring-web/src/testFixtures/java/org/springframework/web/testfixture/http/server/reactive/bootstrap/ReactorHttpsServer.java similarity index 96% rename from spring-web/src/test/java/org/springframework/http/server/reactive/bootstrap/ReactorHttpsServer.java rename to spring-web/src/testFixtures/java/org/springframework/web/testfixture/http/server/reactive/bootstrap/ReactorHttpsServer.java index 1a7636d9351..004e27832a9 100644 --- a/spring-web/src/test/java/org/springframework/http/server/reactive/bootstrap/ReactorHttpsServer.java +++ b/spring-web/src/testFixtures/java/org/springframework/web/testfixture/http/server/reactive/bootstrap/ReactorHttpsServer.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.http.server.reactive.bootstrap; +package org.springframework.web.testfixture.http.server.reactive.bootstrap; import java.util.concurrent.atomic.AtomicReference; diff --git a/spring-web/src/test/java/org/springframework/http/server/reactive/bootstrap/TomcatHttpServer.java b/spring-web/src/testFixtures/java/org/springframework/web/testfixture/http/server/reactive/bootstrap/TomcatHttpServer.java similarity index 97% rename from spring-web/src/test/java/org/springframework/http/server/reactive/bootstrap/TomcatHttpServer.java rename to spring-web/src/testFixtures/java/org/springframework/web/testfixture/http/server/reactive/bootstrap/TomcatHttpServer.java index fb34b471cf0..2a1aeb556df 100644 --- a/spring-web/src/test/java/org/springframework/http/server/reactive/bootstrap/TomcatHttpServer.java +++ b/spring-web/src/testFixtures/java/org/springframework/web/testfixture/http/server/reactive/bootstrap/TomcatHttpServer.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.http.server.reactive.bootstrap; +package org.springframework.web.testfixture.http.server.reactive.bootstrap; import java.io.File; diff --git a/spring-web/src/test/java/org/springframework/http/server/reactive/bootstrap/UndertowHttpServer.java b/spring-web/src/testFixtures/java/org/springframework/web/testfixture/http/server/reactive/bootstrap/UndertowHttpServer.java similarity index 95% rename from spring-web/src/test/java/org/springframework/http/server/reactive/bootstrap/UndertowHttpServer.java rename to spring-web/src/testFixtures/java/org/springframework/web/testfixture/http/server/reactive/bootstrap/UndertowHttpServer.java index cdfc5711ac6..d195bae6955 100644 --- a/spring-web/src/test/java/org/springframework/http/server/reactive/bootstrap/UndertowHttpServer.java +++ b/spring-web/src/testFixtures/java/org/springframework/web/testfixture/http/server/reactive/bootstrap/UndertowHttpServer.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.http.server.reactive.bootstrap; +package org.springframework.web.testfixture.http.server.reactive.bootstrap; import java.net.InetSocketAddress; diff --git a/spring-web/src/testFixtures/java/org/springframework/web/testfixture/http/server/reactive/bootstrap/package-info.java b/spring-web/src/testFixtures/java/org/springframework/web/testfixture/http/server/reactive/bootstrap/package-info.java new file mode 100644 index 00000000000..82c65baf2be --- /dev/null +++ b/spring-web/src/testFixtures/java/org/springframework/web/testfixture/http/server/reactive/bootstrap/package-info.java @@ -0,0 +1,6 @@ +/** + * This package contains temporary interfaces and classes for running embedded servers. + * + *

They are expected to be replaced by upcoming Spring Boot support. + */ +package org.springframework.web.testfixture.http.server.reactive.bootstrap; diff --git a/spring-web/src/test/java/org/springframework/mock/http/server/reactive/test/package-info.java b/spring-web/src/testFixtures/java/org/springframework/web/testfixture/http/server/reactive/package-info.java similarity index 73% rename from spring-web/src/test/java/org/springframework/mock/http/server/reactive/test/package-info.java rename to spring-web/src/testFixtures/java/org/springframework/web/testfixture/http/server/reactive/package-info.java index 03e7701a7bd..cc95fcf042c 100644 --- a/spring-web/src/test/java/org/springframework/mock/http/server/reactive/test/package-info.java +++ b/spring-web/src/testFixtures/java/org/springframework/web/testfixture/http/server/reactive/package-info.java @@ -3,7 +3,7 @@ */ @NonNullApi @NonNullFields -package org.springframework.mock.http.server.reactive.test; +package org.springframework.web.testfixture.http.server.reactive; import org.springframework.lang.NonNullApi; import org.springframework.lang.NonNullFields; diff --git a/spring-web/src/test/java/org/springframework/web/method/MvcAnnotationPredicates.java b/spring-web/src/testFixtures/java/org/springframework/web/testfixture/method/MvcAnnotationPredicates.java similarity index 98% rename from spring-web/src/test/java/org/springframework/web/method/MvcAnnotationPredicates.java rename to spring-web/src/testFixtures/java/org/springframework/web/testfixture/method/MvcAnnotationPredicates.java index 1a95d49a959..9bde5d3eab4 100644 --- a/spring-web/src/test/java/org/springframework/web/method/MvcAnnotationPredicates.java +++ b/spring-web/src/testFixtures/java/org/springframework/web/testfixture/method/MvcAnnotationPredicates.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2017 the original author or authors. + * Copyright 2002-2019 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. @@ -13,7 +13,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.springframework.web.method; + +package org.springframework.web.testfixture.method; import java.lang.reflect.Method; import java.util.Arrays; @@ -44,7 +45,6 @@ import org.springframework.web.bind.annotation.ValueConstants; */ public class MvcAnnotationPredicates { - // Method parameter predicates public static ModelAttributePredicate modelAttribute() { diff --git a/spring-web/src/test/java/org/springframework/web/method/ResolvableMethod.java b/spring-web/src/testFixtures/java/org/springframework/web/testfixture/method/ResolvableMethod.java similarity index 97% rename from spring-web/src/test/java/org/springframework/web/method/ResolvableMethod.java rename to spring-web/src/testFixtures/java/org/springframework/web/testfixture/method/ResolvableMethod.java index 4fc0ddd14d8..6ccef862b45 100644 --- a/spring-web/src/test/java/org/springframework/web/method/ResolvableMethod.java +++ b/spring-web/src/testFixtures/java/org/springframework/web/testfixture/method/ResolvableMethod.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.web.method; +package org.springframework.web.testfixture.method; import java.lang.annotation.Annotation; import java.lang.reflect.Method; @@ -188,7 +188,7 @@ public class ResolvableMethod { /** * Filter on method arguments with annotation. - * See {@link org.springframework.web.method.MvcAnnotationPredicates}. + * See {@link org.springframework.web.testfixture.method.MvcAnnotationPredicates}. */ @SafeVarargs public final ArgResolver annot(Predicate... filter) { @@ -301,7 +301,7 @@ public class ResolvableMethod { /** * Filter on annotated methods. - * See {@link org.springframework.web.method.MvcAnnotationPredicates}. + * See {@link org.springframework.web.testfixture.method.MvcAnnotationPredicates}. */ @SafeVarargs public final Builder annot(Predicate... filters) { @@ -312,7 +312,7 @@ public class ResolvableMethod { /** * Filter on methods annotated with the given annotation type. * @see #annot(Predicate[]) - * See {@link org.springframework.web.method.MvcAnnotationPredicates}. + * See {@link org.springframework.web.testfixture.method.MvcAnnotationPredicates}. */ @SafeVarargs public final Builder annotPresent(Class... annotationTypes) { @@ -529,7 +529,7 @@ public class ResolvableMethod { /** * Filter on method arguments with annotations. - * See {@link org.springframework.web.method.MvcAnnotationPredicates}. + * See {@link org.springframework.web.testfixture.method.MvcAnnotationPredicates}. */ @SafeVarargs public final ArgResolver annot(Predicate... filters) { @@ -541,7 +541,7 @@ public class ResolvableMethod { * Filter on method arguments that have the given annotations. * @param annotationTypes the annotation types * @see #annot(Predicate[]) - * See {@link org.springframework.web.method.MvcAnnotationPredicates}. + * See {@link org.springframework.web.testfixture.method.MvcAnnotationPredicates}. */ @SafeVarargs public final ArgResolver annotPresent(Class... annotationTypes) { diff --git a/spring-web/src/test/java/org/springframework/mock/web/test/server/MockServerWebExchange.java b/spring-web/src/testFixtures/java/org/springframework/web/testfixture/server/MockServerWebExchange.java similarity index 94% rename from spring-web/src/test/java/org/springframework/mock/web/test/server/MockServerWebExchange.java rename to spring-web/src/testFixtures/java/org/springframework/web/testfixture/server/MockServerWebExchange.java index 75b51a892bc..000eadd6a24 100644 --- a/spring-web/src/test/java/org/springframework/mock/web/test/server/MockServerWebExchange.java +++ b/spring-web/src/testFixtures/java/org/springframework/web/testfixture/server/MockServerWebExchange.java @@ -13,19 +13,19 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.springframework.mock.web.test.server; +package org.springframework.web.testfixture.server; import reactor.core.publisher.Mono; import org.springframework.http.codec.ServerCodecConfigurer; import org.springframework.lang.Nullable; -import org.springframework.mock.http.server.reactive.test.MockServerHttpRequest; -import org.springframework.mock.http.server.reactive.test.MockServerHttpResponse; import org.springframework.web.server.WebSession; import org.springframework.web.server.adapter.DefaultServerWebExchange; import org.springframework.web.server.i18n.AcceptHeaderLocaleContextResolver; import org.springframework.web.server.session.DefaultWebSessionManager; import org.springframework.web.server.session.WebSessionManager; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpResponse; /** * Extension of {@link DefaultServerWebExchange} for use in tests, along with diff --git a/spring-web/src/test/java/org/springframework/mock/web/test/server/MockWebSession.java b/spring-web/src/testFixtures/java/org/springframework/web/testfixture/server/MockWebSession.java similarity index 98% rename from spring-web/src/test/java/org/springframework/mock/web/test/server/MockWebSession.java rename to spring-web/src/testFixtures/java/org/springframework/web/testfixture/server/MockWebSession.java index ce043a2b1e1..689418372fd 100644 --- a/spring-web/src/test/java/org/springframework/mock/web/test/server/MockWebSession.java +++ b/spring-web/src/testFixtures/java/org/springframework/web/testfixture/server/MockWebSession.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.mock.web.test.server; +package org.springframework.web.testfixture.server; import java.time.Clock; import java.time.Duration; diff --git a/spring-web/src/testFixtures/java/org/springframework/web/testfixture/server/handler/AbstractResponseStatusExceptionHandlerTests.java b/spring-web/src/testFixtures/java/org/springframework/web/testfixture/server/handler/AbstractResponseStatusExceptionHandlerTests.java new file mode 100644 index 00000000000..facc2681dd6 --- /dev/null +++ b/spring-web/src/testFixtures/java/org/springframework/web/testfixture/server/handler/AbstractResponseStatusExceptionHandlerTests.java @@ -0,0 +1,113 @@ +/* + * Copyright 2002-2019 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. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.springframework.web.testfixture.server.handler; + +import java.time.Duration; +import java.util.Arrays; + +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; + +import org.springframework.http.HttpMethod; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.web.server.MethodNotAllowedException; +import org.springframework.web.server.NotAcceptableStatusException; +import org.springframework.web.server.ResponseStatusException; +import org.springframework.web.server.handler.ResponseStatusExceptionHandler; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpResponse; +import org.springframework.web.testfixture.server.MockServerWebExchange; + +import static org.assertj.core.api.Assertions.assertThat; + +/** + * Abstract base class for unit tests for {@link ResponseStatusExceptionHandler}. + * + * @author Rossen Stoyanchev + * @author Juergen Hoeller + */ +public abstract class AbstractResponseStatusExceptionHandlerTests { + + protected final MockServerWebExchange exchange = MockServerWebExchange.from(MockServerHttpRequest.get("/")); + + protected ResponseStatusExceptionHandler handler; + + + @BeforeEach + public void setup() { + this.handler = createResponseStatusExceptionHandler(); + } + + protected ResponseStatusExceptionHandler createResponseStatusExceptionHandler() { + return new ResponseStatusExceptionHandler(); + } + + + @Test + public void handleResponseStatusException() { + Throwable ex = new ResponseStatusException(HttpStatus.BAD_REQUEST, ""); + this.handler.handle(this.exchange, ex).block(Duration.ofSeconds(5)); + assertThat(this.exchange.getResponse().getStatusCode()).isEqualTo(HttpStatus.BAD_REQUEST); + } + + @Test + public void handleNestedResponseStatusException() { + Throwable ex = new Exception(new ResponseStatusException(HttpStatus.BAD_REQUEST, "")); + this.handler.handle(this.exchange, ex).block(Duration.ofSeconds(5)); + assertThat(this.exchange.getResponse().getStatusCode()).isEqualTo(HttpStatus.BAD_REQUEST); + } + + @Test // gh-23741 + public void handleMethodNotAllowed() { + Throwable ex = new MethodNotAllowedException(HttpMethod.PATCH, Arrays.asList(HttpMethod.POST, HttpMethod.PUT)); + this.handler.handle(this.exchange, ex).block(Duration.ofSeconds(5)); + + MockServerHttpResponse response = this.exchange.getResponse(); + assertThat(response.getStatusCode()).isEqualTo(HttpStatus.METHOD_NOT_ALLOWED); + assertThat(response.getHeaders().getAllow()).containsOnly(HttpMethod.POST, HttpMethod.PUT); + } + + @Test // gh-23741 + public void handleResponseStatusExceptionWithHeaders() { + Throwable ex = new NotAcceptableStatusException(Arrays.asList(MediaType.TEXT_PLAIN, MediaType.TEXT_HTML)); + this.handler.handle(this.exchange, ex).block(Duration.ofSeconds(5)); + + MockServerHttpResponse response = this.exchange.getResponse(); + assertThat(response.getStatusCode()).isEqualTo(HttpStatus.NOT_ACCEPTABLE); + assertThat(response.getHeaders().getAccept()).containsOnly(MediaType.TEXT_PLAIN, MediaType.TEXT_HTML); + } + + @Test + public void unresolvedException() { + Throwable expected = new IllegalStateException(); + Mono mono = this.handler.handle(this.exchange, expected); + StepVerifier.create(mono).consumeErrorWith(actual -> assertThat(actual).isSameAs(expected)).verify(); + } + + @Test // SPR-16231 + public void responseCommitted() { + Throwable ex = new ResponseStatusException(HttpStatus.INTERNAL_SERVER_ERROR, "Oops"); + this.exchange.getResponse().setStatusCode(HttpStatus.CREATED); + Mono mono = this.exchange.getResponse().setComplete() + .then(Mono.defer(() -> this.handler.handle(this.exchange, ex))); + StepVerifier.create(mono).consumeErrorWith(actual -> assertThat(actual).isSameAs(ex)).verify(); + } + +} diff --git a/spring-web/src/test/java/org/springframework/mock/web/test/server/package-info.java b/spring-web/src/testFixtures/java/org/springframework/web/testfixture/server/package-info.java similarity index 77% rename from spring-web/src/test/java/org/springframework/mock/web/test/server/package-info.java rename to spring-web/src/testFixtures/java/org/springframework/web/testfixture/server/package-info.java index d1986319e44..54867a24232 100644 --- a/spring-web/src/test/java/org/springframework/mock/web/test/server/package-info.java +++ b/spring-web/src/testFixtures/java/org/springframework/web/testfixture/server/package-info.java @@ -3,7 +3,7 @@ */ @NonNullApi @NonNullFields -package org.springframework.mock.web.test.server; +package org.springframework.web.testfixture.server; import org.springframework.lang.NonNullApi; import org.springframework.lang.NonNullFields; diff --git a/spring-web/src/test/java/org/springframework/mock/web/test/DelegatingServletInputStream.java b/spring-web/src/testFixtures/java/org/springframework/web/testfixture/servlet/DelegatingServletInputStream.java similarity index 97% rename from spring-web/src/test/java/org/springframework/mock/web/test/DelegatingServletInputStream.java rename to spring-web/src/testFixtures/java/org/springframework/web/testfixture/servlet/DelegatingServletInputStream.java index 577cfc0abc0..7be60d7318d 100644 --- a/spring-web/src/test/java/org/springframework/mock/web/test/DelegatingServletInputStream.java +++ b/spring-web/src/testFixtures/java/org/springframework/web/testfixture/servlet/DelegatingServletInputStream.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.mock.web.test; +package org.springframework.web.testfixture.servlet; import java.io.IOException; import java.io.InputStream; diff --git a/spring-web/src/test/java/org/springframework/mock/web/test/DelegatingServletOutputStream.java b/spring-web/src/testFixtures/java/org/springframework/web/testfixture/servlet/DelegatingServletOutputStream.java similarity index 97% rename from spring-web/src/test/java/org/springframework/mock/web/test/DelegatingServletOutputStream.java rename to spring-web/src/testFixtures/java/org/springframework/web/testfixture/servlet/DelegatingServletOutputStream.java index e70b2984f68..774f4bf672c 100644 --- a/spring-web/src/test/java/org/springframework/mock/web/test/DelegatingServletOutputStream.java +++ b/spring-web/src/testFixtures/java/org/springframework/web/testfixture/servlet/DelegatingServletOutputStream.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.mock.web.test; +package org.springframework.web.testfixture.servlet; import java.io.IOException; import java.io.OutputStream; diff --git a/spring-web/src/test/java/org/springframework/mock/web/test/HeaderValueHolder.java b/spring-web/src/testFixtures/java/org/springframework/web/testfixture/servlet/HeaderValueHolder.java similarity index 98% rename from spring-web/src/test/java/org/springframework/mock/web/test/HeaderValueHolder.java rename to spring-web/src/testFixtures/java/org/springframework/web/testfixture/servlet/HeaderValueHolder.java index 1259509f22f..5a36ee347d7 100644 --- a/spring-web/src/test/java/org/springframework/mock/web/test/HeaderValueHolder.java +++ b/spring-web/src/testFixtures/java/org/springframework/web/testfixture/servlet/HeaderValueHolder.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.mock.web.test; +package org.springframework.web.testfixture.servlet; import java.util.ArrayList; import java.util.Collection; diff --git a/spring-web/src/test/java/org/springframework/mock/web/test/MockAsyncContext.java b/spring-web/src/testFixtures/java/org/springframework/web/testfixture/servlet/MockAsyncContext.java similarity index 98% rename from spring-web/src/test/java/org/springframework/mock/web/test/MockAsyncContext.java rename to spring-web/src/testFixtures/java/org/springframework/web/testfixture/servlet/MockAsyncContext.java index 57784764476..0391911be35 100644 --- a/spring-web/src/test/java/org/springframework/mock/web/test/MockAsyncContext.java +++ b/spring-web/src/testFixtures/java/org/springframework/web/testfixture/servlet/MockAsyncContext.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.mock.web.test; +package org.springframework.web.testfixture.servlet; import java.io.IOException; import java.util.ArrayList; diff --git a/spring-web/src/test/java/org/springframework/mock/web/test/MockBodyContent.java b/spring-web/src/testFixtures/java/org/springframework/web/testfixture/servlet/MockBodyContent.java similarity index 99% rename from spring-web/src/test/java/org/springframework/mock/web/test/MockBodyContent.java rename to spring-web/src/testFixtures/java/org/springframework/web/testfixture/servlet/MockBodyContent.java index f38bf8a175e..1d6a50611f2 100644 --- a/spring-web/src/test/java/org/springframework/mock/web/test/MockBodyContent.java +++ b/spring-web/src/testFixtures/java/org/springframework/web/testfixture/servlet/MockBodyContent.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.mock.web.test; +package org.springframework.web.testfixture.servlet; import java.io.IOException; import java.io.Reader; diff --git a/spring-web/src/test/java/org/springframework/mock/web/test/MockCookie.java b/spring-web/src/testFixtures/java/org/springframework/web/testfixture/servlet/MockCookie.java similarity index 98% rename from spring-web/src/test/java/org/springframework/mock/web/test/MockCookie.java rename to spring-web/src/testFixtures/java/org/springframework/web/testfixture/servlet/MockCookie.java index 408e2ecefdd..8f2e5eaa975 100644 --- a/spring-web/src/test/java/org/springframework/mock/web/test/MockCookie.java +++ b/spring-web/src/testFixtures/java/org/springframework/web/testfixture/servlet/MockCookie.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.mock.web.test; +package org.springframework.web.testfixture.servlet; import java.time.DateTimeException; import java.time.ZonedDateTime; diff --git a/spring-web/src/test/java/org/springframework/mock/web/test/MockExpressionEvaluator.java b/spring-web/src/testFixtures/java/org/springframework/web/testfixture/servlet/MockExpressionEvaluator.java similarity index 98% rename from spring-web/src/test/java/org/springframework/mock/web/test/MockExpressionEvaluator.java rename to spring-web/src/testFixtures/java/org/springframework/web/testfixture/servlet/MockExpressionEvaluator.java index 0a778efb916..3358798e768 100644 --- a/spring-web/src/test/java/org/springframework/mock/web/test/MockExpressionEvaluator.java +++ b/spring-web/src/testFixtures/java/org/springframework/web/testfixture/servlet/MockExpressionEvaluator.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.mock.web.test; +package org.springframework.web.testfixture.servlet; import javax.servlet.jsp.JspException; import javax.servlet.jsp.PageContext; diff --git a/spring-web/src/test/java/org/springframework/mock/web/test/MockFilterChain.java b/spring-web/src/testFixtures/java/org/springframework/web/testfixture/servlet/MockFilterChain.java similarity index 98% rename from spring-web/src/test/java/org/springframework/mock/web/test/MockFilterChain.java rename to spring-web/src/testFixtures/java/org/springframework/web/testfixture/servlet/MockFilterChain.java index b834e789cb6..259fecf306a 100644 --- a/spring-web/src/test/java/org/springframework/mock/web/test/MockFilterChain.java +++ b/spring-web/src/testFixtures/java/org/springframework/web/testfixture/servlet/MockFilterChain.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.mock.web.test; +package org.springframework.web.testfixture.servlet; import java.io.IOException; import java.util.Arrays; diff --git a/spring-web/src/test/java/org/springframework/mock/web/test/MockFilterConfig.java b/spring-web/src/testFixtures/java/org/springframework/web/testfixture/servlet/MockFilterConfig.java similarity index 98% rename from spring-web/src/test/java/org/springframework/mock/web/test/MockFilterConfig.java rename to spring-web/src/testFixtures/java/org/springframework/web/testfixture/servlet/MockFilterConfig.java index 6428466ce53..2cd954986c3 100644 --- a/spring-web/src/test/java/org/springframework/mock/web/test/MockFilterConfig.java +++ b/spring-web/src/testFixtures/java/org/springframework/web/testfixture/servlet/MockFilterConfig.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.mock.web.test; +package org.springframework.web.testfixture.servlet; import java.util.Collections; import java.util.Enumeration; diff --git a/spring-web/src/test/java/org/springframework/mock/web/test/MockHttpServletRequest.java b/spring-web/src/testFixtures/java/org/springframework/web/testfixture/servlet/MockHttpServletRequest.java similarity index 99% rename from spring-web/src/test/java/org/springframework/mock/web/test/MockHttpServletRequest.java rename to spring-web/src/testFixtures/java/org/springframework/web/testfixture/servlet/MockHttpServletRequest.java index d02770268bd..9aaa8589a53 100644 --- a/spring-web/src/test/java/org/springframework/mock/web/test/MockHttpServletRequest.java +++ b/spring-web/src/testFixtures/java/org/springframework/web/testfixture/servlet/MockHttpServletRequest.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.mock.web.test; +package org.springframework.web.testfixture.servlet; import java.io.BufferedReader; import java.io.ByteArrayInputStream; diff --git a/spring-web/src/test/java/org/springframework/mock/web/test/MockHttpServletResponse.java b/spring-web/src/testFixtures/java/org/springframework/web/testfixture/servlet/MockHttpServletResponse.java similarity index 99% rename from spring-web/src/test/java/org/springframework/mock/web/test/MockHttpServletResponse.java rename to spring-web/src/testFixtures/java/org/springframework/web/testfixture/servlet/MockHttpServletResponse.java index 21e24eb0ebd..7f94c2265f2 100644 --- a/spring-web/src/test/java/org/springframework/mock/web/test/MockHttpServletResponse.java +++ b/spring-web/src/testFixtures/java/org/springframework/web/testfixture/servlet/MockHttpServletResponse.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.mock.web.test; +package org.springframework.web.testfixture.servlet; import java.io.ByteArrayOutputStream; import java.io.IOException; diff --git a/spring-web/src/test/java/org/springframework/mock/web/test/MockHttpSession.java b/spring-web/src/testFixtures/java/org/springframework/web/testfixture/servlet/MockHttpSession.java similarity index 99% rename from spring-web/src/test/java/org/springframework/mock/web/test/MockHttpSession.java rename to spring-web/src/testFixtures/java/org/springframework/web/testfixture/servlet/MockHttpSession.java index 01ed9876d6a..b8302c48c57 100644 --- a/spring-web/src/test/java/org/springframework/mock/web/test/MockHttpSession.java +++ b/spring-web/src/testFixtures/java/org/springframework/web/testfixture/servlet/MockHttpSession.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.mock.web.test; +package org.springframework.web.testfixture.servlet; import java.io.Serializable; import java.util.Collections; diff --git a/spring-web/src/test/java/org/springframework/mock/web/test/MockJspWriter.java b/spring-web/src/testFixtures/java/org/springframework/web/testfixture/servlet/MockJspWriter.java similarity index 98% rename from spring-web/src/test/java/org/springframework/mock/web/test/MockJspWriter.java rename to spring-web/src/testFixtures/java/org/springframework/web/testfixture/servlet/MockJspWriter.java index dbc05ecd618..03997d1076b 100644 --- a/spring-web/src/test/java/org/springframework/mock/web/test/MockJspWriter.java +++ b/spring-web/src/testFixtures/java/org/springframework/web/testfixture/servlet/MockJspWriter.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.mock.web.test; +package org.springframework.web.testfixture.servlet; import java.io.IOException; import java.io.PrintWriter; diff --git a/spring-web/src/test/java/org/springframework/mock/web/test/MockMultipartFile.java b/spring-web/src/testFixtures/java/org/springframework/web/testfixture/servlet/MockMultipartFile.java similarity index 98% rename from spring-web/src/test/java/org/springframework/mock/web/test/MockMultipartFile.java rename to spring-web/src/testFixtures/java/org/springframework/web/testfixture/servlet/MockMultipartFile.java index 8813df7e5cb..9250fb076c1 100644 --- a/spring-web/src/test/java/org/springframework/mock/web/test/MockMultipartFile.java +++ b/spring-web/src/testFixtures/java/org/springframework/web/testfixture/servlet/MockMultipartFile.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.mock.web.test; +package org.springframework.web.testfixture.servlet; import java.io.ByteArrayInputStream; import java.io.File; diff --git a/spring-web/src/test/java/org/springframework/mock/web/test/MockMultipartHttpServletRequest.java b/spring-web/src/testFixtures/java/org/springframework/web/testfixture/servlet/MockMultipartHttpServletRequest.java similarity index 98% rename from spring-web/src/test/java/org/springframework/mock/web/test/MockMultipartHttpServletRequest.java rename to spring-web/src/testFixtures/java/org/springframework/web/testfixture/servlet/MockMultipartHttpServletRequest.java index 996f1f56252..88757b539a9 100644 --- a/spring-web/src/test/java/org/springframework/mock/web/test/MockMultipartHttpServletRequest.java +++ b/spring-web/src/testFixtures/java/org/springframework/web/testfixture/servlet/MockMultipartHttpServletRequest.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.mock.web.test; +package org.springframework.web.testfixture.servlet; import java.io.IOException; import java.util.Collections; diff --git a/spring-web/src/test/java/org/springframework/mock/web/test/MockPageContext.java b/spring-web/src/testFixtures/java/org/springframework/web/testfixture/servlet/MockPageContext.java similarity index 99% rename from spring-web/src/test/java/org/springframework/mock/web/test/MockPageContext.java rename to spring-web/src/testFixtures/java/org/springframework/web/testfixture/servlet/MockPageContext.java index 3959db201f4..7ffc2d62631 100644 --- a/spring-web/src/test/java/org/springframework/mock/web/test/MockPageContext.java +++ b/spring-web/src/testFixtures/java/org/springframework/web/testfixture/servlet/MockPageContext.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.mock.web.test; +package org.springframework.web.testfixture.servlet; import java.io.IOException; import java.io.UnsupportedEncodingException; diff --git a/spring-web/src/test/java/org/springframework/mock/web/test/MockPart.java b/spring-web/src/testFixtures/java/org/springframework/web/testfixture/servlet/MockPart.java similarity index 98% rename from spring-web/src/test/java/org/springframework/mock/web/test/MockPart.java rename to spring-web/src/testFixtures/java/org/springframework/web/testfixture/servlet/MockPart.java index 62398ffd801..4079fd69c72 100644 --- a/spring-web/src/test/java/org/springframework/mock/web/test/MockPart.java +++ b/spring-web/src/testFixtures/java/org/springframework/web/testfixture/servlet/MockPart.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.mock.web.test; +package org.springframework.web.testfixture.servlet; import java.io.ByteArrayInputStream; import java.io.IOException; diff --git a/spring-web/src/test/java/org/springframework/mock/web/test/MockRequestDispatcher.java b/spring-web/src/testFixtures/java/org/springframework/web/testfixture/servlet/MockRequestDispatcher.java similarity index 98% rename from spring-web/src/test/java/org/springframework/mock/web/test/MockRequestDispatcher.java rename to spring-web/src/testFixtures/java/org/springframework/web/testfixture/servlet/MockRequestDispatcher.java index df9dd91dcb0..597f1730fff 100644 --- a/spring-web/src/test/java/org/springframework/mock/web/test/MockRequestDispatcher.java +++ b/spring-web/src/testFixtures/java/org/springframework/web/testfixture/servlet/MockRequestDispatcher.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.mock.web.test; +package org.springframework.web.testfixture.servlet; import javax.servlet.RequestDispatcher; import javax.servlet.ServletRequest; diff --git a/spring-web/src/test/java/org/springframework/mock/web/test/MockServletConfig.java b/spring-web/src/testFixtures/java/org/springframework/web/testfixture/servlet/MockServletConfig.java similarity index 98% rename from spring-web/src/test/java/org/springframework/mock/web/test/MockServletConfig.java rename to spring-web/src/testFixtures/java/org/springframework/web/testfixture/servlet/MockServletConfig.java index 6bcec47ae48..81fcc2421db 100644 --- a/spring-web/src/test/java/org/springframework/mock/web/test/MockServletConfig.java +++ b/spring-web/src/testFixtures/java/org/springframework/web/testfixture/servlet/MockServletConfig.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.mock.web.test; +package org.springframework.web.testfixture.servlet; import java.util.Collections; import java.util.Enumeration; diff --git a/spring-web/src/test/java/org/springframework/mock/web/test/MockServletContext.java b/spring-web/src/testFixtures/java/org/springframework/web/testfixture/servlet/MockServletContext.java similarity index 99% rename from spring-web/src/test/java/org/springframework/mock/web/test/MockServletContext.java rename to spring-web/src/testFixtures/java/org/springframework/web/testfixture/servlet/MockServletContext.java index 32fa355b866..b6140042e0c 100644 --- a/spring-web/src/test/java/org/springframework/mock/web/test/MockServletContext.java +++ b/spring-web/src/testFixtures/java/org/springframework/web/testfixture/servlet/MockServletContext.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.mock.web.test; +package org.springframework.web.testfixture.servlet; import java.io.File; import java.io.IOException; diff --git a/spring-web/src/test/java/org/springframework/mock/web/test/MockSessionCookieConfig.java b/spring-web/src/testFixtures/java/org/springframework/web/testfixture/servlet/MockSessionCookieConfig.java similarity index 97% rename from spring-web/src/test/java/org/springframework/mock/web/test/MockSessionCookieConfig.java rename to spring-web/src/testFixtures/java/org/springframework/web/testfixture/servlet/MockSessionCookieConfig.java index 54b9b5bf28b..c7f83450874 100644 --- a/spring-web/src/test/java/org/springframework/mock/web/test/MockSessionCookieConfig.java +++ b/spring-web/src/testFixtures/java/org/springframework/web/testfixture/servlet/MockSessionCookieConfig.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.mock.web.test; +package org.springframework.web.testfixture.servlet; import javax.servlet.SessionCookieConfig; diff --git a/spring-web/src/test/java/org/springframework/mock/web/test/PassThroughFilterChain.java b/spring-web/src/testFixtures/java/org/springframework/web/testfixture/servlet/PassThroughFilterChain.java similarity index 98% rename from spring-web/src/test/java/org/springframework/mock/web/test/PassThroughFilterChain.java rename to spring-web/src/testFixtures/java/org/springframework/web/testfixture/servlet/PassThroughFilterChain.java index c440b785790..e3537156ac5 100644 --- a/spring-web/src/test/java/org/springframework/mock/web/test/PassThroughFilterChain.java +++ b/spring-web/src/testFixtures/java/org/springframework/web/testfixture/servlet/PassThroughFilterChain.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.mock.web.test; +package org.springframework.web.testfixture.servlet; import java.io.IOException; diff --git a/spring-web/src/test/java/org/springframework/http/codec/Pojo.java b/spring-web/src/testFixtures/java/org/springframework/web/testfixture/xml/Pojo.java similarity index 96% rename from spring-web/src/test/java/org/springframework/http/codec/Pojo.java rename to spring-web/src/testFixtures/java/org/springframework/web/testfixture/xml/Pojo.java index 4db33fefbbe..59accabc9a2 100644 --- a/spring-web/src/test/java/org/springframework/http/codec/Pojo.java +++ b/spring-web/src/testFixtures/java/org/springframework/web/testfixture/xml/Pojo.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package org.springframework.http.codec; +package org.springframework.web.testfixture.xml; import javax.xml.bind.annotation.XmlRootElement; diff --git a/spring-web/src/test/resources/org/springframework/http/codec/multipart/foo.txt b/spring-web/src/testFixtures/resources/org/springframework/http/codec/multipart/foo.txt similarity index 100% rename from spring-web/src/test/resources/org/springframework/http/codec/multipart/foo.txt rename to spring-web/src/testFixtures/resources/org/springframework/http/codec/multipart/foo.txt diff --git a/spring-webflux/spring-webflux.gradle b/spring-webflux/spring-webflux.gradle index 3a3fe9487cb..a636d47ad84 100644 --- a/spring-webflux/spring-webflux.gradle +++ b/spring-webflux/spring-webflux.gradle @@ -33,6 +33,7 @@ dependencies { testCompile(project(":kotlin-coroutines")) testCompile(testFixtures(project(":spring-beans"))) testCompile(testFixtures(project(":spring-core"))) + testCompile(testFixtures(project(":spring-web"))) testCompile("javax.xml.bind:jaxb-api") testCompile("com.fasterxml:aalto-xml") testCompile("org.hibernate:hibernate-validator") diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/DispatcherHandlerErrorTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/DispatcherHandlerErrorTests.java index 43d1401e7fe..f90fd6bc681 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/DispatcherHandlerErrorTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/DispatcherHandlerErrorTests.java @@ -33,8 +33,6 @@ import org.springframework.context.annotation.Configuration; import org.springframework.core.codec.CharSequenceEncoder; import org.springframework.http.HttpStatus; import org.springframework.http.codec.EncoderHttpMessageWriter; -import org.springframework.mock.http.server.reactive.test.MockServerHttpRequest; -import org.springframework.mock.web.test.server.MockServerWebExchange; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; @@ -49,6 +47,8 @@ import org.springframework.web.server.ServerWebExchange; import org.springframework.web.server.WebExceptionHandler; import org.springframework.web.server.WebHandler; import org.springframework.web.server.handler.ExceptionHandlingWebHandler; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest; +import org.springframework.web.testfixture.server.MockServerWebExchange; import static org.assertj.core.api.Assertions.assertThat; import static org.springframework.http.MediaType.APPLICATION_JSON; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/DispatcherHandlerTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/DispatcherHandlerTests.java index 30c73409ace..992990f6dca 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/DispatcherHandlerTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/DispatcherHandlerTests.java @@ -28,10 +28,10 @@ import org.springframework.core.MethodParameter; import org.springframework.core.Ordered; import org.springframework.core.io.buffer.DataBuffer; import org.springframework.core.io.buffer.DefaultDataBufferFactory; -import org.springframework.mock.http.server.reactive.test.MockServerHttpRequest; -import org.springframework.mock.web.test.server.MockServerWebExchange; -import org.springframework.web.method.ResolvableMethod; import org.springframework.web.server.ServerWebExchange; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest; +import org.springframework.web.testfixture.method.ResolvableMethod; +import org.springframework.web.testfixture.server.MockServerWebExchange; import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.ArgumentMatchers.any; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/FlushingIntegrationTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/FlushingIntegrationTests.java index 62fe229976a..66143e4f2f7 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/FlushingIntegrationTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/FlushingIntegrationTests.java @@ -24,12 +24,12 @@ import reactor.core.publisher.Mono; import reactor.test.StepVerifier; import org.springframework.core.io.buffer.DataBuffer; -import org.springframework.http.server.reactive.AbstractHttpHandlerIntegrationTests; import org.springframework.http.server.reactive.HttpHandler; import org.springframework.http.server.reactive.ServerHttpRequest; import org.springframework.http.server.reactive.ServerHttpResponse; -import org.springframework.http.server.reactive.bootstrap.HttpServer; import org.springframework.web.reactive.function.client.WebClient; +import org.springframework.web.testfixture.http.server.reactive.bootstrap.AbstractHttpHandlerIntegrationTests; +import org.springframework.web.testfixture.http.server.reactive.bootstrap.HttpServer; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/accept/HeaderContentTypeResolverTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/accept/HeaderContentTypeResolverTests.java index 8f96d37b3e2..8c2a104e8a8 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/accept/HeaderContentTypeResolverTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/accept/HeaderContentTypeResolverTests.java @@ -21,9 +21,9 @@ import java.util.List; import org.junit.jupiter.api.Test; import org.springframework.http.MediaType; -import org.springframework.mock.http.server.reactive.test.MockServerHttpRequest; -import org.springframework.mock.web.test.server.MockServerWebExchange; import org.springframework.web.server.NotAcceptableStatusException; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest; +import org.springframework.web.testfixture.server.MockServerWebExchange; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/accept/ParameterContentTypeResolverTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/accept/ParameterContentTypeResolverTests.java index b7fcd474c7b..70f8a8e7741 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/accept/ParameterContentTypeResolverTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/accept/ParameterContentTypeResolverTests.java @@ -22,10 +22,10 @@ import java.util.Map; import org.junit.jupiter.api.Test; import org.springframework.http.MediaType; -import org.springframework.mock.http.server.reactive.test.MockServerHttpRequest; -import org.springframework.mock.web.test.server.MockServerWebExchange; import org.springframework.web.server.NotAcceptableStatusException; import org.springframework.web.server.ServerWebExchange; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest; +import org.springframework.web.testfixture.server.MockServerWebExchange; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/accept/RequestedContentTypeResolverBuilderTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/accept/RequestedContentTypeResolverBuilderTests.java index dd324411064..2020bc23686 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/accept/RequestedContentTypeResolverBuilderTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/accept/RequestedContentTypeResolverBuilderTests.java @@ -21,8 +21,8 @@ import java.util.List; import org.junit.jupiter.api.Test; import org.springframework.http.MediaType; -import org.springframework.mock.http.server.reactive.test.MockServerHttpRequest; -import org.springframework.mock.web.test.server.MockServerWebExchange; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest; +import org.springframework.web.testfixture.server.MockServerWebExchange; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/config/ResourceHandlerRegistryTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/config/ResourceHandlerRegistryTests.java index 5ec569118c9..4129b8b90e6 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/config/ResourceHandlerRegistryTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/config/ResourceHandlerRegistryTests.java @@ -31,8 +31,6 @@ import org.springframework.context.support.GenericApplicationContext; import org.springframework.core.testfixture.io.buffer.DataBufferTestUtils; import org.springframework.http.CacheControl; import org.springframework.http.server.PathContainer; -import org.springframework.mock.http.server.reactive.test.MockServerHttpRequest; -import org.springframework.mock.web.test.server.MockServerWebExchange; import org.springframework.web.reactive.HandlerMapping; import org.springframework.web.reactive.handler.SimpleUrlHandlerMapping; import org.springframework.web.reactive.resource.AppCacheManifestTransformer; @@ -47,6 +45,8 @@ import org.springframework.web.reactive.resource.ResourceUrlProvider; import org.springframework.web.reactive.resource.ResourceWebHandler; import org.springframework.web.reactive.resource.VersionResourceResolver; import org.springframework.web.reactive.resource.WebJarsResourceResolver; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest; +import org.springframework.web.testfixture.server.MockServerWebExchange; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/config/WebFluxConfigurationSupportTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/config/WebFluxConfigurationSupportTests.java index 8a6e77ae0f9..5956a9391d4 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/config/WebFluxConfigurationSupportTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/config/WebFluxConfigurationSupportTests.java @@ -45,7 +45,6 @@ import org.springframework.http.codec.ServerCodecConfigurer; import org.springframework.http.codec.json.Jackson2JsonEncoder; import org.springframework.http.codec.xml.Jaxb2XmlDecoder; import org.springframework.http.codec.xml.Jaxb2XmlEncoder; -import org.springframework.mock.web.test.server.MockServerWebExchange; import org.springframework.util.MimeType; import org.springframework.util.MimeTypeUtils; import org.springframework.util.MultiValueMap; @@ -75,6 +74,7 @@ import org.springframework.web.reactive.result.view.freemarker.FreeMarkerConfigu import org.springframework.web.reactive.result.view.freemarker.FreeMarkerViewResolver; import org.springframework.web.server.ServerWebExchange; import org.springframework.web.server.WebHandler; +import org.springframework.web.testfixture.server.MockServerWebExchange; import org.springframework.web.util.pattern.PathPatternParser; import static org.assertj.core.api.Assertions.assertThat; @@ -87,7 +87,7 @@ import static org.springframework.http.MediaType.APPLICATION_OCTET_STREAM; import static org.springframework.http.MediaType.APPLICATION_XML; import static org.springframework.http.MediaType.IMAGE_PNG; import static org.springframework.http.MediaType.TEXT_PLAIN; -import static org.springframework.mock.http.server.reactive.test.MockServerHttpRequest.get; +import static org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest.get; /** * Unit tests for {@link WebFluxConfigurationSupport}. diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/function/BodyExtractorsTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/function/BodyExtractorsTests.java index fa5944a9188..55aa6302ffd 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/function/BodyExtractorsTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/function/BodyExtractorsTests.java @@ -59,9 +59,9 @@ import org.springframework.http.codec.multipart.SynchronossPartHttpMessageReader import org.springframework.http.codec.xml.Jaxb2XmlDecoder; import org.springframework.http.server.reactive.ServerHttpRequest; import org.springframework.http.server.reactive.ServerHttpResponse; -import org.springframework.mock.http.client.reactive.test.MockClientHttpResponse; -import org.springframework.mock.http.server.reactive.test.MockServerHttpRequest; import org.springframework.util.MultiValueMap; +import org.springframework.web.testfixture.http.client.reactive.MockClientHttpResponse; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/function/BodyInsertersTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/function/BodyInsertersTests.java index a74864d7659..11141262083 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/function/BodyInsertersTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/function/BodyInsertersTests.java @@ -61,11 +61,11 @@ import org.springframework.http.codec.multipart.MultipartHttpMessageWriter; import org.springframework.http.codec.xml.Jaxb2XmlEncoder; import org.springframework.http.server.reactive.ServerHttpRequest; import org.springframework.http.server.reactive.ServerHttpResponse; -import org.springframework.mock.http.client.reactive.test.MockClientHttpRequest; -import org.springframework.mock.http.server.reactive.test.MockServerHttpRequest; -import org.springframework.mock.http.server.reactive.test.MockServerHttpResponse; import org.springframework.util.LinkedMultiValueMap; import org.springframework.util.MultiValueMap; +import org.springframework.web.testfixture.http.client.reactive.MockClientHttpRequest; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpResponse; import static java.nio.charset.StandardCharsets.UTF_8; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/function/MultipartIntegrationTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/function/MultipartIntegrationTests.java index afabb433acc..7ce6e021afc 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/function/MultipartIntegrationTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/function/MultipartIntegrationTests.java @@ -32,7 +32,6 @@ import org.springframework.http.client.MultipartBodyBuilder; import org.springframework.http.codec.multipart.FilePart; import org.springframework.http.codec.multipart.FormFieldPart; import org.springframework.http.codec.multipart.Part; -import org.springframework.http.server.reactive.bootstrap.HttpServer; import org.springframework.util.FileCopyUtils; import org.springframework.util.MultiValueMap; import org.springframework.web.reactive.function.client.ClientResponse; @@ -41,6 +40,7 @@ import org.springframework.web.reactive.function.server.AbstractRouterFunctionIn import org.springframework.web.reactive.function.server.RouterFunction; import org.springframework.web.reactive.function.server.ServerRequest; import org.springframework.web.reactive.function.server.ServerResponse; +import org.springframework.web.testfixture.http.server.reactive.bootstrap.HttpServer; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.fail; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/function/client/DefaultClientRequestBuilderTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/function/client/DefaultClientRequestBuilderTests.java index f01f37c8997..c9bef9b638c 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/function/client/DefaultClientRequestBuilderTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/function/client/DefaultClientRequestBuilderTests.java @@ -33,8 +33,8 @@ import org.springframework.core.io.buffer.DefaultDataBufferFactory; import org.springframework.http.client.reactive.ClientHttpRequest; import org.springframework.http.codec.EncoderHttpMessageWriter; import org.springframework.http.codec.HttpMessageWriter; -import org.springframework.mock.http.client.reactive.test.MockClientHttpRequest; import org.springframework.web.reactive.function.BodyInserter; +import org.springframework.web.testfixture.http.client.reactive.MockClientHttpRequest; import static java.nio.charset.StandardCharsets.UTF_8; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/function/client/WebClientIntegrationTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/function/client/WebClientIntegrationTests.java index dfe54d29dc8..659004be489 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/function/client/WebClientIntegrationTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/function/client/WebClientIntegrationTests.java @@ -58,7 +58,7 @@ import org.springframework.http.ResponseEntity; import org.springframework.http.client.reactive.ClientHttpConnector; import org.springframework.http.client.reactive.JettyClientHttpConnector; import org.springframework.http.client.reactive.ReactorClientHttpConnector; -import org.springframework.http.codec.Pojo; +import org.springframework.web.testfixture.xml.Pojo; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/function/server/AbstractRouterFunctionIntegrationTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/function/server/AbstractRouterFunctionIntegrationTests.java index 64dcaa8ed73..91e76516e97 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/function/server/AbstractRouterFunctionIntegrationTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/function/server/AbstractRouterFunctionIntegrationTests.java @@ -16,8 +16,8 @@ package org.springframework.web.reactive.function.server; -import org.springframework.http.server.reactive.AbstractHttpHandlerIntegrationTests; import org.springframework.http.server.reactive.HttpHandler; +import org.springframework.web.testfixture.http.server.reactive.bootstrap.AbstractHttpHandlerIntegrationTests; /** * @author Arjen Poutsma diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/function/server/DefaultEntityResponseBuilderTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/function/server/DefaultEntityResponseBuilderTests.java index e6aafd795df..96ad5cc5cdd 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/function/server/DefaultEntityResponseBuilderTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/function/server/DefaultEntityResponseBuilderTests.java @@ -41,12 +41,12 @@ import org.springframework.http.MediaType; import org.springframework.http.ResponseCookie; import org.springframework.http.codec.EncoderHttpMessageWriter; import org.springframework.http.codec.HttpMessageWriter; -import org.springframework.mock.http.server.reactive.test.MockServerHttpRequest; -import org.springframework.mock.http.server.reactive.test.MockServerHttpResponse; -import org.springframework.mock.web.test.server.MockServerWebExchange; import org.springframework.util.LinkedMultiValueMap; import org.springframework.util.MultiValueMap; import org.springframework.web.reactive.result.view.ViewResolver; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpResponse; +import org.springframework.web.testfixture.server.MockServerWebExchange; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/function/server/DefaultRenderingResponseTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/function/server/DefaultRenderingResponseTests.java index 46a57bb063d..95952c55f3a 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/function/server/DefaultRenderingResponseTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/function/server/DefaultRenderingResponseTests.java @@ -34,9 +34,6 @@ import org.springframework.http.HttpHeaders; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseCookie; -import org.springframework.mock.http.server.reactive.test.MockServerHttpRequest; -import org.springframework.mock.http.server.reactive.test.MockServerHttpResponse; -import org.springframework.mock.web.test.server.MockServerWebExchange; import org.springframework.util.LinkedMultiValueMap; import org.springframework.util.MultiValueMap; import org.springframework.web.reactive.result.view.AbstractView; @@ -44,6 +41,9 @@ import org.springframework.web.reactive.result.view.View; import org.springframework.web.reactive.result.view.ViewResolver; import org.springframework.web.reactive.result.view.ViewResolverSupport; import org.springframework.web.server.ServerWebExchange; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpResponse; +import org.springframework.web.testfixture.server.MockServerWebExchange; import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.ArgumentMatchers.any; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/function/server/DefaultServerRequestBuilderTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/function/server/DefaultServerRequestBuilderTests.java index ee85f887207..8e4f483d598 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/function/server/DefaultServerRequestBuilderTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/function/server/DefaultServerRequestBuilderTests.java @@ -27,8 +27,8 @@ import org.springframework.core.io.buffer.DataBufferFactory; import org.springframework.core.io.buffer.DefaultDataBufferFactory; import org.springframework.http.HttpMethod; import org.springframework.http.ResponseCookie; -import org.springframework.mock.http.server.reactive.test.MockServerHttpRequest; -import org.springframework.mock.web.test.server.MockServerWebExchange; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest; +import org.springframework.web.testfixture.server.MockServerWebExchange; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/function/server/DefaultServerRequestTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/function/server/DefaultServerRequestTests.java index 87feefb06df..b4e17cca692 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/function/server/DefaultServerRequestTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/function/server/DefaultServerRequestTests.java @@ -49,12 +49,12 @@ import org.springframework.http.codec.HttpMessageReader; import org.springframework.http.codec.json.Jackson2JsonDecoder; import org.springframework.http.codec.multipart.FormFieldPart; import org.springframework.http.codec.multipart.Part; -import org.springframework.mock.http.server.reactive.test.MockServerHttpRequest; -import org.springframework.mock.web.test.server.MockServerWebExchange; import org.springframework.util.LinkedMultiValueMap; import org.springframework.util.MultiValueMap; import org.springframework.web.server.ServerWebInputException; import org.springframework.web.server.UnsupportedMediaTypeStatusException; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest; +import org.springframework.web.testfixture.server.MockServerWebExchange; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/function/server/DefaultServerResponseBuilderTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/function/server/DefaultServerResponseBuilderTests.java index d687a29f8ca..38b295463ca 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/function/server/DefaultServerResponseBuilderTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/function/server/DefaultServerResponseBuilderTests.java @@ -36,12 +36,12 @@ import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseCookie; import org.springframework.http.codec.HttpMessageWriter; -import org.springframework.mock.http.server.reactive.test.MockServerHttpRequest; -import org.springframework.mock.http.server.reactive.test.MockServerHttpResponse; -import org.springframework.mock.web.test.server.MockServerWebExchange; import org.springframework.util.LinkedMultiValueMap; import org.springframework.util.MultiValueMap; import org.springframework.web.reactive.result.view.ViewResolver; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpResponse; +import org.springframework.web.testfixture.server.MockServerWebExchange; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/function/server/DispatcherHandlerIntegrationTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/function/server/DispatcherHandlerIntegrationTests.java index 25dd8a2b277..3bc9716124a 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/function/server/DispatcherHandlerIntegrationTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/function/server/DispatcherHandlerIntegrationTests.java @@ -29,9 +29,7 @@ import org.springframework.core.ParameterizedTypeReference; import org.springframework.http.HttpMethod; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; -import org.springframework.http.server.reactive.AbstractHttpHandlerIntegrationTests; import org.springframework.http.server.reactive.HttpHandler; -import org.springframework.http.server.reactive.bootstrap.HttpServer; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; @@ -40,6 +38,8 @@ import org.springframework.web.reactive.DispatcherHandler; import org.springframework.web.reactive.HandlerMapping; import org.springframework.web.reactive.config.EnableWebFlux; import org.springframework.web.server.adapter.WebHttpHandlerBuilder; +import org.springframework.web.testfixture.http.server.reactive.bootstrap.AbstractHttpHandlerIntegrationTests; +import org.springframework.web.testfixture.http.server.reactive.bootstrap.HttpServer; import org.springframework.web.util.pattern.PathPattern; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/function/server/InvalidHttpMethodIntegrationTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/function/server/InvalidHttpMethodIntegrationTests.java index 764792ab228..f7bdf6e3f52 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/function/server/InvalidHttpMethodIntegrationTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/function/server/InvalidHttpMethodIntegrationTests.java @@ -20,7 +20,7 @@ import okhttp3.OkHttpClient; import okhttp3.Request; import okhttp3.Response; -import org.springframework.http.server.reactive.bootstrap.HttpServer; +import org.springframework.web.testfixture.http.server.reactive.bootstrap.HttpServer; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/function/server/LocaleContextResolverIntegrationTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/function/server/LocaleContextResolverIntegrationTests.java index e5a229a9f7b..efc8cf8c1e2 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/function/server/LocaleContextResolverIntegrationTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/function/server/LocaleContextResolverIntegrationTests.java @@ -26,7 +26,6 @@ import reactor.test.StepVerifier; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; -import org.springframework.http.server.reactive.bootstrap.HttpServer; import org.springframework.lang.Nullable; import org.springframework.web.reactive.function.client.ClientResponse; import org.springframework.web.reactive.function.client.WebClient; @@ -34,6 +33,7 @@ import org.springframework.web.reactive.result.view.View; import org.springframework.web.reactive.result.view.ViewResolver; import org.springframework.web.server.ServerWebExchange; import org.springframework.web.server.i18n.FixedLocaleContextResolver; +import org.springframework.web.testfixture.http.server.reactive.bootstrap.HttpServer; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/function/server/NestedRouteIntegrationTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/function/server/NestedRouteIntegrationTests.java index ca13675bb5e..bab05a7a128 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/function/server/NestedRouteIntegrationTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/function/server/NestedRouteIntegrationTests.java @@ -24,9 +24,9 @@ import reactor.core.publisher.Mono; import org.springframework.http.HttpMethod; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; -import org.springframework.http.server.reactive.bootstrap.HttpServer; import org.springframework.lang.Nullable; import org.springframework.web.client.RestTemplate; +import org.springframework.web.testfixture.http.server.reactive.bootstrap.HttpServer; import org.springframework.web.util.pattern.PathPattern; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/function/server/PublisherHandlerFunctionIntegrationTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/function/server/PublisherHandlerFunctionIntegrationTests.java index c20054bbeb6..b34685ea563 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/function/server/PublisherHandlerFunctionIntegrationTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/function/server/PublisherHandlerFunctionIntegrationTests.java @@ -27,8 +27,8 @@ import org.springframework.http.HttpMethod; import org.springframework.http.HttpStatus; import org.springframework.http.RequestEntity; import org.springframework.http.ResponseEntity; -import org.springframework.http.server.reactive.bootstrap.HttpServer; import org.springframework.web.client.RestTemplate; +import org.springframework.web.testfixture.http.server.reactive.bootstrap.HttpServer; import static org.assertj.core.api.Assertions.assertThat; import static org.springframework.web.reactive.function.BodyExtractors.toMono; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/function/server/RenderingResponseIntegrationTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/function/server/RenderingResponseIntegrationTests.java index 6cf0a7baefd..1e8819afd77 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/function/server/RenderingResponseIntegrationTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/function/server/RenderingResponseIntegrationTests.java @@ -30,12 +30,12 @@ import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframework.http.server.reactive.ServerHttpResponse; -import org.springframework.http.server.reactive.bootstrap.HttpServer; import org.springframework.lang.Nullable; import org.springframework.web.client.RestTemplate; import org.springframework.web.reactive.result.view.View; import org.springframework.web.reactive.result.view.ViewResolver; import org.springframework.web.server.ServerWebExchange; +import org.springframework.web.testfixture.http.server.reactive.bootstrap.HttpServer; import static org.assertj.core.api.Assertions.assertThat; import static org.springframework.web.reactive.function.server.HandlerFilterFunction.ofResponseProcessor; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/function/server/RequestPredicateAttributesTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/function/server/RequestPredicateAttributesTests.java index 2eaeaf3c90d..f20e3678a4a 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/function/server/RequestPredicateAttributesTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/function/server/RequestPredicateAttributesTests.java @@ -23,8 +23,8 @@ import org.junit.jupiter.api.Test; import org.springframework.core.codec.StringDecoder; import org.springframework.http.codec.DecoderHttpMessageReader; -import org.springframework.mock.http.server.reactive.test.MockServerHttpRequest; -import org.springframework.mock.web.test.server.MockServerWebExchange; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest; +import org.springframework.web.testfixture.server.MockServerWebExchange; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/function/server/ResourceHandlerFunctionTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/function/server/ResourceHandlerFunctionTests.java index 9b05431dbdc..1c60b8a5ad1 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/function/server/ResourceHandlerFunctionTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/function/server/ResourceHandlerFunctionTests.java @@ -32,10 +32,10 @@ import org.springframework.http.HttpMethod; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.codec.HttpMessageWriter; -import org.springframework.mock.http.server.reactive.test.MockServerHttpRequest; -import org.springframework.mock.http.server.reactive.test.MockServerHttpResponse; -import org.springframework.mock.web.test.server.MockServerWebExchange; import org.springframework.web.reactive.result.view.ViewResolver; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpResponse; +import org.springframework.web.testfixture.server.MockServerWebExchange; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/function/server/RouterFunctionsTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/function/server/RouterFunctionsTests.java index be24c7d642a..57919dece4a 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/function/server/RouterFunctionsTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/function/server/RouterFunctionsTests.java @@ -27,14 +27,14 @@ import org.springframework.http.HttpHeaders; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseCookie; import org.springframework.http.server.reactive.HttpHandler; -import org.springframework.mock.http.server.reactive.test.MockServerHttpRequest; -import org.springframework.mock.http.server.reactive.test.MockServerHttpResponse; import org.springframework.util.LinkedMultiValueMap; import org.springframework.util.MultiValueMap; import org.springframework.web.server.ResponseStatusException; import org.springframework.web.server.ServerWebExchange; import org.springframework.web.server.WebFilter; import org.springframework.web.server.WebFilterChain; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpResponse; import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.BDDMockito.given; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/function/server/SseHandlerFunctionIntegrationTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/function/server/SseHandlerFunctionIntegrationTests.java index 92d51cd7644..9db4f97db40 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/function/server/SseHandlerFunctionIntegrationTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/function/server/SseHandlerFunctionIntegrationTests.java @@ -25,8 +25,8 @@ import reactor.test.StepVerifier; import org.springframework.core.ParameterizedTypeReference; import org.springframework.http.MediaType; import org.springframework.http.codec.ServerSentEvent; -import org.springframework.http.server.reactive.bootstrap.HttpServer; import org.springframework.web.reactive.function.client.WebClient; +import org.springframework.web.testfixture.http.server.reactive.bootstrap.HttpServer; import static org.assertj.core.api.Assertions.assertThat; import static org.springframework.http.MediaType.TEXT_EVENT_STREAM; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/function/server/support/DispatcherHandlerIntegrationTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/function/server/support/DispatcherHandlerIntegrationTests.java index 6276697abd4..4d5b0140465 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/function/server/support/DispatcherHandlerIntegrationTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/function/server/support/DispatcherHandlerIntegrationTests.java @@ -23,9 +23,7 @@ import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; -import org.springframework.http.server.reactive.AbstractHttpHandlerIntegrationTests; import org.springframework.http.server.reactive.HttpHandler; -import org.springframework.http.server.reactive.bootstrap.HttpServer; import org.springframework.web.client.RestTemplate; import org.springframework.web.reactive.DispatcherHandler; import org.springframework.web.reactive.config.EnableWebFlux; @@ -33,6 +31,8 @@ import org.springframework.web.reactive.function.server.RouterFunction; import org.springframework.web.reactive.function.server.ServerRequest; import org.springframework.web.reactive.function.server.ServerResponse; import org.springframework.web.server.adapter.WebHttpHandlerBuilder; +import org.springframework.web.testfixture.http.server.reactive.bootstrap.AbstractHttpHandlerIntegrationTests; +import org.springframework.web.testfixture.http.server.reactive.bootstrap.HttpServer; import static org.assertj.core.api.Assertions.assertThat; import static org.springframework.web.reactive.function.server.RequestPredicates.accept; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/function/server/support/RouterFunctionMappingTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/function/server/support/RouterFunctionMappingTests.java index 88748cc50c7..4daa40f150c 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/function/server/support/RouterFunctionMappingTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/function/server/support/RouterFunctionMappingTests.java @@ -21,12 +21,12 @@ import reactor.core.publisher.Mono; import reactor.test.StepVerifier; import org.springframework.http.codec.ServerCodecConfigurer; -import org.springframework.mock.http.server.reactive.test.MockServerHttpRequest; -import org.springframework.mock.web.test.server.MockServerWebExchange; import org.springframework.web.reactive.function.server.HandlerFunction; import org.springframework.web.reactive.function.server.RouterFunction; import org.springframework.web.reactive.function.server.ServerResponse; import org.springframework.web.server.ServerWebExchange; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest; +import org.springframework.web.testfixture.server.MockServerWebExchange; /** * @author Arjen Poutsma diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/handler/CorsUrlHandlerMappingTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/handler/CorsUrlHandlerMappingTests.java index 652c78dfb8a..b9385f0b9ce 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/handler/CorsUrlHandlerMappingTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/handler/CorsUrlHandlerMappingTests.java @@ -22,11 +22,11 @@ import org.junit.jupiter.api.Test; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpMethod; -import org.springframework.mock.http.server.reactive.test.MockServerHttpRequest; -import org.springframework.mock.web.test.server.MockServerWebExchange; import org.springframework.web.cors.CorsConfiguration; import org.springframework.web.cors.reactive.CorsConfigurationSource; import org.springframework.web.server.ServerWebExchange; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest; +import org.springframework.web.testfixture.server.MockServerWebExchange; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/handler/SimpleUrlHandlerMappingTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/handler/SimpleUrlHandlerMappingTests.java index 73d80b7c432..38dbf17e417 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/handler/SimpleUrlHandlerMappingTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/handler/SimpleUrlHandlerMappingTests.java @@ -26,10 +26,10 @@ import org.springframework.context.annotation.Configuration; import org.springframework.context.support.ClassPathXmlApplicationContext; import org.springframework.http.HttpMethod; import org.springframework.http.server.PathContainer; -import org.springframework.mock.http.server.reactive.test.MockServerHttpRequest; -import org.springframework.mock.web.test.server.MockServerWebExchange; import org.springframework.web.reactive.HandlerMapping; import org.springframework.web.server.ServerWebExchange; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest; +import org.springframework.web.testfixture.server.MockServerWebExchange; import static org.assertj.core.api.Assertions.assertThat; import static org.springframework.web.reactive.HandlerMapping.PATH_WITHIN_HANDLER_MAPPING_ATTRIBUTE; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/handler/WebFluxResponseStatusExceptionHandlerTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/handler/WebFluxResponseStatusExceptionHandlerTests.java index 064a4d1eb64..6da2116256b 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/handler/WebFluxResponseStatusExceptionHandlerTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/handler/WebFluxResponseStatusExceptionHandlerTests.java @@ -23,7 +23,7 @@ import org.junit.jupiter.api.Test; import org.springframework.http.HttpStatus; import org.springframework.web.bind.annotation.ResponseStatus; import org.springframework.web.server.handler.ResponseStatusExceptionHandler; -import org.springframework.web.server.handler.ResponseStatusExceptionHandlerTests; +import org.springframework.web.testfixture.server.handler.AbstractResponseStatusExceptionHandlerTests; import static org.assertj.core.api.Assertions.assertThat; @@ -33,7 +33,7 @@ import static org.assertj.core.api.Assertions.assertThat; * @author Juergen Hoeller * @author Rossen Stoyanchev */ -public class WebFluxResponseStatusExceptionHandlerTests extends ResponseStatusExceptionHandlerTests { +public class WebFluxResponseStatusExceptionHandlerTests extends AbstractResponseStatusExceptionHandlerTests { @Override protected ResponseStatusExceptionHandler createResponseStatusExceptionHandler() { diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/resource/AppCacheManifestTransformerTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/resource/AppCacheManifestTransformerTests.java index 3856014728b..d58f0fb81cb 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/resource/AppCacheManifestTransformerTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/resource/AppCacheManifestTransformerTests.java @@ -26,11 +26,11 @@ import org.junit.jupiter.api.Test; import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.Resource; -import org.springframework.mock.web.test.server.MockServerWebExchange; import org.springframework.util.FileCopyUtils; +import org.springframework.web.testfixture.server.MockServerWebExchange; import static org.assertj.core.api.Assertions.assertThat; -import static org.springframework.mock.http.server.reactive.test.MockServerHttpRequest.get; +import static org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest.get; /** * Unit tests for {@link AppCacheManifestTransformer}. diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/resource/CachingResourceResolverTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/resource/CachingResourceResolverTests.java index 84d5c5a12cf..193c9223734 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/resource/CachingResourceResolverTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/resource/CachingResourceResolverTests.java @@ -30,11 +30,11 @@ import org.springframework.cache.Cache; import org.springframework.cache.concurrent.ConcurrentMapCache; import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.Resource; -import org.springframework.mock.web.test.server.MockServerWebExchange; import org.springframework.web.reactive.resource.GzipSupport.GzippedFiles; +import org.springframework.web.testfixture.server.MockServerWebExchange; import static org.assertj.core.api.Assertions.assertThat; -import static org.springframework.mock.http.server.reactive.test.MockServerHttpRequest.get; +import static org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest.get; /** * Unit tests for {@link CachingResourceResolver}. diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/resource/CssLinkResourceTransformerTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/resource/CssLinkResourceTransformerTests.java index d3584775452..1217658507b 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/resource/CssLinkResourceTransformerTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/resource/CssLinkResourceTransformerTests.java @@ -29,13 +29,13 @@ import reactor.test.StepVerifier; import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.Resource; -import org.springframework.mock.web.test.server.MockServerWebExchange; import org.springframework.util.StringUtils; import org.springframework.web.reactive.resource.EncodedResourceResolver.EncodedResource; import org.springframework.web.reactive.resource.GzipSupport.GzippedFiles; +import org.springframework.web.testfixture.server.MockServerWebExchange; import static org.assertj.core.api.Assertions.assertThat; -import static org.springframework.mock.http.server.reactive.test.MockServerHttpRequest.get; +import static org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest.get; /** * Unit tests for {@link CssLinkResourceTransformer}. diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/resource/EncodedResourceResolverTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/resource/EncodedResourceResolverTests.java index 24d680e6e9b..2d9e084eeeb 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/resource/EncodedResourceResolverTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/resource/EncodedResourceResolverTests.java @@ -30,9 +30,9 @@ import org.springframework.cache.concurrent.ConcurrentMapCache; import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.Resource; import org.springframework.http.HttpHeaders; -import org.springframework.mock.http.server.reactive.test.MockServerHttpRequest; -import org.springframework.mock.web.test.server.MockServerWebExchange; import org.springframework.web.reactive.resource.GzipSupport.GzippedFiles; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest; +import org.springframework.web.testfixture.server.MockServerWebExchange; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/resource/ResourceTransformerSupportTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/resource/ResourceTransformerSupportTests.java index cafb3afb4a8..419e3c7f00d 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/resource/ResourceTransformerSupportTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/resource/ResourceTransformerSupportTests.java @@ -27,9 +27,9 @@ import reactor.core.publisher.Mono; import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.Resource; -import org.springframework.mock.http.server.reactive.test.MockServerHttpRequest; -import org.springframework.mock.web.test.server.MockServerWebExchange; import org.springframework.web.server.ServerWebExchange; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest; +import org.springframework.web.testfixture.server.MockServerWebExchange; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/resource/ResourceUrlProviderTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/resource/ResourceUrlProviderTests.java index 1d8ce77d445..45dbdcc1b0e 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/resource/ResourceUrlProviderTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/resource/ResourceUrlProviderTests.java @@ -31,14 +31,14 @@ import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.Resource; -import org.springframework.mock.web.test.MockServletContext; -import org.springframework.mock.web.test.server.MockServerWebExchange; import org.springframework.web.context.support.AnnotationConfigWebApplicationContext; import org.springframework.web.reactive.handler.SimpleUrlHandlerMapping; +import org.springframework.web.testfixture.server.MockServerWebExchange; +import org.springframework.web.testfixture.servlet.MockServletContext; import org.springframework.web.util.pattern.PathPattern; import static org.assertj.core.api.Assertions.assertThat; -import static org.springframework.mock.http.server.reactive.test.MockServerHttpRequest.get; +import static org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest.get; /** * Unit tests for {@link ResourceUrlProvider}. diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/resource/ResourceWebHandlerTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/resource/ResourceWebHandlerTests.java index f057b690661..34c46c7e1a3 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/resource/ResourceWebHandlerTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/resource/ResourceWebHandlerTests.java @@ -46,14 +46,14 @@ import org.springframework.http.HttpMethod; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.server.PathContainer; -import org.springframework.mock.http.server.reactive.test.MockServerHttpRequest; -import org.springframework.mock.http.server.reactive.test.MockServerHttpResponse; -import org.springframework.mock.web.test.server.MockServerWebExchange; import org.springframework.util.StringUtils; import org.springframework.web.reactive.HandlerMapping; import org.springframework.web.server.MethodNotAllowedException; import org.springframework.web.server.ResponseStatusException; import org.springframework.web.server.ServerWebExchange; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpResponse; +import org.springframework.web.testfixture.server.MockServerWebExchange; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/resource/VersionResourceResolverTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/resource/VersionResourceResolverTests.java index 3d9e97be95d..4467fa42fd0 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/resource/VersionResourceResolverTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/resource/VersionResourceResolverTests.java @@ -29,9 +29,9 @@ import reactor.core.publisher.Mono; import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.Resource; -import org.springframework.mock.http.server.reactive.test.MockServerHttpRequest; -import org.springframework.mock.web.test.server.MockServerWebExchange; import org.springframework.web.server.ServerWebExchange; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest; +import org.springframework.web.testfixture.server.MockServerWebExchange; import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.BDDMockito.given; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/resource/WebJarsResourceResolverTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/resource/WebJarsResourceResolverTests.java index b78bcc4ec0f..b3092b989f3 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/resource/WebJarsResourceResolverTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/resource/WebJarsResourceResolverTests.java @@ -25,9 +25,9 @@ import reactor.core.publisher.Mono; import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.Resource; -import org.springframework.mock.http.server.reactive.test.MockServerHttpRequest; -import org.springframework.mock.web.test.server.MockServerWebExchange; import org.springframework.web.server.ServerWebExchange; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest; +import org.springframework.web.testfixture.server.MockServerWebExchange; import static java.util.Collections.singletonList; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/HandlerResultHandlerTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/HandlerResultHandlerTests.java index 28c3522088f..19c822c46e3 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/HandlerResultHandlerTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/HandlerResultHandlerTests.java @@ -24,12 +24,12 @@ import org.junit.jupiter.api.Test; import org.springframework.core.ReactiveAdapterRegistry; import org.springframework.http.MediaType; -import org.springframework.mock.http.server.reactive.test.MockServerHttpRequest; -import org.springframework.mock.web.test.server.MockServerWebExchange; import org.springframework.web.reactive.HandlerMapping; import org.springframework.web.reactive.accept.FixedContentTypeResolver; import org.springframework.web.reactive.accept.HeaderContentTypeResolver; import org.springframework.web.reactive.accept.RequestedContentTypeResolver; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest; +import org.springframework.web.testfixture.server.MockServerWebExchange; import static org.assertj.core.api.Assertions.assertThat; import static org.springframework.http.MediaType.ALL; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/SimpleUrlHandlerMappingIntegrationTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/SimpleUrlHandlerMappingIntegrationTests.java index f5d489f2e14..7d869abdb5f 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/SimpleUrlHandlerMappingIntegrationTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/SimpleUrlHandlerMappingIntegrationTests.java @@ -33,9 +33,7 @@ import org.springframework.core.io.buffer.DefaultDataBufferFactory; import org.springframework.http.HttpStatus; import org.springframework.http.RequestEntity; import org.springframework.http.ResponseEntity; -import org.springframework.http.server.reactive.AbstractHttpHandlerIntegrationTests; import org.springframework.http.server.reactive.HttpHandler; -import org.springframework.http.server.reactive.bootstrap.HttpServer; import org.springframework.web.client.HttpClientErrorException; import org.springframework.web.client.RestTemplate; import org.springframework.web.reactive.DispatcherHandler; @@ -43,6 +41,8 @@ import org.springframework.web.reactive.handler.SimpleUrlHandlerMapping; import org.springframework.web.server.WebHandler; import org.springframework.web.server.adapter.WebHttpHandlerBuilder; import org.springframework.web.server.handler.ResponseStatusExceptionHandler; +import org.springframework.web.testfixture.http.server.reactive.bootstrap.AbstractHttpHandlerIntegrationTests; +import org.springframework.web.testfixture.http.server.reactive.bootstrap.HttpServer; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/condition/CompositeRequestConditionTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/condition/CompositeRequestConditionTests.java index 1a04dfbb880..efe1ab4ce9a 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/condition/CompositeRequestConditionTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/condition/CompositeRequestConditionTests.java @@ -19,9 +19,9 @@ package org.springframework.web.reactive.result.condition; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; -import org.springframework.mock.http.server.reactive.test.MockServerHttpRequest; -import org.springframework.mock.web.test.server.MockServerWebExchange; import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest; +import org.springframework.web.testfixture.server.MockServerWebExchange; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/condition/ConsumesRequestConditionTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/condition/ConsumesRequestConditionTests.java index 12bb56842d5..15509df1c49 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/condition/ConsumesRequestConditionTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/condition/ConsumesRequestConditionTests.java @@ -22,9 +22,9 @@ import java.util.Collections; import org.junit.jupiter.api.Test; import org.springframework.http.HttpHeaders; -import org.springframework.mock.http.server.reactive.test.MockServerHttpRequest; -import org.springframework.mock.web.test.server.MockServerWebExchange; import org.springframework.web.reactive.result.condition.ConsumesRequestCondition.ConsumeMediaTypeExpression; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest; +import org.springframework.web.testfixture.server.MockServerWebExchange; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.fail; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/condition/HeadersRequestConditionTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/condition/HeadersRequestConditionTests.java index ebe9da15199..5b0dd59c812 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/condition/HeadersRequestConditionTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/condition/HeadersRequestConditionTests.java @@ -20,11 +20,11 @@ import java.util.Collection; import org.junit.jupiter.api.Test; -import org.springframework.mock.web.test.server.MockServerWebExchange; import org.springframework.web.server.ServerWebExchange; +import org.springframework.web.testfixture.server.MockServerWebExchange; import static org.assertj.core.api.Assertions.assertThat; -import static org.springframework.mock.http.server.reactive.test.MockServerHttpRequest.get; +import static org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest.get; /** * Unit tests for {@link HeadersRequestCondition}. diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/condition/ParamsRequestConditionTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/condition/ParamsRequestConditionTests.java index dd8d11cfb5a..7cf95f59383 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/condition/ParamsRequestConditionTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/condition/ParamsRequestConditionTests.java @@ -20,11 +20,11 @@ import java.util.Collection; import org.junit.jupiter.api.Test; -import org.springframework.mock.web.test.server.MockServerWebExchange; import org.springframework.web.server.ServerWebExchange; +import org.springframework.web.testfixture.server.MockServerWebExchange; import static org.assertj.core.api.Assertions.assertThat; -import static org.springframework.mock.http.server.reactive.test.MockServerHttpRequest.get; +import static org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest.get; /** * Unit tests for {@link ParamsRequestCondition}. diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/condition/PatternsRequestConditionTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/condition/PatternsRequestConditionTests.java index 3cd5074426a..4439843cdd9 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/condition/PatternsRequestConditionTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/condition/PatternsRequestConditionTests.java @@ -22,13 +22,13 @@ import java.util.stream.Collectors; import org.junit.jupiter.api.Test; -import org.springframework.mock.web.test.server.MockServerWebExchange; import org.springframework.web.server.ServerWebExchange; +import org.springframework.web.testfixture.server.MockServerWebExchange; import org.springframework.web.util.pattern.PathPattern; import org.springframework.web.util.pattern.PathPatternParser; import static org.assertj.core.api.Assertions.assertThat; -import static org.springframework.mock.http.server.reactive.test.MockServerHttpRequest.get; +import static org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest.get; /** * Unit tests for {@link PatternsRequestCondition}. diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/condition/ProducesRequestConditionTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/condition/ProducesRequestConditionTests.java index e7c40731182..3b9e7e97534 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/condition/ProducesRequestConditionTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/condition/ProducesRequestConditionTests.java @@ -22,14 +22,14 @@ import java.util.Collections; import org.junit.jupiter.api.Test; import org.springframework.http.MediaType; -import org.springframework.mock.web.test.server.MockServerWebExchange; import org.springframework.web.reactive.accept.RequestedContentTypeResolver; import org.springframework.web.reactive.accept.RequestedContentTypeResolverBuilder; import org.springframework.web.server.ServerWebExchange; +import org.springframework.web.testfixture.server.MockServerWebExchange; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.fail; -import static org.springframework.mock.http.server.reactive.test.MockServerHttpRequest.get; +import static org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest.get; /** * Unit tests for {@link ProducesRequestCondition}. diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/condition/RequestConditionHolderTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/condition/RequestConditionHolderTests.java index 7fd98a58335..5c5d7eb5636 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/condition/RequestConditionHolderTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/condition/RequestConditionHolderTests.java @@ -18,9 +18,9 @@ package org.springframework.web.reactive.result.condition; import org.junit.jupiter.api.Test; -import org.springframework.mock.http.server.reactive.test.MockServerHttpRequest; -import org.springframework.mock.web.test.server.MockServerWebExchange; import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest; +import org.springframework.web.testfixture.server.MockServerWebExchange; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/condition/RequestMappingInfoTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/condition/RequestMappingInfoTests.java index 60e7dcf1e71..b9ded4a5360 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/condition/RequestMappingInfoTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/condition/RequestMappingInfoTests.java @@ -26,11 +26,11 @@ import org.junit.jupiter.api.Test; import org.springframework.http.HttpHeaders; import org.springframework.http.MediaType; -import org.springframework.mock.http.server.reactive.test.MockServerHttpRequest; -import org.springframework.mock.web.test.server.MockServerWebExchange; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.reactive.result.method.RequestMappingInfo; import org.springframework.web.server.ServerWebExchange; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest; +import org.springframework.web.testfixture.server.MockServerWebExchange; import org.springframework.web.util.pattern.PathPattern; import org.springframework.web.util.pattern.PathPatternParser; import org.springframework.web.util.pattern.PatternParseException; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/condition/RequestMethodsRequestConditionTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/condition/RequestMethodsRequestConditionTests.java index d7b9f50ab05..fbff5bc5d25 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/condition/RequestMethodsRequestConditionTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/condition/RequestMethodsRequestConditionTests.java @@ -24,10 +24,10 @@ import org.junit.jupiter.api.Test; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpMethod; -import org.springframework.mock.http.server.reactive.test.MockServerHttpRequest; -import org.springframework.mock.web.test.server.MockServerWebExchange; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.server.ServerWebExchange; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest; +import org.springframework.web.testfixture.server.MockServerWebExchange; import static org.assertj.core.api.Assertions.assertThat; import static org.springframework.web.bind.annotation.RequestMethod.DELETE; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/HandlerMethodMappingTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/HandlerMethodMappingTests.java index c1ff34974a5..8e9aa3e41fb 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/HandlerMethodMappingTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/HandlerMethodMappingTests.java @@ -25,12 +25,12 @@ import reactor.core.publisher.Mono; import reactor.test.StepVerifier; import org.springframework.http.server.PathContainer; -import org.springframework.mock.http.server.reactive.test.MockServerHttpRequest; -import org.springframework.mock.web.test.server.MockServerWebExchange; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.method.HandlerMethod; import org.springframework.web.server.ServerWebExchange; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest; +import org.springframework.web.testfixture.server.MockServerWebExchange; import org.springframework.web.util.pattern.PathPattern; import org.springframework.web.util.pattern.PathPatternParser; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/InvocableHandlerMethodTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/InvocableHandlerMethodTests.java index c870e2b26f2..ca4a4c7d88a 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/InvocableHandlerMethodTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/InvocableHandlerMethodTests.java @@ -33,14 +33,14 @@ import org.springframework.core.io.buffer.DefaultDataBufferFactory; import org.springframework.http.HttpStatus; import org.springframework.http.server.reactive.ServerHttpResponse; import org.springframework.lang.Nullable; -import org.springframework.mock.http.server.reactive.test.MockServerHttpRequest; -import org.springframework.mock.web.test.server.MockServerWebExchange; import org.springframework.web.bind.annotation.ResponseStatus; -import org.springframework.web.method.ResolvableMethod; import org.springframework.web.reactive.BindingContext; import org.springframework.web.reactive.HandlerResult; import org.springframework.web.server.ServerWebExchange; import org.springframework.web.server.UnsupportedMediaTypeStatusException; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest; +import org.springframework.web.testfixture.method.ResolvableMethod; +import org.springframework.web.testfixture.server.MockServerWebExchange; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; @@ -48,7 +48,7 @@ import static org.assertj.core.api.Assertions.assertThatIllegalStateException; import static org.mockito.ArgumentMatchers.any; import static org.mockito.BDDMockito.given; import static org.mockito.Mockito.mock; -import static org.springframework.mock.http.server.reactive.test.MockServerHttpRequest.get; +import static org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest.get; /** * Unit tests for {@link InvocableHandlerMethod}. diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/RequestMappingInfoHandlerMappingTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/RequestMappingInfoHandlerMappingTests.java index d9d1b505479..dc505f80f3b 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/RequestMappingInfoHandlerMappingTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/RequestMappingInfoHandlerMappingTests.java @@ -37,8 +37,6 @@ import org.springframework.core.annotation.AnnotationUtils; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpMethod; import org.springframework.http.MediaType; -import org.springframework.mock.http.server.reactive.test.MockServerHttpRequest; -import org.springframework.mock.web.test.server.MockServerWebExchange; import org.springframework.stereotype.Controller; import org.springframework.util.ClassUtils; import org.springframework.util.MultiValueMap; @@ -56,22 +54,24 @@ import org.springframework.web.server.NotAcceptableStatusException; import org.springframework.web.server.ServerWebExchange; import org.springframework.web.server.ServerWebInputException; import org.springframework.web.server.UnsupportedMediaTypeStatusException; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest; +import org.springframework.web.testfixture.server.MockServerWebExchange; import org.springframework.web.util.pattern.PathPattern; import static org.assertj.core.api.Assertions.assertThat; -import static org.springframework.mock.http.server.reactive.test.MockServerHttpRequest.get; -import static org.springframework.mock.http.server.reactive.test.MockServerHttpRequest.method; -import static org.springframework.mock.http.server.reactive.test.MockServerHttpRequest.post; -import static org.springframework.mock.http.server.reactive.test.MockServerHttpRequest.put; import static org.springframework.web.bind.annotation.RequestMethod.GET; import static org.springframework.web.bind.annotation.RequestMethod.HEAD; import static org.springframework.web.bind.annotation.RequestMethod.OPTIONS; -import static org.springframework.web.method.MvcAnnotationPredicates.getMapping; -import static org.springframework.web.method.MvcAnnotationPredicates.requestMapping; -import static org.springframework.web.method.ResolvableMethod.on; import static org.springframework.web.reactive.HandlerMapping.BEST_MATCHING_HANDLER_ATTRIBUTE; import static org.springframework.web.reactive.HandlerMapping.BEST_MATCHING_PATTERN_ATTRIBUTE; import static org.springframework.web.reactive.result.method.RequestMappingInfo.paths; +import static org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest.get; +import static org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest.method; +import static org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest.post; +import static org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest.put; +import static org.springframework.web.testfixture.method.MvcAnnotationPredicates.getMapping; +import static org.springframework.web.testfixture.method.MvcAnnotationPredicates.requestMapping; +import static org.springframework.web.testfixture.method.ResolvableMethod.on; /** * Unit tests for {@link RequestMappingInfoHandlerMapping}. diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/AbstractRequestMappingIntegrationTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/AbstractRequestMappingIntegrationTests.java index 6ed719dff32..68040bb4ccb 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/AbstractRequestMappingIntegrationTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/AbstractRequestMappingIntegrationTests.java @@ -27,10 +27,10 @@ import org.springframework.http.HttpHeaders; import org.springframework.http.MediaType; import org.springframework.http.RequestEntity; import org.springframework.http.ResponseEntity; -import org.springframework.http.server.reactive.AbstractHttpHandlerIntegrationTests; import org.springframework.http.server.reactive.HttpHandler; import org.springframework.web.client.RestTemplate; import org.springframework.web.server.adapter.WebHttpHandlerBuilder; +import org.springframework.web.testfixture.http.server.reactive.bootstrap.AbstractHttpHandlerIntegrationTests; import static org.springframework.http.RequestEntity.get; import static org.springframework.http.RequestEntity.options; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/ContextPathIntegrationTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/ContextPathIntegrationTests.java index 73a12ff1474..4434cf6d289 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/ContextPathIntegrationTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/ContextPathIntegrationTests.java @@ -23,13 +23,13 @@ import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.http.server.reactive.HttpHandler; import org.springframework.http.server.reactive.ServerHttpRequest; -import org.springframework.http.server.reactive.bootstrap.ReactorHttpServer; -import org.springframework.http.server.reactive.bootstrap.TomcatHttpServer; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.client.RestTemplate; import org.springframework.web.reactive.config.EnableWebFlux; import org.springframework.web.server.adapter.WebHttpHandlerBuilder; +import org.springframework.web.testfixture.http.server.reactive.bootstrap.ReactorHttpServer; +import org.springframework.web.testfixture.http.server.reactive.bootstrap.TomcatHttpServer; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/ControllerAdviceTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/ControllerAdviceTests.java index cd0424fbd75..ec0e73ee02c 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/ControllerAdviceTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/ControllerAdviceTests.java @@ -28,8 +28,6 @@ import org.springframework.context.annotation.AnnotationConfigApplicationContext import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.core.annotation.Order; -import org.springframework.mock.http.server.reactive.test.MockServerHttpRequest; -import org.springframework.mock.web.test.server.MockServerWebExchange; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.util.ClassUtils; @@ -44,6 +42,8 @@ import org.springframework.web.bind.support.WebExchangeDataBinder; import org.springframework.web.method.HandlerMethod; import org.springframework.web.reactive.BindingContext; import org.springframework.web.reactive.HandlerResult; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest; +import org.springframework.web.testfixture.server.MockServerWebExchange; import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/ControllerInputIntegrationTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/ControllerInputIntegrationTests.java index af93bb19461..013218698c6 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/ControllerInputIntegrationTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/ControllerInputIntegrationTests.java @@ -23,12 +23,12 @@ import org.springframework.context.ApplicationContext; import org.springframework.context.annotation.AnnotationConfigApplicationContext; import org.springframework.context.annotation.Configuration; import org.springframework.http.HttpHeaders; -import org.springframework.http.server.reactive.bootstrap.HttpServer; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.MatrixVariable; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.reactive.config.EnableWebFlux; +import org.springframework.web.testfixture.http.server.reactive.bootstrap.HttpServer; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/ControllerMethodResolverTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/ControllerMethodResolverTests.java index 22db275a41a..0ae2ff24281 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/ControllerMethodResolverTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/ControllerMethodResolverTests.java @@ -38,7 +38,6 @@ import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.InitBinder; import org.springframework.web.bind.annotation.ModelAttribute; import org.springframework.web.method.HandlerMethod; -import org.springframework.web.method.ResolvableMethod; import org.springframework.web.reactive.BindingContext; import org.springframework.web.reactive.result.method.HandlerMethodArgumentResolver; import org.springframework.web.reactive.result.method.InvocableHandlerMethod; @@ -46,6 +45,7 @@ import org.springframework.web.reactive.result.method.SyncHandlerMethodArgumentR import org.springframework.web.reactive.result.method.SyncInvocableHandlerMethod; import org.springframework.web.server.ResponseStatusException; import org.springframework.web.server.ServerWebExchange; +import org.springframework.web.testfixture.method.ResolvableMethod; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/CookieValueMethodArgumentResolverTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/CookieValueMethodArgumentResolverTests.java index a6829344bc9..a0c4f5cdc35 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/CookieValueMethodArgumentResolverTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/CookieValueMethodArgumentResolverTests.java @@ -28,12 +28,12 @@ import org.springframework.core.MethodParameter; import org.springframework.core.ReactiveAdapterRegistry; import org.springframework.core.annotation.SynthesizingMethodParameter; import org.springframework.http.HttpCookie; -import org.springframework.mock.http.server.reactive.test.MockServerHttpRequest; -import org.springframework.mock.web.test.server.MockServerWebExchange; import org.springframework.util.ReflectionUtils; import org.springframework.web.bind.annotation.CookieValue; import org.springframework.web.reactive.BindingContext; import org.springframework.web.server.ServerWebInputException; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest; +import org.springframework.web.testfixture.server.MockServerWebExchange; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatIllegalStateException; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/CrossOriginAnnotationIntegrationTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/CrossOriginAnnotationIntegrationTests.java index 07a027b6926..f89c653109f 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/CrossOriginAnnotationIntegrationTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/CrossOriginAnnotationIntegrationTests.java @@ -29,7 +29,6 @@ import org.springframework.http.HttpMethod; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.http.client.HttpComponentsClientHttpRequestFactory; -import org.springframework.http.server.reactive.bootstrap.HttpServer; import org.springframework.web.bind.annotation.CrossOrigin; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; @@ -38,6 +37,7 @@ import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.client.RestTemplate; import org.springframework.web.reactive.config.EnableWebFlux; +import org.springframework.web.testfixture.http.server.reactive.bootstrap.HttpServer; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/ErrorsMethodArgumentResolverTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/ErrorsMethodArgumentResolverTests.java index f576115dde4..5be02293760 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/ErrorsMethodArgumentResolverTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/ErrorsMethodArgumentResolverTests.java @@ -25,14 +25,14 @@ import reactor.core.publisher.MonoProcessor; import org.springframework.core.MethodParameter; import org.springframework.core.ReactiveAdapterRegistry; import org.springframework.core.ResolvableType; -import org.springframework.mock.http.server.reactive.test.MockServerHttpRequest; -import org.springframework.mock.web.test.server.MockServerWebExchange; import org.springframework.validation.BindingResult; import org.springframework.validation.DataBinder; import org.springframework.validation.Errors; import org.springframework.web.bind.annotation.ModelAttribute; -import org.springframework.web.method.ResolvableMethod; import org.springframework.web.reactive.BindingContext; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest; +import org.springframework.web.testfixture.method.ResolvableMethod; +import org.springframework.web.testfixture.server.MockServerWebExchange; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatIllegalStateException; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/ExpressionValueMethodArgumentResolverTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/ExpressionValueMethodArgumentResolverTests.java index 43d5ac18f18..59c41fd6890 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/ExpressionValueMethodArgumentResolverTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/ExpressionValueMethodArgumentResolverTests.java @@ -26,10 +26,10 @@ import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.AnnotationConfigApplicationContext; import org.springframework.core.MethodParameter; import org.springframework.core.ReactiveAdapterRegistry; -import org.springframework.mock.http.server.reactive.test.MockServerHttpRequest; -import org.springframework.mock.web.test.server.MockServerWebExchange; import org.springframework.util.ReflectionUtils; import org.springframework.web.reactive.BindingContext; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest; +import org.springframework.web.testfixture.server.MockServerWebExchange; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatIllegalStateException; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/GlobalCorsConfigIntegrationTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/GlobalCorsConfigIntegrationTests.java index 49dd73e5a06..96d119d75e7 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/GlobalCorsConfigIntegrationTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/GlobalCorsConfigIntegrationTests.java @@ -26,13 +26,13 @@ import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframework.http.client.HttpComponentsClientHttpRequestFactory; -import org.springframework.http.server.reactive.bootstrap.HttpServer; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.client.HttpClientErrorException; import org.springframework.web.client.RestTemplate; import org.springframework.web.reactive.config.CorsRegistry; import org.springframework.web.reactive.config.WebFluxConfigurationSupport; +import org.springframework.web.testfixture.http.server.reactive.bootstrap.HttpServer; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/HttpEntityMethodArgumentResolverTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/HttpEntityMethodArgumentResolverTests.java index d163b54ccfd..f907bcb27f9 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/HttpEntityMethodArgumentResolverTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/HttpEntityMethodArgumentResolverTests.java @@ -40,18 +40,18 @@ import org.springframework.http.HttpEntity; import org.springframework.http.RequestEntity; import org.springframework.http.codec.DecoderHttpMessageReader; import org.springframework.http.codec.HttpMessageReader; -import org.springframework.mock.web.test.server.MockServerWebExchange; import org.springframework.util.ObjectUtils; -import org.springframework.web.method.ResolvableMethod; import org.springframework.web.reactive.BindingContext; import org.springframework.web.server.ServerWebExchange; import org.springframework.web.server.ServerWebInputException; +import org.springframework.web.testfixture.method.ResolvableMethod; +import org.springframework.web.testfixture.server.MockServerWebExchange; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatIllegalStateException; import static org.springframework.core.ResolvableType.forClassWithGenerics; import static org.springframework.http.MediaType.TEXT_PLAIN; -import static org.springframework.mock.http.server.reactive.test.MockServerHttpRequest.post; +import static org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest.post; /** * Unit tests for {@link HttpEntityMethodArgumentResolver}.When adding a test also diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/InitBinderBindingContextTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/InitBinderBindingContextTests.java index 8d1bbd33d9f..56ba84873cc 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/InitBinderBindingContextTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/InitBinderBindingContextTests.java @@ -27,8 +27,6 @@ import org.springframework.core.LocalVariableTableParameterNameDiscoverer; import org.springframework.core.ReactiveAdapterRegistry; import org.springframework.core.convert.ConversionService; import org.springframework.format.support.DefaultFormattingConversionService; -import org.springframework.mock.http.server.reactive.test.MockServerHttpRequest; -import org.springframework.mock.web.test.server.MockServerWebExchange; import org.springframework.web.bind.WebDataBinder; import org.springframework.web.bind.annotation.InitBinder; import org.springframework.web.bind.annotation.RequestParam; @@ -36,6 +34,8 @@ import org.springframework.web.bind.support.ConfigurableWebBindingInitializer; import org.springframework.web.reactive.BindingContext; import org.springframework.web.reactive.result.method.SyncHandlerMethodArgumentResolver; import org.springframework.web.reactive.result.method.SyncInvocableHandlerMethod; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest; +import org.springframework.web.testfixture.server.MockServerWebExchange; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatIllegalStateException; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/JacksonHintsIntegrationTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/JacksonHintsIntegrationTests.java index f6fb973ff67..60387e47bf0 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/JacksonHintsIntegrationTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/JacksonHintsIntegrationTests.java @@ -30,12 +30,12 @@ import org.springframework.context.annotation.Configuration; import org.springframework.http.HttpEntity; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; -import org.springframework.http.server.reactive.bootstrap.HttpServer; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.reactive.config.EnableWebFlux; +import org.springframework.web.testfixture.http.server.reactive.bootstrap.HttpServer; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/JacksonStreamingIntegrationTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/JacksonStreamingIntegrationTests.java index b6efc7ebec9..99b34ae33e5 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/JacksonStreamingIntegrationTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/JacksonStreamingIntegrationTests.java @@ -25,15 +25,15 @@ import org.springframework.context.annotation.AnnotationConfigApplicationContext import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.http.MediaType; -import org.springframework.http.server.reactive.AbstractHttpHandlerIntegrationTests; import org.springframework.http.server.reactive.HttpHandler; -import org.springframework.http.server.reactive.bootstrap.HttpServer; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.reactive.DispatcherHandler; import org.springframework.web.reactive.config.EnableWebFlux; import org.springframework.web.reactive.function.client.WebClient; import org.springframework.web.server.adapter.WebHttpHandlerBuilder; +import org.springframework.web.testfixture.http.server.reactive.bootstrap.AbstractHttpHandlerIntegrationTests; +import org.springframework.web.testfixture.http.server.reactive.bootstrap.HttpServer; import static org.springframework.http.MediaType.APPLICATION_STREAM_JSON; import static org.springframework.http.MediaType.APPLICATION_STREAM_JSON_VALUE; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/MatrixVariablesMapMethodArgumentResolverTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/MatrixVariablesMapMethodArgumentResolverTests.java index 681dafa7370..1b41388d130 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/MatrixVariablesMapMethodArgumentResolverTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/MatrixVariablesMapMethodArgumentResolverTests.java @@ -26,17 +26,17 @@ import org.junit.jupiter.api.Test; import org.springframework.core.MethodParameter; import org.springframework.core.ReactiveAdapterRegistry; -import org.springframework.mock.http.server.reactive.test.MockServerHttpRequest; -import org.springframework.mock.web.test.server.MockServerWebExchange; import org.springframework.util.LinkedMultiValueMap; import org.springframework.util.MultiValueMap; import org.springframework.web.bind.annotation.MatrixVariable; -import org.springframework.web.method.ResolvableMethod; import org.springframework.web.reactive.BindingContext; import org.springframework.web.reactive.HandlerMapping; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest; +import org.springframework.web.testfixture.method.ResolvableMethod; +import org.springframework.web.testfixture.server.MockServerWebExchange; import static org.assertj.core.api.Assertions.assertThat; -import static org.springframework.web.method.MvcAnnotationPredicates.matrixAttribute; +import static org.springframework.web.testfixture.method.MvcAnnotationPredicates.matrixAttribute; /** * Unit tests for {@link MatrixVariableMapMethodArgumentResolver}. diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/MatrixVariablesMethodArgumentResolverTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/MatrixVariablesMethodArgumentResolverTests.java index c51b6201492..ac1e9aaade4 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/MatrixVariablesMethodArgumentResolverTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/MatrixVariablesMethodArgumentResolverTests.java @@ -26,20 +26,20 @@ import org.junit.jupiter.api.Test; import org.springframework.core.MethodParameter; import org.springframework.core.ReactiveAdapterRegistry; -import org.springframework.mock.http.server.reactive.test.MockServerHttpRequest; -import org.springframework.mock.web.test.server.MockServerWebExchange; import org.springframework.util.LinkedMultiValueMap; import org.springframework.util.MultiValueMap; import org.springframework.web.bind.annotation.MatrixVariable; -import org.springframework.web.method.ResolvableMethod; import org.springframework.web.reactive.BindingContext; import org.springframework.web.reactive.HandlerMapping; import org.springframework.web.server.ServerErrorException; import org.springframework.web.server.ServerWebInputException; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest; +import org.springframework.web.testfixture.method.ResolvableMethod; +import org.springframework.web.testfixture.server.MockServerWebExchange; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; -import static org.springframework.web.method.MvcAnnotationPredicates.matrixAttribute; +import static org.springframework.web.testfixture.method.MvcAnnotationPredicates.matrixAttribute; /** * Unit tests for {@link MatrixVariableMethodArgumentResolver}. diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/MessageReaderArgumentResolverTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/MessageReaderArgumentResolverTests.java index 18bccc04dda..df9d4cb27e5 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/MessageReaderArgumentResolverTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/MessageReaderArgumentResolverTests.java @@ -47,22 +47,22 @@ import org.springframework.http.codec.DecoderHttpMessageReader; import org.springframework.http.codec.HttpMessageReader; import org.springframework.http.codec.json.Jackson2JsonDecoder; import org.springframework.lang.Nullable; -import org.springframework.mock.http.server.reactive.test.MockServerHttpRequest; -import org.springframework.mock.web.test.server.MockServerWebExchange; import org.springframework.validation.Errors; import org.springframework.validation.Validator; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.support.ConfigurableWebBindingInitializer; import org.springframework.web.method.HandlerMethod; -import org.springframework.web.method.ResolvableMethod; import org.springframework.web.reactive.BindingContext; import org.springframework.web.server.ServerWebExchange; import org.springframework.web.server.ServerWebInputException; import org.springframework.web.server.UnsupportedMediaTypeStatusException; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest; +import org.springframework.web.testfixture.method.ResolvableMethod; +import org.springframework.web.testfixture.server.MockServerWebExchange; import static org.assertj.core.api.Assertions.assertThat; import static org.springframework.core.ResolvableType.forClassWithGenerics; -import static org.springframework.mock.http.server.reactive.test.MockServerHttpRequest.post; +import static org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest.post; /** * Unit tests for {@link AbstractMessageReaderArgumentResolver}. diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/MessageWriterResultHandlerTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/MessageWriterResultHandlerTests.java index 4273bd98b28..6acf14437d4 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/MessageWriterResultHandlerTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/MessageWriterResultHandlerTests.java @@ -47,17 +47,17 @@ import org.springframework.http.codec.HttpMessageWriter; import org.springframework.http.codec.ResourceHttpMessageWriter; import org.springframework.http.codec.json.Jackson2JsonEncoder; import org.springframework.http.codec.xml.Jaxb2XmlEncoder; -import org.springframework.mock.http.server.reactive.test.MockServerHttpRequest; -import org.springframework.mock.web.test.server.MockServerWebExchange; import org.springframework.util.ObjectUtils; import org.springframework.web.reactive.accept.RequestedContentTypeResolver; import org.springframework.web.reactive.accept.RequestedContentTypeResolverBuilder; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest; +import org.springframework.web.testfixture.server.MockServerWebExchange; import static org.assertj.core.api.Assertions.assertThat; import static org.springframework.core.testfixture.io.buffer.DataBufferTestUtils.dumpString; import static org.springframework.http.MediaType.APPLICATION_JSON; -import static org.springframework.web.method.ResolvableMethod.on; import static org.springframework.web.reactive.HandlerMapping.PRODUCIBLE_MEDIA_TYPES_ATTRIBUTE; +import static org.springframework.web.testfixture.method.ResolvableMethod.on; /** * Unit tests for {@link AbstractMessageWriterResultHandler}. diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/ModelAttributeMethodArgumentResolverTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/ModelAttributeMethodArgumentResolverTests.java index 3b0beaef44d..22160e1f27e 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/ModelAttributeMethodArgumentResolverTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/ModelAttributeMethodArgumentResolverTests.java @@ -31,17 +31,17 @@ import rx.Single; import org.springframework.core.MethodParameter; import org.springframework.core.ReactiveAdapterRegistry; import org.springframework.http.MediaType; -import org.springframework.mock.http.server.reactive.test.MockServerHttpRequest; -import org.springframework.mock.web.test.server.MockServerWebExchange; import org.springframework.validation.BindingResult; import org.springframework.validation.annotation.Validated; import org.springframework.validation.beanvalidation.LocalValidatorFactoryBean; import org.springframework.web.bind.annotation.ModelAttribute; import org.springframework.web.bind.support.ConfigurableWebBindingInitializer; import org.springframework.web.bind.support.WebExchangeBindException; -import org.springframework.web.method.ResolvableMethod; import org.springframework.web.reactive.BindingContext; import org.springframework.web.server.ServerWebExchange; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest; +import org.springframework.web.testfixture.method.ResolvableMethod; +import org.springframework.web.testfixture.server.MockServerWebExchange; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/ModelInitializerTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/ModelInitializerTests.java index 0a388a1ca56..90e07285be0 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/ModelInitializerTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/ModelInitializerTests.java @@ -33,8 +33,6 @@ import org.springframework.core.MethodIntrospector; import org.springframework.core.ReactiveAdapterRegistry; import org.springframework.core.annotation.AnnotationUtils; import org.springframework.lang.Nullable; -import org.springframework.mock.http.server.reactive.test.MockServerHttpRequest; -import org.springframework.mock.web.test.server.MockServerWebExchange; import org.springframework.ui.Model; import org.springframework.util.ReflectionUtils; import org.springframework.validation.Validator; @@ -48,10 +46,12 @@ import org.springframework.web.bind.support.ConfigurableWebBindingInitializer; import org.springframework.web.bind.support.WebBindingInitializer; import org.springframework.web.bind.support.WebExchangeDataBinder; import org.springframework.web.method.HandlerMethod; -import org.springframework.web.method.ResolvableMethod; import org.springframework.web.reactive.result.method.SyncInvocableHandlerMethod; import org.springframework.web.server.ServerWebExchange; import org.springframework.web.server.WebSession; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest; +import org.springframework.web.testfixture.method.ResolvableMethod; +import org.springframework.web.testfixture.server.MockServerWebExchange; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/ModelMethodArgumentResolverTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/ModelMethodArgumentResolverTests.java index 3611213f0c0..1542eb1fe61 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/ModelMethodArgumentResolverTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/ModelMethodArgumentResolverTests.java @@ -23,16 +23,16 @@ import org.junit.jupiter.api.Test; import org.springframework.core.MethodParameter; import org.springframework.core.ReactiveAdapterRegistry; -import org.springframework.mock.web.test.server.MockServerWebExchange; import org.springframework.ui.Model; import org.springframework.ui.ModelMap; import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.method.ResolvableMethod; import org.springframework.web.reactive.BindingContext; import org.springframework.web.server.ServerWebExchange; +import org.springframework.web.testfixture.method.ResolvableMethod; +import org.springframework.web.testfixture.server.MockServerWebExchange; import static org.assertj.core.api.Assertions.assertThat; -import static org.springframework.mock.http.server.reactive.test.MockServerHttpRequest.get; +import static org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest.get; /** * Unit tests for {@link ModelMethodArgumentResolver}. diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/MultipartIntegrationTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/MultipartIntegrationTests.java index a40d4767901..11fa71efbb8 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/MultipartIntegrationTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/MultipartIntegrationTests.java @@ -41,9 +41,8 @@ import org.springframework.http.codec.multipart.FilePart; import org.springframework.http.codec.multipart.FormFieldPart; import org.springframework.http.codec.multipart.MultipartHttpMessageReader; import org.springframework.http.codec.multipart.Part; -import org.springframework.http.server.reactive.AbstractHttpHandlerIntegrationTests; import org.springframework.http.server.reactive.HttpHandler; -import org.springframework.http.server.reactive.bootstrap.HttpServer; +import org.springframework.util.FileCopyUtils; import org.springframework.util.MultiValueMap; import org.springframework.web.bind.annotation.ModelAttribute; import org.springframework.web.bind.annotation.PostMapping; @@ -55,6 +54,8 @@ import org.springframework.web.reactive.config.EnableWebFlux; import org.springframework.web.reactive.function.client.ClientResponse; import org.springframework.web.reactive.function.client.WebClient; import org.springframework.web.server.adapter.WebHttpHandlerBuilder; +import org.springframework.web.testfixture.http.server.reactive.bootstrap.AbstractHttpHandlerIntegrationTests; +import org.springframework.web.testfixture.http.server.reactive.bootstrap.HttpServer; import static org.assertj.core.api.Assertions.assertThat; @@ -204,7 +205,8 @@ class MultipartIntegrationTests extends AbstractHttpHandlerIntegrationTests { private static void verifyContents(Path tempFile, Resource resource) { try { byte[] tempBytes = Files.readAllBytes(tempFile); - byte[] resourceBytes = Files.readAllBytes(resource.getFile().toPath()); + // Use FileCopyUtils since the resource might reside in a JAR instead of in the file system. + byte[] resourceBytes = FileCopyUtils.copyToByteArray(resource.getInputStream()); assertThat(tempBytes).isEqualTo(resourceBytes); } catch (IOException ex) { diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/PathVariableMapMethodArgumentResolverTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/PathVariableMapMethodArgumentResolverTests.java index 051e10bcb03..74c75eb0ed6 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/PathVariableMapMethodArgumentResolverTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/PathVariableMapMethodArgumentResolverTests.java @@ -27,12 +27,12 @@ import reactor.core.publisher.Mono; import org.springframework.core.MethodParameter; import org.springframework.core.ReactiveAdapterRegistry; -import org.springframework.mock.http.server.reactive.test.MockServerHttpRequest; -import org.springframework.mock.web.test.server.MockServerWebExchange; import org.springframework.util.ReflectionUtils; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.reactive.BindingContext; import org.springframework.web.reactive.HandlerMapping; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest; +import org.springframework.web.testfixture.server.MockServerWebExchange; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatIllegalStateException; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/PathVariableMethodArgumentResolverTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/PathVariableMethodArgumentResolverTests.java index 2be22e77e1b..6636ca27f64 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/PathVariableMethodArgumentResolverTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/PathVariableMethodArgumentResolverTests.java @@ -30,14 +30,14 @@ import org.springframework.core.MethodParameter; import org.springframework.core.ReactiveAdapterRegistry; import org.springframework.core.annotation.SynthesizingMethodParameter; import org.springframework.format.support.DefaultFormattingConversionService; -import org.springframework.mock.http.server.reactive.test.MockServerHttpRequest; -import org.springframework.mock.web.test.server.MockServerWebExchange; import org.springframework.util.ReflectionUtils; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.support.ConfigurableWebBindingInitializer; import org.springframework.web.reactive.BindingContext; import org.springframework.web.reactive.HandlerMapping; import org.springframework.web.server.ServerErrorException; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest; +import org.springframework.web.testfixture.server.MockServerWebExchange; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatIllegalStateException; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/PrincipalMethodArgumentResolverTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/PrincipalMethodArgumentResolverTests.java index 32078174ff8..a923b89e014 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/PrincipalMethodArgumentResolverTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/PrincipalMethodArgumentResolverTests.java @@ -24,11 +24,11 @@ import reactor.core.publisher.Mono; import org.springframework.core.MethodParameter; import org.springframework.core.ReactiveAdapterRegistry; -import org.springframework.mock.http.server.reactive.test.MockServerHttpRequest; -import org.springframework.mock.web.test.server.MockServerWebExchange; -import org.springframework.web.method.ResolvableMethod; import org.springframework.web.reactive.BindingContext; import org.springframework.web.server.ServerWebExchange; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest; +import org.springframework.web.testfixture.method.ResolvableMethod; +import org.springframework.web.testfixture.server.MockServerWebExchange; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/ProtobufIntegrationTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/ProtobufIntegrationTests.java index 2b58d9ff0e4..e64264e8371 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/ProtobufIntegrationTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/ProtobufIntegrationTests.java @@ -26,13 +26,13 @@ import org.springframework.context.ApplicationContext; import org.springframework.context.annotation.AnnotationConfigApplicationContext; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; -import org.springframework.http.server.reactive.bootstrap.HttpServer; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.reactive.config.EnableWebFlux; import org.springframework.web.reactive.function.client.WebClient; import org.springframework.web.reactive.protobuf.Msg; import org.springframework.web.reactive.protobuf.SecondMsg; +import org.springframework.web.testfixture.http.server.reactive.bootstrap.HttpServer; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestAttributeMethodArgumentResolverTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestAttributeMethodArgumentResolverTests.java index c4ba3f373e1..f66db9ab11d 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestAttributeMethodArgumentResolverTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestAttributeMethodArgumentResolverTests.java @@ -29,16 +29,16 @@ import org.springframework.context.annotation.AnnotationConfigApplicationContext import org.springframework.core.MethodParameter; import org.springframework.core.ReactiveAdapterRegistry; import org.springframework.format.support.DefaultFormattingConversionService; -import org.springframework.mock.http.server.reactive.test.MockServerHttpRequest; -import org.springframework.mock.web.test.server.MockServerWebExchange; import org.springframework.web.bind.annotation.RequestAttribute; import org.springframework.web.bind.support.ConfigurableWebBindingInitializer; -import org.springframework.web.method.ResolvableMethod; import org.springframework.web.reactive.BindingContext; import org.springframework.web.server.ServerWebInputException; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest; +import org.springframework.web.testfixture.method.ResolvableMethod; +import org.springframework.web.testfixture.server.MockServerWebExchange; import static org.assertj.core.api.Assertions.assertThat; -import static org.springframework.web.method.MvcAnnotationPredicates.requestAttribute; +import static org.springframework.web.testfixture.method.MvcAnnotationPredicates.requestAttribute; /** * Unit tests for {@link RequestAttributeMethodArgumentResolver}. diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestBodyMethodArgumentResolverTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestBodyMethodArgumentResolverTests.java index 3442f208db6..28d4755a29d 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestBodyMethodArgumentResolverTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestBodyMethodArgumentResolverTests.java @@ -37,17 +37,17 @@ import org.springframework.core.ReactiveAdapterRegistry; import org.springframework.core.codec.StringDecoder; import org.springframework.http.codec.DecoderHttpMessageReader; import org.springframework.http.codec.HttpMessageReader; -import org.springframework.mock.http.server.reactive.test.MockServerHttpRequest; -import org.springframework.mock.web.test.server.MockServerWebExchange; import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.method.ResolvableMethod; import org.springframework.web.reactive.BindingContext; import org.springframework.web.server.ServerWebExchange; import org.springframework.web.server.ServerWebInputException; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest; +import org.springframework.web.testfixture.method.ResolvableMethod; +import org.springframework.web.testfixture.server.MockServerWebExchange; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; -import static org.springframework.web.method.MvcAnnotationPredicates.requestBody; +import static org.springframework.web.testfixture.method.MvcAnnotationPredicates.requestBody; /** * Unit tests for {@link RequestBodyMethodArgumentResolver}. When adding a test also diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestHeaderMapMethodArgumentResolverTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestHeaderMapMethodArgumentResolverTests.java index a333fad4876..a0c6eea3b2e 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestHeaderMapMethodArgumentResolverTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestHeaderMapMethodArgumentResolverTests.java @@ -28,12 +28,12 @@ import org.springframework.core.MethodParameter; import org.springframework.core.ReactiveAdapterRegistry; import org.springframework.core.annotation.SynthesizingMethodParameter; import org.springframework.http.HttpHeaders; -import org.springframework.mock.http.server.reactive.test.MockServerHttpRequest; -import org.springframework.mock.web.test.server.MockServerWebExchange; import org.springframework.util.LinkedMultiValueMap; import org.springframework.util.MultiValueMap; import org.springframework.util.ReflectionUtils; import org.springframework.web.bind.annotation.RequestHeader; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest; +import org.springframework.web.testfixture.server.MockServerWebExchange; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatIllegalStateException; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestHeaderMethodArgumentResolverTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestHeaderMethodArgumentResolverTests.java index 57350e0e829..bcbc65d5acf 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestHeaderMethodArgumentResolverTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestHeaderMethodArgumentResolverTests.java @@ -32,14 +32,14 @@ import org.springframework.core.MethodParameter; import org.springframework.core.ReactiveAdapterRegistry; import org.springframework.core.annotation.SynthesizingMethodParameter; import org.springframework.format.support.DefaultFormattingConversionService; -import org.springframework.mock.http.server.reactive.test.MockServerHttpRequest; -import org.springframework.mock.web.test.server.MockServerWebExchange; import org.springframework.util.ReflectionUtils; import org.springframework.web.bind.annotation.RequestHeader; import org.springframework.web.bind.support.ConfigurableWebBindingInitializer; import org.springframework.web.reactive.BindingContext; import org.springframework.web.server.ServerWebExchange; import org.springframework.web.server.ServerWebInputException; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest; +import org.springframework.web.testfixture.server.MockServerWebExchange; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatIllegalStateException; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestMappingDataBindingIntegrationTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestMappingDataBindingIntegrationTests.java index 250441f5eb3..8cce6adcec7 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestMappingDataBindingIntegrationTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestMappingDataBindingIntegrationTests.java @@ -29,7 +29,6 @@ import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; import org.springframework.http.HttpHeaders; import org.springframework.http.MediaType; -import org.springframework.http.server.reactive.bootstrap.HttpServer; import org.springframework.util.LinkedMultiValueMap; import org.springframework.util.MultiValueMap; import org.springframework.validation.Errors; @@ -41,6 +40,7 @@ import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.reactive.config.EnableWebFlux; +import org.springframework.web.testfixture.http.server.reactive.bootstrap.HttpServer; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestMappingExceptionHandlingIntegrationTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestMappingExceptionHandlingIntegrationTests.java index 25bff1a87d3..7acff0afd13 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestMappingExceptionHandlingIntegrationTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestMappingExceptionHandlingIntegrationTests.java @@ -30,12 +30,12 @@ import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; import org.springframework.http.HttpHeaders; import org.springframework.http.ResponseEntity; -import org.springframework.http.server.reactive.bootstrap.HttpServer; import org.springframework.web.bind.annotation.ExceptionHandler; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.client.HttpStatusCodeException; import org.springframework.web.reactive.config.EnableWebFlux; +import org.springframework.web.testfixture.http.server.reactive.bootstrap.HttpServer; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestMappingIntegrationTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestMappingIntegrationTests.java index 75819401dde..f3191dbf00f 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestMappingIntegrationTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestMappingIntegrationTests.java @@ -29,13 +29,13 @@ import org.springframework.http.HttpHeaders; import org.springframework.http.RequestEntity; import org.springframework.http.ResponseEntity; import org.springframework.http.server.reactive.ServerHttpRequest; -import org.springframework.http.server.reactive.bootstrap.HttpServer; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.reactive.config.EnableWebFlux; import org.springframework.web.server.adapter.ForwardedHeaderTransformer; +import org.springframework.web.testfixture.http.server.reactive.bootstrap.HttpServer; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestMappingMessageConversionIntegrationTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestMappingMessageConversionIntegrationTests.java index 3ad78feebf9..266952dbc66 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestMappingMessageConversionIntegrationTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestMappingMessageConversionIntegrationTests.java @@ -52,14 +52,13 @@ import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframework.http.codec.json.Jackson2JsonEncoder; -import org.springframework.http.server.reactive.ZeroCopyIntegrationTests; -import org.springframework.http.server.reactive.bootstrap.HttpServer; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.reactive.config.EnableWebFlux; +import org.springframework.web.testfixture.http.server.reactive.bootstrap.HttpServer; import static java.util.Arrays.asList; import static org.assertj.core.api.Assertions.assertThat; @@ -657,7 +656,7 @@ public class RequestMappingMessageConversionIntegrationTests extends AbstractReq @GetMapping("/resource") public Resource resource() { - return new ClassPathResource("spring.png", ZeroCopyIntegrationTests.class); + return new ClassPathResource("/org/springframework/web/reactive/spring.png"); } } diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestMappingViewResolutionIntegrationTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestMappingViewResolutionIntegrationTests.java index 7714923dc21..c0e4176a45b 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestMappingViewResolutionIntegrationTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestMappingViewResolutionIntegrationTests.java @@ -31,7 +31,6 @@ import org.springframework.http.MediaType; import org.springframework.http.RequestEntity; import org.springframework.http.ResponseEntity; import org.springframework.http.client.SimpleClientHttpRequestFactory; -import org.springframework.http.server.reactive.bootstrap.HttpServer; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.GetMapping; @@ -41,6 +40,7 @@ import org.springframework.web.reactive.config.ViewResolverRegistry; import org.springframework.web.reactive.config.WebFluxConfigurer; import org.springframework.web.reactive.result.view.freemarker.FreeMarkerConfigurer; import org.springframework.web.server.ServerWebExchange; +import org.springframework.web.testfixture.http.server.reactive.bootstrap.HttpServer; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestParamMapMethodArgumentResolverTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestParamMapMethodArgumentResolverTests.java index dbb2e44071d..0c3563b27ac 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestParamMapMethodArgumentResolverTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestParamMapMethodArgumentResolverTests.java @@ -26,16 +26,16 @@ import reactor.core.publisher.Mono; import org.springframework.core.MethodParameter; import org.springframework.core.ReactiveAdapterRegistry; -import org.springframework.mock.http.server.reactive.test.MockServerHttpRequest; -import org.springframework.mock.web.test.server.MockServerWebExchange; import org.springframework.util.MultiValueMap; import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.method.ResolvableMethod; import org.springframework.web.server.ServerWebExchange; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest; +import org.springframework.web.testfixture.method.ResolvableMethod; +import org.springframework.web.testfixture.server.MockServerWebExchange; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatIllegalStateException; -import static org.springframework.web.method.MvcAnnotationPredicates.requestParam; +import static org.springframework.web.testfixture.method.MvcAnnotationPredicates.requestParam; /** * Unit tests for {@link RequestParamMapMethodArgumentResolver}. diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestParamMethodArgumentResolverTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestParamMethodArgumentResolverTests.java index 33cd535338c..d124bf31a84 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestParamMethodArgumentResolverTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestParamMethodArgumentResolverTests.java @@ -28,19 +28,19 @@ import reactor.test.StepVerifier; import org.springframework.core.MethodParameter; import org.springframework.core.ReactiveAdapterRegistry; import org.springframework.format.support.DefaultFormattingConversionService; -import org.springframework.mock.http.server.reactive.test.MockServerHttpRequest; -import org.springframework.mock.web.test.server.MockServerWebExchange; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.support.ConfigurableWebBindingInitializer; -import org.springframework.web.method.ResolvableMethod; import org.springframework.web.reactive.BindingContext; import org.springframework.web.server.ServerWebExchange; import org.springframework.web.server.ServerWebInputException; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest; +import org.springframework.web.testfixture.method.ResolvableMethod; +import org.springframework.web.testfixture.server.MockServerWebExchange; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatIllegalStateException; import static org.springframework.core.ResolvableType.forClassWithGenerics; -import static org.springframework.web.method.MvcAnnotationPredicates.requestParam; +import static org.springframework.web.testfixture.method.MvcAnnotationPredicates.requestParam; /** * Unit tests for {@link RequestParamMethodArgumentResolver}. diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestPartMethodArgumentResolverTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestPartMethodArgumentResolverTests.java index 4beaf7af247..19ebc737a9f 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestPartMethodArgumentResolverTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/RequestPartMethodArgumentResolverTests.java @@ -43,19 +43,19 @@ import org.springframework.http.codec.HttpMessageWriter; import org.springframework.http.codec.ServerCodecConfigurer; import org.springframework.http.codec.multipart.MultipartHttpMessageWriter; import org.springframework.http.codec.multipart.Part; -import org.springframework.mock.http.client.reactive.test.MockClientHttpRequest; -import org.springframework.mock.http.server.reactive.test.MockServerHttpRequest; -import org.springframework.mock.web.test.server.MockServerWebExchange; import org.springframework.util.MultiValueMap; import org.springframework.web.bind.annotation.RequestPart; -import org.springframework.web.method.ResolvableMethod; import org.springframework.web.reactive.BindingContext; import org.springframework.web.server.ServerWebExchange; import org.springframework.web.server.ServerWebInputException; +import org.springframework.web.testfixture.http.client.reactive.MockClientHttpRequest; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest; +import org.springframework.web.testfixture.method.ResolvableMethod; +import org.springframework.web.testfixture.server.MockServerWebExchange; import static org.assertj.core.api.Assertions.assertThat; import static org.springframework.core.ResolvableType.forClass; -import static org.springframework.web.method.MvcAnnotationPredicates.requestPart; +import static org.springframework.web.testfixture.method.MvcAnnotationPredicates.requestPart; /** * Unit tests for {@link RequestPartMethodArgumentResolver}. diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/ResponseBodyResultHandlerTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/ResponseBodyResultHandlerTests.java index ecc77837de7..96fd0a3c076 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/ResponseBodyResultHandlerTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/ResponseBodyResultHandlerTests.java @@ -42,7 +42,7 @@ import org.springframework.web.reactive.accept.RequestedContentTypeResolver; import org.springframework.web.reactive.accept.RequestedContentTypeResolverBuilder; import static org.assertj.core.api.Assertions.assertThat; -import static org.springframework.web.method.ResolvableMethod.on; +import static org.springframework.web.testfixture.method.ResolvableMethod.on; /** * Unit tests for {@link ResponseBodyResultHandler}.When adding a test also diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/ResponseEntityResultHandlerTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/ResponseEntityResultHandlerTests.java index 86b92d67cff..a000cf08587 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/ResponseEntityResultHandlerTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/ResponseEntityResultHandlerTests.java @@ -52,20 +52,20 @@ import org.springframework.http.codec.ResourceHttpMessageWriter; import org.springframework.http.codec.json.Jackson2JsonEncoder; import org.springframework.http.codec.xml.Jaxb2XmlEncoder; import org.springframework.http.converter.HttpMessageNotWritableException; -import org.springframework.mock.web.test.server.MockServerWebExchange; import org.springframework.util.ObjectUtils; import org.springframework.web.reactive.HandlerResult; import org.springframework.web.reactive.accept.RequestedContentTypeResolver; import org.springframework.web.reactive.accept.RequestedContentTypeResolverBuilder; +import org.springframework.web.testfixture.server.MockServerWebExchange; import static org.assertj.core.api.Assertions.assertThat; import static org.springframework.core.ResolvableType.forClassWithGenerics; import static org.springframework.http.MediaType.APPLICATION_JSON; import static org.springframework.http.ResponseEntity.notFound; import static org.springframework.http.ResponseEntity.ok; -import static org.springframework.mock.http.server.reactive.test.MockServerHttpRequest.get; -import static org.springframework.web.method.ResolvableMethod.on; import static org.springframework.web.reactive.HandlerMapping.PRODUCIBLE_MEDIA_TYPES_ATTRIBUTE; +import static org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest.get; +import static org.springframework.web.testfixture.method.ResolvableMethod.on; /** * Unit tests for {@link ResponseEntityResultHandler}. When adding a test also diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/ServerWebExchangeMethodArgumentResolverTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/ServerWebExchangeMethodArgumentResolverTests.java index 83dc3d2ffba..7f0539fbbca 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/ServerWebExchangeMethodArgumentResolverTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/ServerWebExchangeMethodArgumentResolverTests.java @@ -28,12 +28,12 @@ import org.springframework.core.ReactiveAdapterRegistry; import org.springframework.http.HttpMethod; import org.springframework.http.server.reactive.ServerHttpRequest; import org.springframework.http.server.reactive.ServerHttpResponse; -import org.springframework.mock.http.server.reactive.test.MockServerHttpRequest; -import org.springframework.mock.web.test.server.MockServerWebExchange; -import org.springframework.web.method.ResolvableMethod; import org.springframework.web.reactive.BindingContext; import org.springframework.web.server.ServerWebExchange; import org.springframework.web.server.WebSession; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest; +import org.springframework.web.testfixture.method.ResolvableMethod; +import org.springframework.web.testfixture.server.MockServerWebExchange; import org.springframework.web.util.UriBuilder; import org.springframework.web.util.UriComponentsBuilder; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/SessionAttributeMethodArgumentResolverTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/SessionAttributeMethodArgumentResolverTests.java index 26215d43832..09bb53bfce4 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/SessionAttributeMethodArgumentResolverTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/SessionAttributeMethodArgumentResolverTests.java @@ -30,8 +30,6 @@ import org.springframework.core.MethodParameter; import org.springframework.core.ReactiveAdapterRegistry; import org.springframework.core.annotation.SynthesizingMethodParameter; import org.springframework.format.support.DefaultFormattingConversionService; -import org.springframework.mock.http.server.reactive.test.MockServerHttpRequest; -import org.springframework.mock.web.test.server.MockServerWebExchange; import org.springframework.util.ReflectionUtils; import org.springframework.web.bind.annotation.SessionAttribute; import org.springframework.web.bind.support.ConfigurableWebBindingInitializer; @@ -39,6 +37,8 @@ import org.springframework.web.reactive.BindingContext; import org.springframework.web.server.ServerWebExchange; import org.springframework.web.server.ServerWebInputException; import org.springframework.web.server.WebSession; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest; +import org.springframework.web.testfixture.server.MockServerWebExchange; import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.BDDMockito.given; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/SessionAttributesHandlerTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/SessionAttributesHandlerTests.java index d0fd055ce50..9afbe8b9620 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/SessionAttributesHandlerTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/SessionAttributesHandlerTests.java @@ -22,10 +22,10 @@ import java.util.HashSet; import org.junit.jupiter.api.Test; import org.springframework.beans.testfixture.beans.TestBean; -import org.springframework.mock.web.test.server.MockWebSession; import org.springframework.ui.ModelMap; import org.springframework.web.bind.annotation.SessionAttributes; import org.springframework.web.server.WebSession; +import org.springframework.web.testfixture.server.MockWebSession; import static java.util.Arrays.asList; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/SseIntegrationTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/SseIntegrationTests.java index 9d545d6ab1a..b83e8f3b46c 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/SseIntegrationTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/SseIntegrationTests.java @@ -37,13 +37,7 @@ import org.springframework.http.client.reactive.ClientHttpConnector; import org.springframework.http.client.reactive.JettyClientHttpConnector; import org.springframework.http.client.reactive.ReactorClientHttpConnector; import org.springframework.http.codec.ServerSentEvent; -import org.springframework.http.server.reactive.AbstractHttpHandlerIntegrationTests; import org.springframework.http.server.reactive.HttpHandler; -import org.springframework.http.server.reactive.bootstrap.HttpServer; -import org.springframework.http.server.reactive.bootstrap.JettyHttpServer; -import org.springframework.http.server.reactive.bootstrap.ReactorHttpServer; -import org.springframework.http.server.reactive.bootstrap.TomcatHttpServer; -import org.springframework.http.server.reactive.bootstrap.UndertowHttpServer; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @@ -51,6 +45,12 @@ import org.springframework.web.reactive.DispatcherHandler; import org.springframework.web.reactive.config.EnableWebFlux; import org.springframework.web.reactive.function.client.WebClient; import org.springframework.web.server.adapter.WebHttpHandlerBuilder; +import org.springframework.web.testfixture.http.server.reactive.bootstrap.AbstractHttpHandlerIntegrationTests; +import org.springframework.web.testfixture.http.server.reactive.bootstrap.HttpServer; +import org.springframework.web.testfixture.http.server.reactive.bootstrap.JettyHttpServer; +import org.springframework.web.testfixture.http.server.reactive.bootstrap.ReactorHttpServer; +import org.springframework.web.testfixture.http.server.reactive.bootstrap.TomcatHttpServer; +import org.springframework.web.testfixture.http.server.reactive.bootstrap.UndertowHttpServer; import static org.assertj.core.api.Assertions.assertThat; import static org.junit.jupiter.api.Assumptions.assumeTrue; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/WebSessionMethodArgumentResolverTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/WebSessionMethodArgumentResolverTests.java index 60543892666..96796f93947 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/WebSessionMethodArgumentResolverTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/annotation/WebSessionMethodArgumentResolverTests.java @@ -21,12 +21,12 @@ import reactor.core.publisher.Mono; import org.springframework.core.MethodParameter; import org.springframework.core.ReactiveAdapterRegistry; -import org.springframework.mock.http.server.reactive.test.MockServerHttpRequest; -import org.springframework.mock.web.test.server.MockServerWebExchange; -import org.springframework.web.method.ResolvableMethod; import org.springframework.web.reactive.BindingContext; import org.springframework.web.server.ServerWebExchange; import org.springframework.web.server.WebSession; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest; +import org.springframework.web.testfixture.method.ResolvableMethod; +import org.springframework.web.testfixture.server.MockServerWebExchange; import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/view/AbstractViewTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/view/AbstractViewTests.java index 6e3717fb7ef..0d494966867 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/view/AbstractViewTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/view/AbstractViewTests.java @@ -31,11 +31,11 @@ import reactor.test.StepVerifier; import org.springframework.beans.testfixture.beans.TestBean; import org.springframework.http.MediaType; import org.springframework.lang.Nullable; -import org.springframework.mock.http.server.reactive.test.MockServerHttpRequest; -import org.springframework.mock.web.test.server.MockServerWebExchange; import org.springframework.validation.BindingResult; import org.springframework.web.reactive.BindingContext; import org.springframework.web.server.ServerWebExchange; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest; +import org.springframework.web.testfixture.server.MockServerWebExchange; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/view/HttpMessageWriterViewTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/view/HttpMessageWriterViewTests.java index e44647d0897..b75a214c300 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/view/HttpMessageWriterViewTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/view/HttpMessageWriterViewTests.java @@ -33,10 +33,10 @@ import org.springframework.core.testfixture.io.buffer.DataBufferTestUtils; import org.springframework.http.MediaType; import org.springframework.http.codec.json.Jackson2JsonEncoder; import org.springframework.http.codec.xml.Jaxb2XmlEncoder; -import org.springframework.mock.http.server.reactive.test.MockServerHttpRequest; -import org.springframework.mock.web.test.server.MockServerWebExchange; import org.springframework.ui.ExtendedModelMap; import org.springframework.ui.ModelMap; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest; +import org.springframework.web.testfixture.server.MockServerWebExchange; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatIllegalStateException; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/view/LocaleContextResolverIntegrationTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/view/LocaleContextResolverIntegrationTests.java index f2d07209822..b21b68cd5b7 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/view/LocaleContextResolverIntegrationTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/view/LocaleContextResolverIntegrationTests.java @@ -30,7 +30,6 @@ import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; -import org.springframework.http.server.reactive.bootstrap.HttpServer; import org.springframework.lang.Nullable; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.GetMapping; @@ -42,6 +41,7 @@ import org.springframework.web.reactive.result.method.annotation.AbstractRequest import org.springframework.web.server.ServerWebExchange; import org.springframework.web.server.i18n.FixedLocaleContextResolver; import org.springframework.web.server.i18n.LocaleContextResolver; +import org.springframework.web.testfixture.http.server.reactive.bootstrap.HttpServer; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/view/RedirectViewTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/view/RedirectViewTests.java index 35e57892ca8..db20e2e00a8 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/view/RedirectViewTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/view/RedirectViewTests.java @@ -26,9 +26,9 @@ import org.junit.jupiter.api.Test; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; -import org.springframework.mock.http.server.reactive.test.MockServerHttpRequest; -import org.springframework.mock.web.test.server.MockServerWebExchange; import org.springframework.web.reactive.HandlerMapping; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest; +import org.springframework.web.testfixture.server.MockServerWebExchange; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/view/RequestContextTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/view/RequestContextTests.java index 3ed184f6bc9..0146f192e89 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/view/RequestContextTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/view/RequestContextTests.java @@ -23,8 +23,8 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.springframework.context.support.GenericApplicationContext; -import org.springframework.mock.http.server.reactive.test.MockServerHttpRequest; -import org.springframework.mock.web.test.server.MockServerWebExchange; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest; +import org.springframework.web.testfixture.server.MockServerWebExchange; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/view/ViewResolutionResultHandlerTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/view/ViewResolutionResultHandlerTests.java index 72e1f392ec8..669bf2ef599 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/view/ViewResolutionResultHandlerTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/view/ViewResolutionResultHandlerTests.java @@ -43,8 +43,6 @@ import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.server.reactive.ServerHttpResponse; import org.springframework.lang.Nullable; -import org.springframework.mock.http.server.reactive.test.MockServerHttpResponse; -import org.springframework.mock.web.test.server.MockServerWebExchange; import org.springframework.ui.ConcurrentModel; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.ModelAttribute; @@ -54,13 +52,15 @@ import org.springframework.web.reactive.accept.HeaderContentTypeResolver; import org.springframework.web.reactive.accept.RequestedContentTypeResolver; import org.springframework.web.server.NotAcceptableStatusException; import org.springframework.web.server.ServerWebExchange; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpResponse; +import org.springframework.web.testfixture.server.MockServerWebExchange; import static java.nio.charset.StandardCharsets.UTF_8; import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.springframework.http.MediaType.APPLICATION_JSON; -import static org.springframework.mock.http.server.reactive.test.MockServerHttpRequest.get; -import static org.springframework.web.method.ResolvableMethod.on; +import static org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest.get; +import static org.springframework.web.testfixture.method.ResolvableMethod.on; /** * ViewResolutionResultHandler relying on a canned {@link TestViewResolver} diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/view/freemarker/FreeMarkerMacroTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/view/freemarker/FreeMarkerMacroTests.java index e660183ff55..ad50b9658cb 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/view/freemarker/FreeMarkerMacroTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/view/freemarker/FreeMarkerMacroTests.java @@ -34,8 +34,6 @@ import org.springframework.context.support.GenericApplicationContext; import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.FileSystemResource; import org.springframework.http.MediaType; -import org.springframework.mock.http.server.reactive.test.MockServerHttpRequest; -import org.springframework.mock.web.test.server.MockServerWebExchange; import org.springframework.ui.ExtendedModelMap; import org.springframework.ui.ModelMap; import org.springframework.util.FileCopyUtils; @@ -44,6 +42,8 @@ import org.springframework.web.reactive.result.view.BindStatus; import org.springframework.web.reactive.result.view.DummyMacroRequestContext; import org.springframework.web.reactive.result.view.RequestContext; import org.springframework.web.server.ServerWebExchange; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest; +import org.springframework.web.testfixture.server.MockServerWebExchange; import static java.util.Collections.singletonMap; import static java.util.stream.Collectors.toList; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/view/freemarker/FreeMarkerViewTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/view/freemarker/FreeMarkerViewTests.java index 6feddbd5695..54d8f805232 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/view/freemarker/FreeMarkerViewTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/view/freemarker/FreeMarkerViewTests.java @@ -30,8 +30,6 @@ import org.springframework.context.ApplicationContextException; import org.springframework.context.support.GenericApplicationContext; import org.springframework.core.io.buffer.DataBuffer; import org.springframework.http.codec.ServerCodecConfigurer; -import org.springframework.mock.http.server.reactive.test.MockServerHttpRequest; -import org.springframework.mock.web.test.server.MockServerWebExchange; import org.springframework.ui.ExtendedModelMap; import org.springframework.ui.ModelMap; import org.springframework.web.reactive.result.view.ZeroDemandResponse; @@ -39,6 +37,8 @@ import org.springframework.web.server.ServerWebExchange; import org.springframework.web.server.adapter.DefaultServerWebExchange; import org.springframework.web.server.i18n.AcceptHeaderLocaleContextResolver; import org.springframework.web.server.session.DefaultWebSessionManager; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest; +import org.springframework.web.testfixture.server.MockServerWebExchange; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/view/script/JRubyScriptTemplateTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/view/script/JRubyScriptTemplateTests.java index 6fa014884f8..0687038d144 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/view/script/JRubyScriptTemplateTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/view/script/JRubyScriptTemplateTests.java @@ -26,9 +26,9 @@ import org.springframework.context.annotation.AnnotationConfigApplicationContext import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.http.MediaType; -import org.springframework.mock.http.server.reactive.test.MockServerHttpRequest; -import org.springframework.mock.http.server.reactive.test.MockServerHttpResponse; -import org.springframework.mock.web.test.server.MockServerWebExchange; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpResponse; +import org.springframework.web.testfixture.server.MockServerWebExchange; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/view/script/JythonScriptTemplateTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/view/script/JythonScriptTemplateTests.java index 6a29ef0643a..579c4e9dd00 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/view/script/JythonScriptTemplateTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/view/script/JythonScriptTemplateTests.java @@ -25,9 +25,9 @@ import org.springframework.context.annotation.AnnotationConfigApplicationContext import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.http.MediaType; -import org.springframework.mock.http.server.reactive.test.MockServerHttpRequest; -import org.springframework.mock.http.server.reactive.test.MockServerHttpResponse; -import org.springframework.mock.web.test.server.MockServerWebExchange; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpResponse; +import org.springframework.web.testfixture.server.MockServerWebExchange; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/view/script/KotlinScriptTemplateTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/view/script/KotlinScriptTemplateTests.java index 3ceab25891f..9ae7aa12554 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/view/script/KotlinScriptTemplateTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/view/script/KotlinScriptTemplateTests.java @@ -27,9 +27,9 @@ import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.support.ResourceBundleMessageSource; import org.springframework.http.MediaType; -import org.springframework.mock.http.server.reactive.test.MockServerHttpRequest; -import org.springframework.mock.http.server.reactive.test.MockServerHttpResponse; -import org.springframework.mock.web.test.server.MockServerWebExchange; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpResponse; +import org.springframework.web.testfixture.server.MockServerWebExchange; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/view/script/NashornScriptTemplateTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/view/script/NashornScriptTemplateTests.java index b57138fea0c..126e1c2f94c 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/view/script/NashornScriptTemplateTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/view/script/NashornScriptTemplateTests.java @@ -26,14 +26,14 @@ import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.http.MediaType; import org.springframework.http.codec.ServerCodecConfigurer; -import org.springframework.mock.http.server.reactive.test.MockServerHttpRequest; -import org.springframework.mock.http.server.reactive.test.MockServerHttpResponse; -import org.springframework.mock.web.test.server.MockServerWebExchange; import org.springframework.web.reactive.result.view.ZeroDemandResponse; import org.springframework.web.server.ServerWebExchange; import org.springframework.web.server.adapter.DefaultServerWebExchange; import org.springframework.web.server.i18n.AcceptHeaderLocaleContextResolver; import org.springframework.web.server.session.DefaultWebSessionManager; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpResponse; +import org.springframework.web.testfixture.server.MockServerWebExchange; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/socket/AbstractWebSocketIntegrationTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/socket/AbstractWebSocketIntegrationTests.java index ffc85cf04b3..02f8a6593de 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/socket/AbstractWebSocketIntegrationTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/socket/AbstractWebSocketIntegrationTests.java @@ -44,11 +44,6 @@ import org.springframework.context.annotation.AnnotationConfigApplicationContext import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.http.server.reactive.HttpHandler; -import org.springframework.http.server.reactive.bootstrap.HttpServer; -import org.springframework.http.server.reactive.bootstrap.JettyHttpServer; -import org.springframework.http.server.reactive.bootstrap.ReactorHttpServer; -import org.springframework.http.server.reactive.bootstrap.TomcatHttpServer; -import org.springframework.http.server.reactive.bootstrap.UndertowHttpServer; import org.springframework.web.reactive.DispatcherHandler; import org.springframework.web.reactive.socket.client.JettyWebSocketClient; import org.springframework.web.reactive.socket.client.ReactorNettyWebSocketClient; @@ -64,6 +59,11 @@ import org.springframework.web.reactive.socket.server.upgrade.ReactorNettyReques import org.springframework.web.reactive.socket.server.upgrade.TomcatRequestUpgradeStrategy; import org.springframework.web.reactive.socket.server.upgrade.UndertowRequestUpgradeStrategy; import org.springframework.web.server.adapter.WebHttpHandlerBuilder; +import org.springframework.web.testfixture.http.server.reactive.bootstrap.HttpServer; +import org.springframework.web.testfixture.http.server.reactive.bootstrap.JettyHttpServer; +import org.springframework.web.testfixture.http.server.reactive.bootstrap.ReactorHttpServer; +import org.springframework.web.testfixture.http.server.reactive.bootstrap.TomcatHttpServer; +import org.springframework.web.testfixture.http.server.reactive.bootstrap.UndertowHttpServer; /** * Base class for WebSocket integration tests. Sub-classes must implement diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/socket/WebSocketIntegrationTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/socket/WebSocketIntegrationTests.java index a8cabe0bf39..0e970b49658 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/socket/WebSocketIntegrationTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/socket/WebSocketIntegrationTests.java @@ -33,10 +33,10 @@ import reactor.core.publisher.ReplayProcessor; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.http.HttpHeaders; -import org.springframework.http.server.reactive.bootstrap.HttpServer; import org.springframework.web.reactive.HandlerMapping; import org.springframework.web.reactive.handler.SimpleUrlHandlerMapping; import org.springframework.web.reactive.socket.client.WebSocketClient; +import org.springframework.web.testfixture.http.server.reactive.bootstrap.HttpServer; import static org.assertj.core.api.Assertions.assertThat; diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/socket/server/support/HandshakeWebSocketServiceTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/socket/server/support/HandshakeWebSocketServiceTests.java index 28b143dc8f8..b4633dec117 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/socket/server/support/HandshakeWebSocketServiceTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/socket/server/support/HandshakeWebSocketServiceTests.java @@ -24,13 +24,13 @@ import org.junit.jupiter.api.Test; import reactor.core.publisher.Mono; import org.springframework.lang.Nullable; -import org.springframework.mock.http.server.reactive.test.MockServerHttpRequest; -import org.springframework.mock.web.test.server.MockServerWebExchange; -import org.springframework.mock.web.test.server.MockWebSession; import org.springframework.web.reactive.socket.HandshakeInfo; import org.springframework.web.reactive.socket.WebSocketHandler; import org.springframework.web.reactive.socket.server.RequestUpgradeStrategy; import org.springframework.web.server.ServerWebExchange; +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest; +import org.springframework.web.testfixture.server.MockServerWebExchange; +import org.springframework.web.testfixture.server.MockWebSession; import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; diff --git a/spring-webflux/src/test/kotlin/org/springframework/web/reactive/result/KotlinInvocableHandlerMethodTests.kt b/spring-webflux/src/test/kotlin/org/springframework/web/reactive/result/KotlinInvocableHandlerMethodTests.kt index 4ab2dc39326..8589ddc570f 100644 --- a/spring-webflux/src/test/kotlin/org/springframework/web/reactive/result/KotlinInvocableHandlerMethodTests.kt +++ b/spring-webflux/src/test/kotlin/org/springframework/web/reactive/result/KotlinInvocableHandlerMethodTests.kt @@ -23,8 +23,8 @@ import org.assertj.core.api.Assertions.assertThat import org.junit.jupiter.api.Test import org.springframework.http.HttpStatus import org.springframework.http.server.reactive.ServerHttpResponse -import org.springframework.mock.http.server.reactive.test.MockServerHttpRequest.get -import org.springframework.mock.web.test.server.MockServerWebExchange +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest.get +import org.springframework.web.testfixture.server.MockServerWebExchange import org.springframework.web.bind.annotation.ResponseStatus import org.springframework.web.reactive.BindingContext import org.springframework.web.reactive.HandlerResult diff --git a/spring-webflux/src/test/kotlin/org/springframework/web/reactive/result/method/annotation/CoroutinesIntegrationTests.kt b/spring-webflux/src/test/kotlin/org/springframework/web/reactive/result/method/annotation/CoroutinesIntegrationTests.kt index 369aa06fd89..af2502c09f8 100644 --- a/spring-webflux/src/test/kotlin/org/springframework/web/reactive/result/method/annotation/CoroutinesIntegrationTests.kt +++ b/spring-webflux/src/test/kotlin/org/springframework/web/reactive/result/method/annotation/CoroutinesIntegrationTests.kt @@ -29,7 +29,7 @@ import org.springframework.context.annotation.ComponentScan import org.springframework.context.annotation.Configuration import org.springframework.http.HttpHeaders import org.springframework.http.HttpStatus -import org.springframework.http.server.reactive.bootstrap.HttpServer +import org.springframework.web.testfixture.http.server.reactive.bootstrap.HttpServer import org.springframework.web.bind.annotation.GetMapping import org.springframework.web.bind.annotation.RestController import org.springframework.web.client.HttpServerErrorException diff --git a/spring-webflux/src/test/kotlin/org/springframework/web/reactive/result/method/annotation/RequestParamMethodArgumentResolverKotlinTests.kt b/spring-webflux/src/test/kotlin/org/springframework/web/reactive/result/method/annotation/RequestParamMethodArgumentResolverKotlinTests.kt index 086372c6375..73c4def5349 100644 --- a/spring-webflux/src/test/kotlin/org/springframework/web/reactive/result/method/annotation/RequestParamMethodArgumentResolverKotlinTests.kt +++ b/spring-webflux/src/test/kotlin/org/springframework/web/reactive/result/method/annotation/RequestParamMethodArgumentResolverKotlinTests.kt @@ -22,8 +22,8 @@ import org.springframework.core.MethodParameter import org.springframework.core.ReactiveAdapterRegistry import org.springframework.core.annotation.SynthesizingMethodParameter import org.springframework.format.support.DefaultFormattingConversionService -import org.springframework.mock.http.server.reactive.test.MockServerHttpRequest -import org.springframework.mock.web.test.server.MockServerWebExchange +import org.springframework.web.testfixture.http.server.reactive.MockServerHttpRequest +import org.springframework.web.testfixture.server.MockServerWebExchange import org.springframework.util.ReflectionUtils import org.springframework.web.bind.annotation.RequestParam import org.springframework.web.bind.support.ConfigurableWebBindingInitializer diff --git a/spring-webflux/src/test/resources/org/springframework/web/reactive/spring.png b/spring-webflux/src/test/resources/org/springframework/web/reactive/spring.png new file mode 100644 index 0000000000000000000000000000000000000000..2fec781a5e31ff09dd56ed4e01c1ee1927c67b2b GIT binary patch literal 951 zcmV;o14#UdP)R$ekqBST9o%}ZHk zR|8$mS|QMuiXyr^6htK5e2BCQVxInInzd=2ot<&DorU?}_i|=t=XZ|Z`OcZ6kB=UD z=%I%mDx%|IP@y-=Zvq4ac%ytI=odP$&fDap!FNHPQtB<@<3I)&6v58hJXJk2N4I=A{zxnc%9YW!vscwtsRZ zZvd}6E#J~*AoX{QQr8CLXbs$*_ z@@=*t5?^HEQ%G?Kgk}7*r{%3+a~VgnF0gX<^-FbNqZUSg_c@kC=bK5pP4>QSsSaHC zw0wFEOG5Vrlj>HZt9xxy9r)-eaaw6o&Tu3oGnnj`PaQjTj`Dt$whjMHoQm$M{F5@21e8omm*VI9z$B?T z&^P8K61iS{jTsts%GzV9ah7A@i3IiT(pniHy_Du;wFL@?n+qhHN-t;zh;c6uL;&v>8YG`;o4;(TiQ3 z2+(|`l2sNXIevp7hc2=twTk0QVMMlhn6P-%_tvtmR#-XCEByjn1i80#Czx`U<3}>4 zz|6}@ji@U^gH-%w)?+ZZP{I`vbehUexa% z1xJ8t`2dRO*{GsihuB=uE0TX=zqYNMYl=H+`hq-eKGMh}3Hzl9PA2{gz<@9i54M9G zP$8UbScP Date: Tue, 31 Dec 2019 15:40:16 +0100 Subject: [PATCH 12/13] Delete obsolete TestSourcesPlugin Since we have migrated to Gradle's built-in test fixture support, the custom TestSourcesPlugin Gradle plugin is now obsolete. See gh-23550 --- buildSrc/README.md | 16 +-- buildSrc/build.gradle | 4 - .../build/testsources/TestSourcesPlugin.java | 130 ------------------ gradle/spring-module.gradle | 1 - integration-tests/integration-tests.gradle | 2 - 5 files changed, 5 insertions(+), 148 deletions(-) delete mode 100644 buildSrc/src/main/java/org/springframework/build/testsources/TestSourcesPlugin.java diff --git a/buildSrc/README.md b/buildSrc/README.md index 7c722a36273..30486631ccd 100644 --- a/buildSrc/README.md +++ b/buildSrc/README.md @@ -1,4 +1,4 @@ -# Spring Framework build +# Spring Framework Build This folder contains the custom plugins and conventions for the Spring Framework build. They are declared in the `build.gradle` file in this folder. @@ -7,8 +7,8 @@ They are declared in the `build.gradle` file in this folder. ### Compiler conventions -The `org.springframework.build.compile` applies the Java compiler conventions to the build. -By default, the build is compiling sources with the `1.8` source and target compatibility. +The `org.springframework.build.compile` plubin applies the Java compiler conventions to the build. +By default, the build compiles sources with Java `1.8` source and target compatibility. You can test a different source compatibility version on the CLI with a project property like: ``` @@ -25,17 +25,11 @@ but doesn't affect the classpath of dependent projects. This plugin does not provide a `provided` configuration, as the native `compileOnly` and `testCompileOnly` configurations are preferred. -## Test sources - -The `org.springframework.build.test-sources` updates `testCompile` dependencies to include -the test source sets of `project()` dependencies. This plugin is used in the Spring Framework build -to share test utilities and fixtures amongst modules. - ## API Diff This plugin uses the [Gradle JApiCmp](https://github.com/melix/japicmp-gradle-plugin) plugin to generate API Diff reports for each Spring Framework module. This plugin is applied once on the root -project and create tasks in each framework module. Unlike previous versions of this part of the build, +project and creates tasks in each framework module. Unlike previous versions of this part of the build, there is no need for checking out a specific tag. The plugin will fetch the JARs we want to compare the current working version with. You can generate the reports for all modules or a single module: @@ -44,4 +38,4 @@ current working version with. You can generate the reports for all modules or a ./gradlew :spring-core:apiDiff -PbaselineVersion=5.1.0.RELEASE ``` -The reports are located under `build/reports/api-diff/$OLDVERSION_to_$NEWVERSION/`. \ No newline at end of file +The reports are located under `build/reports/api-diff/$OLDVERSION_to_$NEWVERSION/`. diff --git a/buildSrc/build.gradle b/buildSrc/build.gradle index 1aed5f6e78a..1dfc3d995ab 100644 --- a/buildSrc/build.gradle +++ b/buildSrc/build.gradle @@ -26,9 +26,5 @@ gradlePlugin { id = "org.springframework.build.optional-dependencies" implementationClass = "org.springframework.build.optional.OptionalDependenciesPlugin" } - testSourcesPlugin { - id = "org.springframework.build.test-sources" - implementationClass = "org.springframework.build.testsources.TestSourcesPlugin" - } } } diff --git a/buildSrc/src/main/java/org/springframework/build/testsources/TestSourcesPlugin.java b/buildSrc/src/main/java/org/springframework/build/testsources/TestSourcesPlugin.java deleted file mode 100644 index b05e08214c3..00000000000 --- a/buildSrc/src/main/java/org/springframework/build/testsources/TestSourcesPlugin.java +++ /dev/null @@ -1,130 +0,0 @@ -/* - * Copyright 2002-2019 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. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.springframework.build.testsources; - -import java.util.Arrays; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Set; - -import org.gradle.api.Plugin; -import org.gradle.api.Project; -import org.gradle.api.artifacts.Configuration; -import org.gradle.api.artifacts.ProjectDependency; -import org.gradle.api.plugins.JavaPlugin; -import org.gradle.api.plugins.JavaPluginConvention; -import org.gradle.api.tasks.SourceSet; -import org.gradle.api.tasks.SourceSetOutput; - -import org.springframework.build.optional.OptionalDependenciesPlugin; - -/** - * {@link Plugin} that automatically updates testCompile dependencies to include - * the test source sets of {@code project()} dependencies. - * - *

This plugin is used in the Spring Framework build to share test utilities and fixtures - * between projects. - * - * @author Phillip Webb - * @author Brian Clozel - */ -public class TestSourcesPlugin implements Plugin { - - /** - * List of configurations this plugin should look for project dependencies in. - */ - @SuppressWarnings("deprecation") - private static final List CONFIGURATIONS = Arrays.asList( - JavaPlugin.COMPILE_CONFIGURATION_NAME, - JavaPlugin.API_CONFIGURATION_NAME, - JavaPlugin.IMPLEMENTATION_CONFIGURATION_NAME, - OptionalDependenciesPlugin.OPTIONAL_CONFIGURATION_NAME, - JavaPlugin.TEST_COMPILE_CONFIGURATION_NAME); - - /** - * Projects which will not be automatically added as a test dependency. - *

This is used to assist with the migration to Gradle test fixtures. - */ - private static final List excludedProjects = Arrays.asList( - "integration-tests", - "kotlin-coroutines", - "spring-aop", - "spring-aspects", - "spring-beans", - "spring-context", - "spring-context-indexer", - "spring-context-support", - "spring-core", - "spring-expression", - "spring-instrument", - "spring-jcl", - "spring-jdbc", - "spring-jms", - "spring-messaging", - "spring-orm", - "spring-oxm", - // "spring-test", - "spring-tx", - "spring-web", - "spring-webflux", - // "spring-webmvc", - "spring-websocket" - ); - - - @Override - public void apply(Project project) { - project.getPlugins().withType(JavaPlugin.class, plugin -> addTestSourcesToProject(project)); - } - - private void addTestSourcesToProject(Project project) { - project.afterEvaluate(currentProject -> { - Set projectDependencies = new LinkedHashSet<>(); - collectProjectDependencies(projectDependencies, project); - projectDependencies.forEach(dep -> addTestSourcesFromDependency(currentProject, dep)); - }); - } - - private void collectProjectDependencies(Set projectDependencies, Project project) { - for (String configurationName : CONFIGURATIONS) { - Configuration configuration = project.getConfigurations().findByName(configurationName); - if (configuration != null) { - configuration.getDependencies().forEach(dependency -> { - if (dependency instanceof ProjectDependency) { - ProjectDependency projectDependency = (ProjectDependency) dependency; - projectDependencies.add(projectDependency); - collectProjectDependencies(projectDependencies, projectDependency.getDependencyProject()); - } - }); - } - } - } - - @SuppressWarnings("deprecation") - private void addTestSourcesFromDependency(Project currentProject, ProjectDependency dependency) { - Project dependencyProject = dependency.getDependencyProject(); - if (!excludedProjects.contains(dependencyProject.getName())) { - dependencyProject.getPlugins().withType(JavaPlugin.class, plugin -> { - JavaPluginConvention javaPlugin = dependencyProject.getConvention().getPlugin(JavaPluginConvention.class); - SourceSetOutput test = javaPlugin.getSourceSets().findByName(SourceSet.TEST_SOURCE_SET_NAME).getOutput(); - System.err.println(String.format("Adding test source dependencies from %s to %s", currentProject.getName(), dependencyProject.getName())); - currentProject.getDependencies().add(JavaPlugin.TEST_COMPILE_CONFIGURATION_NAME, test); - }); - } - } - -} diff --git a/gradle/spring-module.gradle b/gradle/spring-module.gradle index c70263e18c0..ad6ed3168f1 100644 --- a/gradle/spring-module.gradle +++ b/gradle/spring-module.gradle @@ -1,6 +1,5 @@ apply plugin: 'org.springframework.build.compile' apply plugin: 'org.springframework.build.optional-dependencies' -apply plugin: 'org.springframework.build.test-sources' apply from: "$rootDir/gradle/publications.gradle" jar { diff --git a/integration-tests/integration-tests.gradle b/integration-tests/integration-tests.gradle index 5e18462c1e8..71e23b90604 100644 --- a/integration-tests/integration-tests.gradle +++ b/integration-tests/integration-tests.gradle @@ -1,7 +1,5 @@ description = "Spring Integration Tests" -apply plugin: "org.springframework.build.test-sources" - dependencies { testCompile(project(":spring-aop")) testCompile(project(":spring-beans")) From d5f0bb23aed29578cb45653f14d291d1bfe291e7 Mon Sep 17 00:00:00 2001 From: Sam Brannen Date: Thu, 2 Jan 2020 15:21:40 +0100 Subject: [PATCH 13/13] Disable publication of test fixture artifacts Thanks to @melix for providing the code snippet necessary to achieve this with Gradle 5.6.x. See gh-23550 --- gradle/spring-module.gradle | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/gradle/spring-module.gradle b/gradle/spring-module.gradle index ad6ed3168f1..5c513b976e3 100644 --- a/gradle/spring-module.gradle +++ b/gradle/spring-module.gradle @@ -55,6 +55,14 @@ task javadocJar(type: Jar) { publishing { publications { mavenJava(MavenPublication) { + // Disable publication of test fixture artifacts. + // + // Once we upgrade to Gradle 6.x, we will need to delete the following line ... + components.java.variants.removeAll { it.outgoingConfiguration.name.startsWith("testFixtures") } + // ... and uncomment the following two lines. + // components.java.withVariantsFromConfiguration(configurations.testFixturesApiElements) { skip() } + // components.java.withVariantsFromConfiguration(configurations.testFixturesRuntimeElements) { skip() } + from components.java artifact sourcesJar artifact javadocJar