Remove duplicate test classes

Prior to this commit many test utility classes and sample beans were
duplicated across projects. This was previously necessary due to the
fact that dependent test sources were not shared during a gradle
build. Since the introduction of the 'test-source-set-dependencies'
gradle plugin this is no longer the case.

This commit attempts to remove as much duplicate code as possible,
co-locating test utilities and beans in the most suitable project.
For example, test beans are now located in the 'spring-beans'
project.

Some of the duplicated code had started to drift apart when
modifications made in one project where not ported to others. All
changes have now been consolidated and when necessary existing tests
have been refactored to account for the differences.

Conflicts:
	spring-beans/src/test/java/org/springframework/beans/factory/ConcurrentBeanFactoryTests.java
	spring-beans/src/test/java/org/springframework/beans/factory/support/BeanFactoryGenericsTests.java
	spring-beans/src/test/java/org/springframework/beans/support/PagedListHolderTests.java
This commit is contained in:
Phillip Webb
2013-01-03 00:43:48 -08:00
committed by Chris Beams
parent 2a30fa07ea
commit 42b5d6dd7e
813 changed files with 2241 additions and 27860 deletions

View File

@@ -4,8 +4,8 @@
xmlns:p="http://www.springframework.org/schema/p"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
<bean id="foo" class="org.springframework.beans.TestBean" p:name="Baz"/>
<bean id="foo" class="org.springframework.tests.sample.beans.TestBean" p:name="Baz"/>
<bean id="bar" class="org.springframework.beans.TestBean" p:name="#{foo.name}"/>
<bean id="bar" class="org.springframework.tests.sample.beans.TestBean" p:name="#{foo.name}"/>
</beans>

View File

@@ -14,34 +14,34 @@
</property>
</bean>
<bean id="threadScopedObject" class="org.springframework.beans.TestBean" scope="thread"/>
<bean id="threadScopedObject" class="org.springframework.tests.sample.beans.TestBean" scope="thread"/>
<!--
<bean id="requestScopedDisposableObject" class="org.springframework.beans.DerivedTestBean" scope="request"/>
<bean id="requestScopedDisposableObject" class="org.springframework.tests.sample.beans.DerivedTestBean" scope="request"/>
<bean id="requestScopedFactoryBean" class="org.springframework.beans.factory.DummyFactory" scope="request"/>
<bean id="requestScopedFactoryBean" class="org.springframework.tests.sample.beans.factory.DummyFactory" scope="request"/>
<bean id="requestScopedObjectCircle1" class="org.springframework.beans.TestBean" scope="request">
<bean id="requestScopedObjectCircle1" class="org.springframework.tests.sample.beans.TestBean" scope="request">
<property name="spouse" ref="requestScopedObjectCircle2"/>
</bean>
<bean id="requestScopedObjectCircle2" class="org.springframework.beans.TestBean" scope="request">
<bean id="requestScopedObjectCircle2" class="org.springframework.tests.sample.beans.TestBean" scope="request">
<property name="spouse" ref="requestScopedObjectCircle1"/>
</bean>
<bean id="requestScopedOuterBean" class="org.springframework.beans.DerivedTestBean" scope="request">
<bean id="requestScopedOuterBean" class="org.springframework.tests.sample.beans.DerivedTestBean" scope="request">
<property name="name" value="outer"/>
<property name="spouse">
<bean class="org.springframework.beans.DerivedTestBean">
<bean class="org.springframework.tests.sample.beans.DerivedTestBean">
<property name="name" value="inner"/>
</bean>
</property>
</bean>
<bean id="singletonOuterBean" class="org.springframework.beans.DerivedTestBean" lazy-init="true">
<bean id="singletonOuterBean" class="org.springframework.tests.sample.beans.DerivedTestBean" lazy-init="true">
<property name="name" value="outer"/>
<property name="spouse">
<bean class="org.springframework.beans.DerivedTestBean" scope="request">
<bean class="org.springframework.tests.sample.beans.DerivedTestBean" scope="request">
<property name="name" value="inner"/>
</bean>
</property>