From 61d4ee594d38b2b6e793c4ae21e036a6d5ad8d86 Mon Sep 17 00:00:00 2001 From: Sam Brannen Date: Sat, 28 Dec 2019 17:13:39 +0100 Subject: [PATCH] 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 +- .../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 + .../springframework/context/ACATester.java | 49 - .../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/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-context/src/{test/java/org/springframework/context => 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/ACATester.java 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/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-context/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-context/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-context/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/ACATester.java b/spring-webmvc/src/test/java/org/springframework/context/ACATester.java deleted file mode 100644 index fb179bfe58e..00000000000 --- a/spring-webmvc/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-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