Skip to content

Commit 7cd4ddf

Browse files
committed
Rename test fixture package in spring-beans
See spring-projectsgh-23550
1 parent 4260c34 commit 7cd4ddf

503 files changed

Lines changed: 1148 additions & 1142 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

integration-tests/src/test/java/org/springframework/aop/config/AopNamespaceHandlerScopeIntegrationTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
import org.springframework.aop.framework.Advised;
2222
import org.springframework.aop.support.AopUtils;
2323
import org.springframework.beans.factory.annotation.Autowired;
24-
import org.springframework.beans.test.fixtures.beans.ITestBean;
25-
import org.springframework.beans.test.fixtures.beans.TestBean;
24+
import org.springframework.beans.testfixture.beans.ITestBean;
25+
import org.springframework.beans.testfixture.beans.TestBean;
2626
import org.springframework.core.testfixture.io.SerializationTestUtils;
2727
import org.springframework.mock.web.MockHttpServletRequest;
2828
import org.springframework.mock.web.MockHttpSession;

integration-tests/src/test/java/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorIntegrationTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
import org.springframework.aop.support.StaticMethodMatcherPointcutAdvisor;
2929
import org.springframework.beans.factory.BeanFactory;
3030
import org.springframework.beans.factory.InitializingBean;
31-
import org.springframework.beans.test.fixtures.beans.ITestBean;
31+
import org.springframework.beans.testfixture.beans.ITestBean;
3232
import org.springframework.context.support.ClassPathXmlApplicationContext;
3333
import org.springframework.lang.Nullable;
3434
import org.springframework.tests.aop.advice.CountingBeforeAdvice;

integration-tests/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerScopeIntegrationTests-context.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,19 @@
1111

1212
<bean id="advice" class="org.springframework.aop.interceptor.DebugInterceptor"/>
1313

14-
<bean id="testBean" class="org.springframework.beans.test.fixtures.beans.TestBean"/>
14+
<bean id="testBean" class="org.springframework.beans.testfixture.beans.TestBean"/>
1515

16-
<bean id="singletonScoped" class="org.springframework.beans.test.fixtures.beans.TestBean">
16+
<bean id="singletonScoped" class="org.springframework.beans.testfixture.beans.TestBean">
1717
<aop:scoped-proxy/>
1818
<property name="name" value="Rob Harrop"/>
1919
</bean>
2020

21-
<bean id="requestScoped" class="org.springframework.beans.test.fixtures.beans.TestBean" scope="request">
21+
<bean id="requestScoped" class="org.springframework.beans.testfixture.beans.TestBean" scope="request">
2222
<aop:scoped-proxy/>
2323
<property name="name" value="Rob Harrop"/>
2424
</bean>
2525

26-
<bean id="sessionScoped" name="sessionScopedAlias" class="org.springframework.beans.test.fixtures.beans.TestBean" scope="session">
26+
<bean id="sessionScoped" name="sessionScopedAlias" class="org.springframework.beans.testfixture.beans.TestBean" scope="session">
2727
<aop:scoped-proxy proxy-target-class="false"/>
2828
<property name="name" value="Rob Harrop"/>
2929
</bean>

integration-tests/src/test/resources/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorIntegrationTests-context.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,20 +74,20 @@
7474

7575
<!-- These two beans would otherwise be eligible for autoproxying -->
7676

77-
<bean id="singletonDependency" class="org.springframework.beans.test.fixtures.beans.TestBean" scope="singleton"/>
77+
<bean id="singletonDependency" class="org.springframework.beans.testfixture.beans.TestBean" scope="singleton"/>
7878

79-
<bean id="prototypeDependency" class="org.springframework.beans.test.fixtures.beans.TestBean" scope="prototype"/>
79+
<bean id="prototypeDependency" class="org.springframework.beans.testfixture.beans.TestBean" scope="prototype"/>
8080

8181
<!-- ====== End test for prototype definitions to try to provoke circular references ========================= -->
8282

8383
<bean class="org.springframework.aop.support.RegexpMethodPointcutAdvisor">
8484
<property name="advice"><ref bean="countingAdvice"/></property>
85-
<property name="pattern"><value>org.springframework.beans.test.fixtures.beans.ITestBean.getName</value></property>
85+
<property name="pattern"><value>org.springframework.beans.testfixture.beans.ITestBean.getName</value></property>
8686
</bean>
8787

8888
<bean id="countingAdvice" class="org.springframework.tests.aop.advice.CountingAfterReturningAdvice"/>
8989

90-
<bean id="test" class="org.springframework.beans.test.fixtures.beans.TestBean">
90+
<bean id="test" class="org.springframework.beans.testfixture.beans.TestBean">
9191
<property name="age"><value>4</value></property>
9292
</bean>
9393

@@ -97,7 +97,7 @@
9797

9898
<!-- The following beans test whether auto-proxying falls over for a null value -->
9999

100-
<bean id="tb" class="org.springframework.beans.test.fixtures.beans.TestBean"/>
100+
<bean id="tb" class="org.springframework.beans.testfixture.beans.TestBean"/>
101101

102102
<bean id="nullValueReturned" class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
103103
<property name="targetObject" ref="tb"/>

spring-aop/src/test/java/org/springframework/aop/aspectj/AspectJExpressionPointcutTests.java

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@
3131
import org.springframework.aop.Pointcut;
3232
import org.springframework.aop.framework.ProxyFactory;
3333
import org.springframework.aop.support.DefaultPointcutAdvisor;
34-
import org.springframework.beans.test.fixtures.beans.IOther;
35-
import org.springframework.beans.test.fixtures.beans.ITestBean;
36-
import org.springframework.beans.test.fixtures.beans.TestBean;
37-
import org.springframework.beans.test.fixtures.beans.subpkg.DeepBean;
34+
import org.springframework.beans.testfixture.beans.IOther;
35+
import org.springframework.beans.testfixture.beans.ITestBean;
36+
import org.springframework.beans.testfixture.beans.TestBean;
37+
import org.springframework.beans.testfixture.beans.subpkg.DeepBean;
3838

3939
import static org.assertj.core.api.Assertions.assertThat;
4040
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
@@ -67,7 +67,7 @@ public void setUp() throws NoSuchMethodException {
6767

6868
@Test
6969
public void testMatchExplicit() {
70-
String expression = "execution(int org.springframework.beans.test.fixtures.beans.TestBean.getAge())";
70+
String expression = "execution(int org.springframework.beans.testfixture.beans.TestBean.getAge())";
7171

7272
Pointcut pointcut = getPointcut(expression);
7373
ClassFilter classFilter = pointcut.getClassFilter();
@@ -117,8 +117,8 @@ public void testTarget() throws SecurityException, NoSuchMethodException {
117117
* @param which this or target
118118
*/
119119
private void testThisOrTarget(String which) throws SecurityException, NoSuchMethodException {
120-
String matchesTestBean = which + "(org.springframework.beans.test.fixtures.beans.TestBean)";
121-
String matchesIOther = which + "(org.springframework.beans.test.fixtures.beans.IOther)";
120+
String matchesTestBean = which + "(org.springframework.beans.testfixture.beans.TestBean)";
121+
String matchesIOther = which + "(org.springframework.beans.testfixture.beans.IOther)";
122122
AspectJExpressionPointcut testBeanPc = new AspectJExpressionPointcut();
123123
testBeanPc.setExpression(matchesTestBean);
124124

@@ -142,7 +142,7 @@ public void testWithinRootAndSubpackages() throws SecurityException, NoSuchMetho
142142
}
143143

144144
private void testWithinPackage(boolean matchSubpackages) throws SecurityException, NoSuchMethodException {
145-
String withinBeansPackage = "within(org.springframework.beans.test.fixtures.beans.";
145+
String withinBeansPackage = "within(org.springframework.beans.testfixture.beans.";
146146
// Subpackages are matched by **
147147
if (matchSubpackages) {
148148
withinBeansPackage += ".";
@@ -187,7 +187,7 @@ public void testFriendlyErrorOnNoLocation3ArgMatching() {
187187

188188
@Test
189189
public void testMatchWithArgs() throws Exception {
190-
String expression = "execution(void org.springframework.beans.test.fixtures.beans.TestBean.setSomeNumber(Number)) && args(Double)";
190+
String expression = "execution(void org.springframework.beans.testfixture.beans.TestBean.setSomeNumber(Number)) && args(Double)";
191191

192192
Pointcut pointcut = getPointcut(expression);
193193
ClassFilter classFilter = pointcut.getClassFilter();
@@ -206,7 +206,7 @@ public void testMatchWithArgs() throws Exception {
206206

207207
@Test
208208
public void testSimpleAdvice() {
209-
String expression = "execution(int org.springframework.beans.test.fixtures.beans.TestBean.getAge())";
209+
String expression = "execution(int org.springframework.beans.testfixture.beans.TestBean.getAge())";
210210
CallCountingInterceptor interceptor = new CallCountingInterceptor();
211211
TestBean testBean = getAdvisedProxy(expression, interceptor);
212212

@@ -219,7 +219,7 @@ public void testSimpleAdvice() {
219219

220220
@Test
221221
public void testDynamicMatchingProxy() {
222-
String expression = "execution(void org.springframework.beans.test.fixtures.beans.TestBean.setSomeNumber(Number)) && args(Double)";
222+
String expression = "execution(void org.springframework.beans.testfixture.beans.TestBean.setSomeNumber(Number)) && args(Double)";
223223
CallCountingInterceptor interceptor = new CallCountingInterceptor();
224224
TestBean testBean = getAdvisedProxy(expression, interceptor);
225225

@@ -233,7 +233,7 @@ public void testDynamicMatchingProxy() {
233233

234234
@Test
235235
public void testInvalidExpression() {
236-
String expression = "execution(void org.springframework.beans.test.fixtures.beans.TestBean.setSomeNumber(Number) && args(Double)";
236+
String expression = "execution(void org.springframework.beans.testfixture.beans.TestBean.setSomeNumber(Number) && args(Double)";
237237
assertThatIllegalArgumentException().isThrownBy(
238238
getPointcut(expression)::getClassFilter); // call to getClassFilter forces resolution
239239
}
@@ -264,7 +264,7 @@ private void assertMatchesTestBeanClass(ClassFilter classFilter) {
264264

265265
@Test
266266
public void testWithUnsupportedPointcutPrimitive() {
267-
String expression = "call(int org.springframework.beans.test.fixtures.beans.TestBean.getAge())";
267+
String expression = "call(int org.springframework.beans.testfixture.beans.TestBean.getAge())";
268268
assertThatExceptionOfType(UnsupportedPointcutPrimitiveException.class).isThrownBy(() ->
269269
getPointcut(expression).getClassFilter()) // call to getClassFilter forces resolution...
270270
.satisfies(ex -> assertThat(ex.getUnsupportedPrimitive()).isEqualTo(PointcutPrimitive.CALL));

spring-aop/src/test/java/org/springframework/aop/aspectj/BeanNamePointcutMatchingTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
import org.junit.jupiter.api.Test;
2020

21-
import org.springframework.beans.test.fixtures.beans.TestBean;
21+
import org.springframework.beans.testfixture.beans.TestBean;
2222

2323
import static org.assertj.core.api.Assertions.assertThat;
2424

spring-aop/src/test/java/org/springframework/aop/aspectj/MethodInvocationProceedingJoinPointTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@
3333
import org.springframework.aop.framework.ProxyFactory;
3434
import org.springframework.aop.interceptor.ExposeInvocationInterceptor;
3535
import org.springframework.aop.support.AopUtils;
36-
import org.springframework.beans.test.fixtures.beans.ITestBean;
37-
import org.springframework.beans.test.fixtures.beans.TestBean;
36+
import org.springframework.beans.testfixture.beans.ITestBean;
37+
import org.springframework.beans.testfixture.beans.TestBean;
3838

3939
import static org.assertj.core.api.Assertions.assertThat;
4040
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;

spring-aop/src/test/java/org/springframework/aop/aspectj/TigerAspectJExpressionPointcutTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
import test.annotation.transaction.Tx;
2828

2929
import org.springframework.aop.framework.ProxyFactory;
30-
import org.springframework.beans.test.fixtures.beans.TestBean;
30+
import org.springframework.beans.testfixture.beans.TestBean;
3131

3232
import static org.assertj.core.api.Assertions.assertThat;
3333

@@ -56,7 +56,7 @@ public void setup() throws NoSuchMethodException {
5656

5757
@Test
5858
public void testMatchGenericArgument() {
59-
String expression = "execution(* set*(java.util.List<org.springframework.beans.test.fixtures.beans.TestBean>) )";
59+
String expression = "execution(* set*(java.util.List<org.springframework.beans.testfixture.beans.TestBean>) )";
6060
AspectJExpressionPointcut ajexp = new AspectJExpressionPointcut();
6161
ajexp.setExpression(expression);
6262

spring-aop/src/test/java/org/springframework/aop/aspectj/TypePatternClassFilterTests.java

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@
2020

2121
import org.springframework.beans.factory.BeanFactory;
2222
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
23-
import org.springframework.beans.test.fixtures.beans.CountingTestBean;
24-
import org.springframework.beans.test.fixtures.beans.IOther;
25-
import org.springframework.beans.test.fixtures.beans.ITestBean;
26-
import org.springframework.beans.test.fixtures.beans.TestBean;
27-
import org.springframework.beans.test.fixtures.beans.subpkg.DeepBean;
23+
import org.springframework.beans.testfixture.beans.CountingTestBean;
24+
import org.springframework.beans.testfixture.beans.IOther;
25+
import org.springframework.beans.testfixture.beans.ITestBean;
26+
import org.springframework.beans.testfixture.beans.TestBean;
27+
import org.springframework.beans.testfixture.beans.subpkg.DeepBean;
2828

2929
import static org.assertj.core.api.Assertions.assertThat;
3030
import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException;
@@ -57,7 +57,7 @@ void invocationOfMatchesMethodBlowsUpWhenNoTypePatternHasBeenSet() throws Except
5757

5858
@Test
5959
void validPatternMatching() {
60-
TypePatternClassFilter tpcf = new TypePatternClassFilter("org.springframework.beans.test.fixtures.beans.*");
60+
TypePatternClassFilter tpcf = new TypePatternClassFilter("org.springframework.beans.testfixture.beans.*");
6161

6262
assertThat(tpcf.matches(TestBean.class)).as("Must match: in package").isTrue();
6363
assertThat(tpcf.matches(ITestBean.class)).as("Must match: in package").isTrue();
@@ -70,7 +70,7 @@ void validPatternMatching() {
7070

7171
@Test
7272
void subclassMatching() {
73-
TypePatternClassFilter tpcf = new TypePatternClassFilter("org.springframework.beans.test.fixtures.beans.ITestBean+");
73+
TypePatternClassFilter tpcf = new TypePatternClassFilter("org.springframework.beans.testfixture.beans.ITestBean+");
7474

7575
assertThat(tpcf.matches(TestBean.class)).as("Must match: in package").isTrue();
7676
assertThat(tpcf.matches(ITestBean.class)).as("Must match: in package").isTrue();
@@ -98,8 +98,8 @@ void andOrNotReplacement() {
9898

9999
@Test
100100
void testEquals() {
101-
TypePatternClassFilter filter1 = new TypePatternClassFilter("org.springframework.beans.test.fixtures.beans.*");
102-
TypePatternClassFilter filter2 = new TypePatternClassFilter("org.springframework.beans.test.fixtures.beans.*");
101+
TypePatternClassFilter filter1 = new TypePatternClassFilter("org.springframework.beans.testfixture.beans.*");
102+
TypePatternClassFilter filter2 = new TypePatternClassFilter("org.springframework.beans.testfixture.beans.*");
103103
TypePatternClassFilter filter3 = new TypePatternClassFilter("org.springframework.tests.*");
104104

105105
assertThat(filter1).isEqualTo(filter2);
@@ -108,8 +108,8 @@ void testEquals() {
108108

109109
@Test
110110
void testHashCode() {
111-
TypePatternClassFilter filter1 = new TypePatternClassFilter("org.springframework.beans.test.fixtures.beans.*");
112-
TypePatternClassFilter filter2 = new TypePatternClassFilter("org.springframework.beans.test.fixtures.beans.*");
111+
TypePatternClassFilter filter1 = new TypePatternClassFilter("org.springframework.beans.testfixture.beans.*");
112+
TypePatternClassFilter filter2 = new TypePatternClassFilter("org.springframework.beans.testfixture.beans.*");
113113
TypePatternClassFilter filter3 = new TypePatternClassFilter("org.springframework.tests.*");
114114

115115
assertThat(filter1.hashCode()).isEqualTo(filter2.hashCode());
@@ -118,11 +118,11 @@ void testHashCode() {
118118

119119
@Test
120120
void testToString() {
121-
TypePatternClassFilter filter1 = new TypePatternClassFilter("org.springframework.beans.test.fixtures.beans.*");
122-
TypePatternClassFilter filter2 = new TypePatternClassFilter("org.springframework.beans.test.fixtures.beans.*");
121+
TypePatternClassFilter filter1 = new TypePatternClassFilter("org.springframework.beans.testfixture.beans.*");
122+
TypePatternClassFilter filter2 = new TypePatternClassFilter("org.springframework.beans.testfixture.beans.*");
123123

124124
assertThat(filter1.toString())
125-
.isEqualTo("org.springframework.aop.aspectj.TypePatternClassFilter: org.springframework.beans.test.fixtures.beans.*");
125+
.isEqualTo("org.springframework.aop.aspectj.TypePatternClassFilter: org.springframework.beans.testfixture.beans.*");
126126
assertThat(filter1.toString()).isEqualTo(filter2.toString());
127127
}
128128

spring-aop/src/test/java/org/springframework/aop/aspectj/annotation/AbstractAspectJAdvisorFactoryTests.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@
5050
import org.springframework.aop.framework.ProxyFactory;
5151
import org.springframework.aop.interceptor.ExposeInvocationInterceptor;
5252
import org.springframework.aop.support.AopUtils;
53-
import org.springframework.beans.test.fixtures.beans.ITestBean;
54-
import org.springframework.beans.test.fixtures.beans.TestBean;
53+
import org.springframework.beans.testfixture.beans.ITestBean;
54+
import org.springframework.beans.testfixture.beans.TestBean;
5555
import org.springframework.core.OrderComparator;
5656
import org.springframework.core.Ordered;
5757
import org.springframework.core.annotation.Order;
@@ -590,7 +590,7 @@ public void countSetter() {
590590
}
591591

592592

593-
@Aspect("pertypewithin(org.springframework.beans.test.fixtures.beans.IOther+)")
593+
@Aspect("pertypewithin(org.springframework.beans.testfixture.beans.IOther+)")
594594
public static class PerTypeWithinAspect {
595595

596596
public int count;
@@ -931,7 +931,7 @@ private Method getGetterFromSetter(Method setter) {
931931
@Aspect
932932
class MakeITestBeanModifiable extends AbstractMakeModifiable {
933933

934-
@DeclareParents(value = "org.springframework.beans.test.fixtures.beans.ITestBean+",
934+
@DeclareParents(value = "org.springframework.beans.testfixture.beans.ITestBean+",
935935
defaultImpl=ModifiableImpl.class)
936936
public static MutableModifiable mixin;
937937

0 commit comments

Comments
 (0)