From fc7855123af8465d21e41b3e94d746792fc22ce7 Mon Sep 17 00:00:00 2001 From: Chris Beams Date: Sun, 14 Dec 2008 20:13:56 +0000 Subject: [PATCH] moving unit tests from .testsuite -> .context git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@411 50f2f4bb-b051-0410-bef5-90022cba6387 --- .../beans/factory/config/SimpleMapScope.java | 82 +++++++++++++++++++ ...ScanParserBeanDefinitionDefaultsTests.java | 22 ++++- .../ComponentScanParserScopedProxyTests.java | 10 ++- .../annotation/ComponentScanParserTests.java | 14 +++- ...nParserWithUserDefinedStrategiesTests.java | 10 ++- .../annotation/TestBeanNameGenerator.java | 0 .../annotation/TestScopeMetadataResolver.java | 0 .../annotation/aspectjTypeFilterTests.xml | 0 ...mponentScanWithAutowiredQualifierTests.xml | 0 ...dForBothComponentScanAndQualifierTests.xml | 0 .../annotation/customNameGeneratorTests.xml | 0 .../annotation/customScopeResolverTests.xml | 0 .../annotation/customTypeFilterTests.xml | 0 .../annotation/defaultAutowireByNameTests.xml | 0 .../annotation/defaultAutowireByTypeTests.xml | 0 .../defaultAutowireConstructorTests.xml | 0 .../annotation/defaultAutowireNoTests.xml | 0 .../defaultDependencyCheckAllTests.xml | 0 ...ncyCheckObjectsWithAutowireByNameTests.xml | 0 .../defaultInitAndDestroyMethodsTests.xml | 0 .../annotation/defaultLazyInitFalseTests.xml | 0 .../annotation/defaultLazyInitTrueTests.xml | 0 ...tNonExistingInitAndDestroyMethodsTests.xml | 0 .../defaultWithNoOverridesTests.xml | 0 .../invalidClassNameScopeResolverTests.xml | 0 .../invalidConstructorNameGeneratorTests.xml | 0 .../matchingResourcePatternTests.xml | 0 .../nonMatchingResourcePatternTests.xml | 0 .../annotation/scopedProxyDefaultTests.xml | 0 .../annotation/scopedProxyInterfacesTests.xml | 0 .../scopedProxyInvalidConfigTests.xml | 0 .../context/annotation/scopedProxyNoTests.xml | 0 .../scopedProxyTargetClassTests.xml | 0 33 files changed, 129 insertions(+), 9 deletions(-) create mode 100644 org.springframework.context/src/test/java/org/springframework/beans/factory/config/SimpleMapScope.java rename {org.springframework.testsuite => org.springframework.context}/src/test/java/org/springframework/context/annotation/ComponentScanParserBeanDefinitionDefaultsTests.java (97%) rename {org.springframework.testsuite => org.springframework.context}/src/test/java/org/springframework/context/annotation/ComponentScanParserScopedProxyTests.java (95%) rename {org.springframework.testsuite => org.springframework.context}/src/test/java/org/springframework/context/annotation/ComponentScanParserTests.java (96%) rename {org.springframework.testsuite => org.springframework.context}/src/test/java/org/springframework/context/annotation/ComponentScanParserWithUserDefinedStrategiesTests.java (91%) rename {org.springframework.testsuite => org.springframework.context}/src/test/java/org/springframework/context/annotation/TestBeanNameGenerator.java (100%) rename {org.springframework.testsuite => org.springframework.context}/src/test/java/org/springframework/context/annotation/TestScopeMetadataResolver.java (100%) rename {org.springframework.testsuite => org.springframework.context}/src/test/java/org/springframework/context/annotation/aspectjTypeFilterTests.xml (100%) rename {org.springframework.testsuite => org.springframework.context}/src/test/java/org/springframework/context/annotation/componentScanWithAutowiredQualifierTests.xml (100%) rename {org.springframework.testsuite => org.springframework.context}/src/test/java/org/springframework/context/annotation/customAnnotationUsedForBothComponentScanAndQualifierTests.xml (100%) rename {org.springframework.testsuite => org.springframework.context}/src/test/java/org/springframework/context/annotation/customNameGeneratorTests.xml (100%) rename {org.springframework.testsuite => org.springframework.context}/src/test/java/org/springframework/context/annotation/customScopeResolverTests.xml (100%) rename {org.springframework.testsuite => org.springframework.context}/src/test/java/org/springframework/context/annotation/customTypeFilterTests.xml (100%) rename {org.springframework.testsuite => org.springframework.context}/src/test/java/org/springframework/context/annotation/defaultAutowireByNameTests.xml (100%) rename {org.springframework.testsuite => org.springframework.context}/src/test/java/org/springframework/context/annotation/defaultAutowireByTypeTests.xml (100%) rename {org.springframework.testsuite => org.springframework.context}/src/test/java/org/springframework/context/annotation/defaultAutowireConstructorTests.xml (100%) rename {org.springframework.testsuite => org.springframework.context}/src/test/java/org/springframework/context/annotation/defaultAutowireNoTests.xml (100%) rename {org.springframework.testsuite => org.springframework.context}/src/test/java/org/springframework/context/annotation/defaultDependencyCheckAllTests.xml (100%) rename {org.springframework.testsuite => org.springframework.context}/src/test/java/org/springframework/context/annotation/defaultDependencyCheckObjectsWithAutowireByNameTests.xml (100%) rename {org.springframework.testsuite => org.springframework.context}/src/test/java/org/springframework/context/annotation/defaultInitAndDestroyMethodsTests.xml (100%) rename {org.springframework.testsuite => org.springframework.context}/src/test/java/org/springframework/context/annotation/defaultLazyInitFalseTests.xml (100%) rename {org.springframework.testsuite => org.springframework.context}/src/test/java/org/springframework/context/annotation/defaultLazyInitTrueTests.xml (100%) rename {org.springframework.testsuite => org.springframework.context}/src/test/java/org/springframework/context/annotation/defaultNonExistingInitAndDestroyMethodsTests.xml (100%) rename {org.springframework.testsuite => org.springframework.context}/src/test/java/org/springframework/context/annotation/defaultWithNoOverridesTests.xml (100%) rename {org.springframework.testsuite => org.springframework.context}/src/test/java/org/springframework/context/annotation/invalidClassNameScopeResolverTests.xml (100%) rename {org.springframework.testsuite => org.springframework.context}/src/test/java/org/springframework/context/annotation/invalidConstructorNameGeneratorTests.xml (100%) rename {org.springframework.testsuite => org.springframework.context}/src/test/java/org/springframework/context/annotation/matchingResourcePatternTests.xml (100%) rename {org.springframework.testsuite => org.springframework.context}/src/test/java/org/springframework/context/annotation/nonMatchingResourcePatternTests.xml (100%) rename {org.springframework.testsuite => org.springframework.context}/src/test/java/org/springframework/context/annotation/scopedProxyDefaultTests.xml (100%) rename {org.springframework.testsuite => org.springframework.context}/src/test/java/org/springframework/context/annotation/scopedProxyInterfacesTests.xml (100%) rename {org.springframework.testsuite => org.springframework.context}/src/test/java/org/springframework/context/annotation/scopedProxyInvalidConfigTests.xml (100%) rename {org.springframework.testsuite => org.springframework.context}/src/test/java/org/springframework/context/annotation/scopedProxyNoTests.xml (100%) rename {org.springframework.testsuite => org.springframework.context}/src/test/java/org/springframework/context/annotation/scopedProxyTargetClassTests.xml (100%) diff --git a/org.springframework.context/src/test/java/org/springframework/beans/factory/config/SimpleMapScope.java b/org.springframework.context/src/test/java/org/springframework/beans/factory/config/SimpleMapScope.java new file mode 100644 index 00000000000..42fb9fd89d5 --- /dev/null +++ b/org.springframework.context/src/test/java/org/springframework/beans/factory/config/SimpleMapScope.java @@ -0,0 +1,82 @@ +/* + * Copyright 2002-2008 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 + * + * http://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.beans.factory.config; + +import java.io.Serializable; +import java.util.HashMap; +import java.util.Iterator; +import java.util.LinkedList; +import java.util.List; +import java.util.Map; + +import org.springframework.beans.factory.ObjectFactory; + +/** + * @author Juergen Hoeller + */ +public class SimpleMapScope implements Scope, Serializable { + + private final Map map = new HashMap(); + + private final List callbacks = new LinkedList(); + + + public SimpleMapScope() { + } + + public final Map getMap() { + return this.map; + } + + + public Object get(String name, ObjectFactory objectFactory) { + synchronized (this.map) { + Object scopedObject = this.map.get(name); + if (scopedObject == null) { + scopedObject = objectFactory.getObject(); + this.map.put(name, scopedObject); + } + return scopedObject; + } + } + + public Object remove(String name) { + synchronized (this.map) { + return this.map.remove(name); + } + } + + public void registerDestructionCallback(String name, Runnable callback) { + this.callbacks.add(callback); + } + + public Object resolveContextualObject(String key) { + return null; + } + + public void close() { + for (Iterator it = this.callbacks.iterator(); it.hasNext();) { + Runnable runnable = (Runnable) it.next(); + runnable.run(); + } + } + + public String getConversationId() { + return null; + } + +} diff --git a/org.springframework.testsuite/src/test/java/org/springframework/context/annotation/ComponentScanParserBeanDefinitionDefaultsTests.java b/org.springframework.context/src/test/java/org/springframework/context/annotation/ComponentScanParserBeanDefinitionDefaultsTests.java similarity index 97% rename from org.springframework.testsuite/src/test/java/org/springframework/context/annotation/ComponentScanParserBeanDefinitionDefaultsTests.java rename to org.springframework.context/src/test/java/org/springframework/context/annotation/ComponentScanParserBeanDefinitionDefaultsTests.java index 43a0448835e..28fdcccca0a 100644 --- a/org.springframework.testsuite/src/test/java/org/springframework/context/annotation/ComponentScanParserBeanDefinitionDefaultsTests.java +++ b/org.springframework.context/src/test/java/org/springframework/context/annotation/ComponentScanParserBeanDefinitionDefaultsTests.java @@ -16,26 +16,31 @@ package org.springframework.context.annotation; -import junit.framework.TestCase; +import static org.junit.Assert.*; +import org.junit.Before; +import org.junit.Test; import org.springframework.beans.factory.UnsatisfiedDependencyException; import org.springframework.beans.factory.xml.XmlBeanDefinitionReader; import org.springframework.context.support.GenericApplicationContext; /** * @author Mark Fisher + * @author Chris Beams */ -public class ComponentScanParserBeanDefinitionDefaultsTests extends TestCase { +public class ComponentScanParserBeanDefinitionDefaultsTests { private static final String TEST_BEAN_NAME = "componentScanParserBeanDefinitionDefaultsTests.DefaultsTestBean"; private static final String LOCATION_PREFIX = "org/springframework/context/annotation/"; + @Before public void setUp() { DefaultsTestBean.INIT_COUNT = 0; } + @Test public void testDefaultLazyInit() { GenericApplicationContext context = new GenericApplicationContext(); XmlBeanDefinitionReader reader = new XmlBeanDefinitionReader(context); @@ -46,6 +51,7 @@ public class ComponentScanParserBeanDefinitionDefaultsTests extends TestCase { assertEquals("bean should have been instantiated", 1, DefaultsTestBean.INIT_COUNT); } + @Test public void testLazyInitTrue() { GenericApplicationContext context = new GenericApplicationContext(); XmlBeanDefinitionReader reader = new XmlBeanDefinitionReader(context); @@ -58,6 +64,7 @@ public class ComponentScanParserBeanDefinitionDefaultsTests extends TestCase { assertEquals("bean should have been instantiated", 1, DefaultsTestBean.INIT_COUNT); } + @Test public void testLazyInitFalse() { GenericApplicationContext context = new GenericApplicationContext(); XmlBeanDefinitionReader reader = new XmlBeanDefinitionReader(context); @@ -68,6 +75,7 @@ public class ComponentScanParserBeanDefinitionDefaultsTests extends TestCase { assertEquals("bean should have been instantiated", 1, DefaultsTestBean.INIT_COUNT); } + @Test public void testDefaultAutowire() { GenericApplicationContext context = new GenericApplicationContext(); XmlBeanDefinitionReader reader = new XmlBeanDefinitionReader(context); @@ -79,6 +87,7 @@ public class ComponentScanParserBeanDefinitionDefaultsTests extends TestCase { assertNull("no dependencies should have been autowired", bean.getPropertyDependency2()); } + @Test public void testAutowireNo() { GenericApplicationContext context = new GenericApplicationContext(); XmlBeanDefinitionReader reader = new XmlBeanDefinitionReader(context); @@ -90,6 +99,7 @@ public class ComponentScanParserBeanDefinitionDefaultsTests extends TestCase { assertNull("no dependencies should have been autowired", bean.getPropertyDependency2()); } + @Test public void testAutowireConstructor() { GenericApplicationContext context = new GenericApplicationContext(); XmlBeanDefinitionReader reader = new XmlBeanDefinitionReader(context); @@ -102,6 +112,7 @@ public class ComponentScanParserBeanDefinitionDefaultsTests extends TestCase { assertNull("property dependencies should not have been autowired", bean.getPropertyDependency2()); } + @Test public void testAutowireByType() { GenericApplicationContext context = new GenericApplicationContext(); XmlBeanDefinitionReader reader = new XmlBeanDefinitionReader(context); @@ -115,6 +126,7 @@ public class ComponentScanParserBeanDefinitionDefaultsTests extends TestCase { } } + @Test public void testAutowireByName() { GenericApplicationContext context = new GenericApplicationContext(); XmlBeanDefinitionReader reader = new XmlBeanDefinitionReader(context); @@ -127,6 +139,7 @@ public class ComponentScanParserBeanDefinitionDefaultsTests extends TestCase { assertEquals("pd2", bean.getPropertyDependency2().getName()); } + @Test public void testDefaultDependencyCheck() { GenericApplicationContext context = new GenericApplicationContext(); XmlBeanDefinitionReader reader = new XmlBeanDefinitionReader(context); @@ -138,6 +151,7 @@ public class ComponentScanParserBeanDefinitionDefaultsTests extends TestCase { assertNull("property dependencies should not have been autowired", bean.getPropertyDependency2()); } + @Test public void testDependencyCheckAll() { GenericApplicationContext context = new GenericApplicationContext(); XmlBeanDefinitionReader reader = new XmlBeanDefinitionReader(context); @@ -151,6 +165,7 @@ public class ComponentScanParserBeanDefinitionDefaultsTests extends TestCase { } } + @Test public void testDependencyCheckObjectsWithAutowireByName() { GenericApplicationContext context = new GenericApplicationContext(); XmlBeanDefinitionReader reader = new XmlBeanDefinitionReader(context); @@ -162,6 +177,7 @@ public class ComponentScanParserBeanDefinitionDefaultsTests extends TestCase { assertNotNull("property dependencies should have been autowired", bean.getPropertyDependency2()); } + @Test public void testDefaultInitAndDestroyMethodsNotDefined() { GenericApplicationContext context = new GenericApplicationContext(); XmlBeanDefinitionReader reader = new XmlBeanDefinitionReader(context); @@ -173,6 +189,7 @@ public class ComponentScanParserBeanDefinitionDefaultsTests extends TestCase { assertFalse("bean should not have been destroyed", bean.isDestroyed()); } + @Test public void testDefaultInitAndDestroyMethodsDefined() { GenericApplicationContext context = new GenericApplicationContext(); XmlBeanDefinitionReader reader = new XmlBeanDefinitionReader(context); @@ -184,6 +201,7 @@ public class ComponentScanParserBeanDefinitionDefaultsTests extends TestCase { assertTrue("bean should have been destroyed", bean.isDestroyed()); } + @Test public void testDefaultNonExistingInitAndDestroyMethodsDefined() { GenericApplicationContext context = new GenericApplicationContext(); XmlBeanDefinitionReader reader = new XmlBeanDefinitionReader(context); diff --git a/org.springframework.testsuite/src/test/java/org/springframework/context/annotation/ComponentScanParserScopedProxyTests.java b/org.springframework.context/src/test/java/org/springframework/context/annotation/ComponentScanParserScopedProxyTests.java similarity index 95% rename from org.springframework.testsuite/src/test/java/org/springframework/context/annotation/ComponentScanParserScopedProxyTests.java rename to org.springframework.context/src/test/java/org/springframework/context/annotation/ComponentScanParserScopedProxyTests.java index 4122eee6e56..d806807dd3a 100644 --- a/org.springframework.testsuite/src/test/java/org/springframework/context/annotation/ComponentScanParserScopedProxyTests.java +++ b/org.springframework.context/src/test/java/org/springframework/context/annotation/ComponentScanParserScopedProxyTests.java @@ -16,8 +16,9 @@ package org.springframework.context.annotation; -import junit.framework.TestCase; +import static org.junit.Assert.*; +import org.junit.Test; import org.springframework.aop.support.AopUtils; import org.springframework.beans.FatalBeanException; import org.springframework.beans.factory.config.SimpleMapScope; @@ -30,8 +31,9 @@ import example.scannable.ScopedProxyTestBean; * @author Mark Fisher * @author Juergen Hoeller */ -public class ComponentScanParserScopedProxyTests extends TestCase { +public class ComponentScanParserScopedProxyTests { + @Test public void testDefaultScopedProxy() { ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext( "org/springframework/context/annotation/scopedProxyDefaultTests.xml"); @@ -41,6 +43,7 @@ public class ComponentScanParserScopedProxyTests extends TestCase { assertFalse(AopUtils.isAopProxy(bean)); } + @Test public void testNoScopedProxy() { ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext( "org/springframework/context/annotation/scopedProxyNoTests.xml"); @@ -50,6 +53,7 @@ public class ComponentScanParserScopedProxyTests extends TestCase { assertFalse(AopUtils.isAopProxy(bean)); } + @Test public void testInterfacesScopedProxy() { ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext( "org/springframework/context/annotation/scopedProxyInterfacesTests.xml"); @@ -60,6 +64,7 @@ public class ComponentScanParserScopedProxyTests extends TestCase { assertTrue(AopUtils.isJdkDynamicProxy(bean)); } + @Test public void testTargetClassScopedProxy() { ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext( "org/springframework/context/annotation/scopedProxyTargetClassTests.xml"); @@ -69,6 +74,7 @@ public class ComponentScanParserScopedProxyTests extends TestCase { assertTrue(AopUtils.isCglibProxy(bean)); } + @Test public void testInvalidConfigScopedProxy() { try { new ClassPathXmlApplicationContext( diff --git a/org.springframework.testsuite/src/test/java/org/springframework/context/annotation/ComponentScanParserTests.java b/org.springframework.context/src/test/java/org/springframework/context/annotation/ComponentScanParserTests.java similarity index 96% rename from org.springframework.testsuite/src/test/java/org/springframework/context/annotation/ComponentScanParserTests.java rename to org.springframework.context/src/test/java/org/springframework/context/annotation/ComponentScanParserTests.java index 0b39e024da0..bd055d3e48b 100644 --- a/org.springframework.testsuite/src/test/java/org/springframework/context/annotation/ComponentScanParserTests.java +++ b/org.springframework.context/src/test/java/org/springframework/context/annotation/ComponentScanParserTests.java @@ -16,13 +16,14 @@ package org.springframework.context.annotation; +import static org.junit.Assert.*; + import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; -import junit.framework.TestCase; - +import org.junit.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; @@ -35,9 +36,11 @@ import example.scannable.AutowiredQualifierFooService; /** * @author Mark Fisher * @author Juergen Hoeller + * @author Chris Beams */ -public class ComponentScanParserTests extends TestCase { +public class ComponentScanParserTests { + @Test public void testAspectJTypeFilter() { ApplicationContext context = new ClassPathXmlApplicationContext( "org/springframework/context/annotation/aspectjTypeFilterTests.xml"); @@ -46,18 +49,21 @@ public class ComponentScanParserTests extends TestCase { assertFalse(context.containsBean("scopedProxyTestBean")); } + @Test public void testNonMatchingResourcePattern() { ApplicationContext context = new ClassPathXmlApplicationContext( "org/springframework/context/annotation/nonMatchingResourcePatternTests.xml"); assertFalse(context.containsBean("fooServiceImpl")); } + @Test public void testMatchingResourcePattern() { ApplicationContext context = new ClassPathXmlApplicationContext( "org/springframework/context/annotation/matchingResourcePatternTests.xml"); assertTrue(context.containsBean("fooServiceImpl")); } + @Test public void testComponentScanWithAutowiredQualifier() { ApplicationContext context = new ClassPathXmlApplicationContext( "org/springframework/context/annotation/componentScanWithAutowiredQualifierTests.xml"); @@ -66,6 +72,7 @@ public class ComponentScanParserTests extends TestCase { assertEquals("bar", fooService.foo(123)); } + @Test public void testCustomAnnotationUsedForBothComponentScanAndQualifier() { ApplicationContext context = new ClassPathXmlApplicationContext( "org/springframework/context/annotation/customAnnotationUsedForBothComponentScanAndQualifierTests.xml"); @@ -73,6 +80,7 @@ public class ComponentScanParserTests extends TestCase { assertNotNull(testBean.getDependency()); } + @Test public void testCustomTypeFilter() { ApplicationContext context = new ClassPathXmlApplicationContext( "org/springframework/context/annotation/customTypeFilterTests.xml"); diff --git a/org.springframework.testsuite/src/test/java/org/springframework/context/annotation/ComponentScanParserWithUserDefinedStrategiesTests.java b/org.springframework.context/src/test/java/org/springframework/context/annotation/ComponentScanParserWithUserDefinedStrategiesTests.java similarity index 91% rename from org.springframework.testsuite/src/test/java/org/springframework/context/annotation/ComponentScanParserWithUserDefinedStrategiesTests.java rename to org.springframework.context/src/test/java/org/springframework/context/annotation/ComponentScanParserWithUserDefinedStrategiesTests.java index cd64a0148d1..1925dd4afce 100644 --- a/org.springframework.testsuite/src/test/java/org/springframework/context/annotation/ComponentScanParserWithUserDefinedStrategiesTests.java +++ b/org.springframework.context/src/test/java/org/springframework/context/annotation/ComponentScanParserWithUserDefinedStrategiesTests.java @@ -16,23 +16,27 @@ package org.springframework.context.annotation; +import static org.junit.Assert.*; + +import org.junit.Test; import org.springframework.beans.BeansException; import org.springframework.beans.factory.config.BeanDefinition; import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; -import org.springframework.test.AbstractDependencyInjectionSpringContextTests; /** * @author Mark Fisher */ -public class ComponentScanParserWithUserDefinedStrategiesTests extends AbstractDependencyInjectionSpringContextTests { +public class ComponentScanParserWithUserDefinedStrategiesTests { + @Test public void testCustomBeanNameGenerator() { ApplicationContext context = new ClassPathXmlApplicationContext( "org/springframework/context/annotation/customNameGeneratorTests.xml"); assertTrue(context.containsBean("testing.fooServiceImpl")); } + @Test public void testCustomScopeMetadataResolver() { ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext( "org/springframework/context/annotation/customScopeResolverTests.xml"); @@ -41,6 +45,7 @@ public class ComponentScanParserWithUserDefinedStrategiesTests extends AbstractD assertFalse(bd.isSingleton()); } + @Test public void testInvalidConstructorBeanNameGenerator() { try { new ClassPathXmlApplicationContext( @@ -52,6 +57,7 @@ public class ComponentScanParserWithUserDefinedStrategiesTests extends AbstractD } } + @Test public void testInvalidClassNameScopeMetadataResolver() { try { new ClassPathXmlApplicationContext( diff --git a/org.springframework.testsuite/src/test/java/org/springframework/context/annotation/TestBeanNameGenerator.java b/org.springframework.context/src/test/java/org/springframework/context/annotation/TestBeanNameGenerator.java similarity index 100% rename from org.springframework.testsuite/src/test/java/org/springframework/context/annotation/TestBeanNameGenerator.java rename to org.springframework.context/src/test/java/org/springframework/context/annotation/TestBeanNameGenerator.java diff --git a/org.springframework.testsuite/src/test/java/org/springframework/context/annotation/TestScopeMetadataResolver.java b/org.springframework.context/src/test/java/org/springframework/context/annotation/TestScopeMetadataResolver.java similarity index 100% rename from org.springframework.testsuite/src/test/java/org/springframework/context/annotation/TestScopeMetadataResolver.java rename to org.springframework.context/src/test/java/org/springframework/context/annotation/TestScopeMetadataResolver.java diff --git a/org.springframework.testsuite/src/test/java/org/springframework/context/annotation/aspectjTypeFilterTests.xml b/org.springframework.context/src/test/java/org/springframework/context/annotation/aspectjTypeFilterTests.xml similarity index 100% rename from org.springframework.testsuite/src/test/java/org/springframework/context/annotation/aspectjTypeFilterTests.xml rename to org.springframework.context/src/test/java/org/springframework/context/annotation/aspectjTypeFilterTests.xml diff --git a/org.springframework.testsuite/src/test/java/org/springframework/context/annotation/componentScanWithAutowiredQualifierTests.xml b/org.springframework.context/src/test/java/org/springframework/context/annotation/componentScanWithAutowiredQualifierTests.xml similarity index 100% rename from org.springframework.testsuite/src/test/java/org/springframework/context/annotation/componentScanWithAutowiredQualifierTests.xml rename to org.springframework.context/src/test/java/org/springframework/context/annotation/componentScanWithAutowiredQualifierTests.xml diff --git a/org.springframework.testsuite/src/test/java/org/springframework/context/annotation/customAnnotationUsedForBothComponentScanAndQualifierTests.xml b/org.springframework.context/src/test/java/org/springframework/context/annotation/customAnnotationUsedForBothComponentScanAndQualifierTests.xml similarity index 100% rename from org.springframework.testsuite/src/test/java/org/springframework/context/annotation/customAnnotationUsedForBothComponentScanAndQualifierTests.xml rename to org.springframework.context/src/test/java/org/springframework/context/annotation/customAnnotationUsedForBothComponentScanAndQualifierTests.xml diff --git a/org.springframework.testsuite/src/test/java/org/springframework/context/annotation/customNameGeneratorTests.xml b/org.springframework.context/src/test/java/org/springframework/context/annotation/customNameGeneratorTests.xml similarity index 100% rename from org.springframework.testsuite/src/test/java/org/springframework/context/annotation/customNameGeneratorTests.xml rename to org.springframework.context/src/test/java/org/springframework/context/annotation/customNameGeneratorTests.xml diff --git a/org.springframework.testsuite/src/test/java/org/springframework/context/annotation/customScopeResolverTests.xml b/org.springframework.context/src/test/java/org/springframework/context/annotation/customScopeResolverTests.xml similarity index 100% rename from org.springframework.testsuite/src/test/java/org/springframework/context/annotation/customScopeResolverTests.xml rename to org.springframework.context/src/test/java/org/springframework/context/annotation/customScopeResolverTests.xml diff --git a/org.springframework.testsuite/src/test/java/org/springframework/context/annotation/customTypeFilterTests.xml b/org.springframework.context/src/test/java/org/springframework/context/annotation/customTypeFilterTests.xml similarity index 100% rename from org.springframework.testsuite/src/test/java/org/springframework/context/annotation/customTypeFilterTests.xml rename to org.springframework.context/src/test/java/org/springframework/context/annotation/customTypeFilterTests.xml diff --git a/org.springframework.testsuite/src/test/java/org/springframework/context/annotation/defaultAutowireByNameTests.xml b/org.springframework.context/src/test/java/org/springframework/context/annotation/defaultAutowireByNameTests.xml similarity index 100% rename from org.springframework.testsuite/src/test/java/org/springframework/context/annotation/defaultAutowireByNameTests.xml rename to org.springframework.context/src/test/java/org/springframework/context/annotation/defaultAutowireByNameTests.xml diff --git a/org.springframework.testsuite/src/test/java/org/springframework/context/annotation/defaultAutowireByTypeTests.xml b/org.springframework.context/src/test/java/org/springframework/context/annotation/defaultAutowireByTypeTests.xml similarity index 100% rename from org.springframework.testsuite/src/test/java/org/springframework/context/annotation/defaultAutowireByTypeTests.xml rename to org.springframework.context/src/test/java/org/springframework/context/annotation/defaultAutowireByTypeTests.xml diff --git a/org.springframework.testsuite/src/test/java/org/springframework/context/annotation/defaultAutowireConstructorTests.xml b/org.springframework.context/src/test/java/org/springframework/context/annotation/defaultAutowireConstructorTests.xml similarity index 100% rename from org.springframework.testsuite/src/test/java/org/springframework/context/annotation/defaultAutowireConstructorTests.xml rename to org.springframework.context/src/test/java/org/springframework/context/annotation/defaultAutowireConstructorTests.xml diff --git a/org.springframework.testsuite/src/test/java/org/springframework/context/annotation/defaultAutowireNoTests.xml b/org.springframework.context/src/test/java/org/springframework/context/annotation/defaultAutowireNoTests.xml similarity index 100% rename from org.springframework.testsuite/src/test/java/org/springframework/context/annotation/defaultAutowireNoTests.xml rename to org.springframework.context/src/test/java/org/springframework/context/annotation/defaultAutowireNoTests.xml diff --git a/org.springframework.testsuite/src/test/java/org/springframework/context/annotation/defaultDependencyCheckAllTests.xml b/org.springframework.context/src/test/java/org/springframework/context/annotation/defaultDependencyCheckAllTests.xml similarity index 100% rename from org.springframework.testsuite/src/test/java/org/springframework/context/annotation/defaultDependencyCheckAllTests.xml rename to org.springframework.context/src/test/java/org/springframework/context/annotation/defaultDependencyCheckAllTests.xml diff --git a/org.springframework.testsuite/src/test/java/org/springframework/context/annotation/defaultDependencyCheckObjectsWithAutowireByNameTests.xml b/org.springframework.context/src/test/java/org/springframework/context/annotation/defaultDependencyCheckObjectsWithAutowireByNameTests.xml similarity index 100% rename from org.springframework.testsuite/src/test/java/org/springframework/context/annotation/defaultDependencyCheckObjectsWithAutowireByNameTests.xml rename to org.springframework.context/src/test/java/org/springframework/context/annotation/defaultDependencyCheckObjectsWithAutowireByNameTests.xml diff --git a/org.springframework.testsuite/src/test/java/org/springframework/context/annotation/defaultInitAndDestroyMethodsTests.xml b/org.springframework.context/src/test/java/org/springframework/context/annotation/defaultInitAndDestroyMethodsTests.xml similarity index 100% rename from org.springframework.testsuite/src/test/java/org/springframework/context/annotation/defaultInitAndDestroyMethodsTests.xml rename to org.springframework.context/src/test/java/org/springframework/context/annotation/defaultInitAndDestroyMethodsTests.xml diff --git a/org.springframework.testsuite/src/test/java/org/springframework/context/annotation/defaultLazyInitFalseTests.xml b/org.springframework.context/src/test/java/org/springframework/context/annotation/defaultLazyInitFalseTests.xml similarity index 100% rename from org.springframework.testsuite/src/test/java/org/springframework/context/annotation/defaultLazyInitFalseTests.xml rename to org.springframework.context/src/test/java/org/springframework/context/annotation/defaultLazyInitFalseTests.xml diff --git a/org.springframework.testsuite/src/test/java/org/springframework/context/annotation/defaultLazyInitTrueTests.xml b/org.springframework.context/src/test/java/org/springframework/context/annotation/defaultLazyInitTrueTests.xml similarity index 100% rename from org.springframework.testsuite/src/test/java/org/springframework/context/annotation/defaultLazyInitTrueTests.xml rename to org.springframework.context/src/test/java/org/springframework/context/annotation/defaultLazyInitTrueTests.xml diff --git a/org.springframework.testsuite/src/test/java/org/springframework/context/annotation/defaultNonExistingInitAndDestroyMethodsTests.xml b/org.springframework.context/src/test/java/org/springframework/context/annotation/defaultNonExistingInitAndDestroyMethodsTests.xml similarity index 100% rename from org.springframework.testsuite/src/test/java/org/springframework/context/annotation/defaultNonExistingInitAndDestroyMethodsTests.xml rename to org.springframework.context/src/test/java/org/springframework/context/annotation/defaultNonExistingInitAndDestroyMethodsTests.xml diff --git a/org.springframework.testsuite/src/test/java/org/springframework/context/annotation/defaultWithNoOverridesTests.xml b/org.springframework.context/src/test/java/org/springframework/context/annotation/defaultWithNoOverridesTests.xml similarity index 100% rename from org.springframework.testsuite/src/test/java/org/springframework/context/annotation/defaultWithNoOverridesTests.xml rename to org.springframework.context/src/test/java/org/springframework/context/annotation/defaultWithNoOverridesTests.xml diff --git a/org.springframework.testsuite/src/test/java/org/springframework/context/annotation/invalidClassNameScopeResolverTests.xml b/org.springframework.context/src/test/java/org/springframework/context/annotation/invalidClassNameScopeResolverTests.xml similarity index 100% rename from org.springframework.testsuite/src/test/java/org/springframework/context/annotation/invalidClassNameScopeResolverTests.xml rename to org.springframework.context/src/test/java/org/springframework/context/annotation/invalidClassNameScopeResolverTests.xml diff --git a/org.springframework.testsuite/src/test/java/org/springframework/context/annotation/invalidConstructorNameGeneratorTests.xml b/org.springframework.context/src/test/java/org/springframework/context/annotation/invalidConstructorNameGeneratorTests.xml similarity index 100% rename from org.springframework.testsuite/src/test/java/org/springframework/context/annotation/invalidConstructorNameGeneratorTests.xml rename to org.springframework.context/src/test/java/org/springframework/context/annotation/invalidConstructorNameGeneratorTests.xml diff --git a/org.springframework.testsuite/src/test/java/org/springframework/context/annotation/matchingResourcePatternTests.xml b/org.springframework.context/src/test/java/org/springframework/context/annotation/matchingResourcePatternTests.xml similarity index 100% rename from org.springframework.testsuite/src/test/java/org/springframework/context/annotation/matchingResourcePatternTests.xml rename to org.springframework.context/src/test/java/org/springframework/context/annotation/matchingResourcePatternTests.xml diff --git a/org.springframework.testsuite/src/test/java/org/springframework/context/annotation/nonMatchingResourcePatternTests.xml b/org.springframework.context/src/test/java/org/springframework/context/annotation/nonMatchingResourcePatternTests.xml similarity index 100% rename from org.springframework.testsuite/src/test/java/org/springframework/context/annotation/nonMatchingResourcePatternTests.xml rename to org.springframework.context/src/test/java/org/springframework/context/annotation/nonMatchingResourcePatternTests.xml diff --git a/org.springframework.testsuite/src/test/java/org/springframework/context/annotation/scopedProxyDefaultTests.xml b/org.springframework.context/src/test/java/org/springframework/context/annotation/scopedProxyDefaultTests.xml similarity index 100% rename from org.springframework.testsuite/src/test/java/org/springframework/context/annotation/scopedProxyDefaultTests.xml rename to org.springframework.context/src/test/java/org/springframework/context/annotation/scopedProxyDefaultTests.xml diff --git a/org.springframework.testsuite/src/test/java/org/springframework/context/annotation/scopedProxyInterfacesTests.xml b/org.springframework.context/src/test/java/org/springframework/context/annotation/scopedProxyInterfacesTests.xml similarity index 100% rename from org.springframework.testsuite/src/test/java/org/springframework/context/annotation/scopedProxyInterfacesTests.xml rename to org.springframework.context/src/test/java/org/springframework/context/annotation/scopedProxyInterfacesTests.xml diff --git a/org.springframework.testsuite/src/test/java/org/springframework/context/annotation/scopedProxyInvalidConfigTests.xml b/org.springframework.context/src/test/java/org/springframework/context/annotation/scopedProxyInvalidConfigTests.xml similarity index 100% rename from org.springframework.testsuite/src/test/java/org/springframework/context/annotation/scopedProxyInvalidConfigTests.xml rename to org.springframework.context/src/test/java/org/springframework/context/annotation/scopedProxyInvalidConfigTests.xml diff --git a/org.springframework.testsuite/src/test/java/org/springframework/context/annotation/scopedProxyNoTests.xml b/org.springframework.context/src/test/java/org/springframework/context/annotation/scopedProxyNoTests.xml similarity index 100% rename from org.springframework.testsuite/src/test/java/org/springframework/context/annotation/scopedProxyNoTests.xml rename to org.springframework.context/src/test/java/org/springframework/context/annotation/scopedProxyNoTests.xml diff --git a/org.springframework.testsuite/src/test/java/org/springframework/context/annotation/scopedProxyTargetClassTests.xml b/org.springframework.context/src/test/java/org/springframework/context/annotation/scopedProxyTargetClassTests.xml similarity index 100% rename from org.springframework.testsuite/src/test/java/org/springframework/context/annotation/scopedProxyTargetClassTests.xml rename to org.springframework.context/src/test/java/org/springframework/context/annotation/scopedProxyTargetClassTests.xml