Browse Source

Use Gradle test fixture support for spring-aop

See gh-23550
pull/24287/head
Sam Brannen 6 years ago
parent
commit
8a371c7669
  1. 3
      buildSrc/src/main/java/org/springframework/build/testsources/TestSourcesPlugin.java
  2. 1
      integration-tests/integration-tests.gradle
  3. 6
      integration-tests/src/test/java/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorIntegrationTests.java
  4. 2
      integration-tests/src/test/resources/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorIntegrationTests-context.xml
  5. 1
      spring-aop/spring-aop.gradle
  6. 30
      spring-aop/src/test/java/org/springframework/aop/framework/ProxyFactoryTests.java
  7. 24
      spring-aop/src/test/java/org/springframework/aop/framework/adapter/ThrowsAdviceInterceptorTests.java
  8. 2
      spring-aop/src/test/java/org/springframework/aop/support/AopUtilsTests.java
  9. 2
      spring-aop/src/test/java/org/springframework/aop/support/ControlFlowPointcutTests.java
  10. 2
      spring-aop/src/test/java/org/springframework/aop/support/DelegatingIntroductionInterceptorTests.java
  11. 4
      spring-aop/src/test/java/org/springframework/aop/support/NameMatchMethodPointcutTests.java
  12. 4
      spring-aop/src/test/java/org/springframework/aop/support/RegexpMethodPointcutAdvisorIntegrationTests.java
  13. 2
      spring-aop/src/test/java/org/springframework/aop/target/HotSwappableTargetSourceTests.java
  14. 4
      spring-aop/src/test/resources/org/springframework/aop/interceptor/ExposeInvocationInterceptorTests-context.xml
  15. 2
      spring-aop/src/test/resources/org/springframework/aop/support/RegexpMethodPointcutAdvisorIntegrationTests-context.xml
  16. 2
      spring-aop/src/test/resources/org/springframework/aop/target/PrototypeTargetSourceTests-context.xml
  17. 2
      spring-aop/src/test/resources/org/springframework/aop/target/ThreadLocalTargetSourceTests-context.xml
  18. 4
      spring-aop/src/testFixtures/java/org/springframework/aop/testfixture/advice/CountingAfterReturningAdvice.java
  19. 4
      spring-aop/src/testFixtures/java/org/springframework/aop/testfixture/advice/CountingBeforeAdvice.java
  20. 4
      spring-aop/src/testFixtures/java/org/springframework/aop/testfixture/advice/MethodCounter.java
  21. 5
      spring-aop/src/testFixtures/java/org/springframework/aop/testfixture/advice/MyThrowsHandler.java
  22. 4
      spring-aop/src/testFixtures/java/org/springframework/aop/testfixture/advice/TimestampIntroductionAdvisor.java
  23. 2
      spring-aop/src/testFixtures/java/org/springframework/aop/testfixture/interceptor/NopInterceptor.java
  24. 2
      spring-aop/src/testFixtures/java/org/springframework/aop/testfixture/interceptor/SerializableNopInterceptor.java
  25. 2
      spring-aop/src/testFixtures/java/org/springframework/aop/testfixture/interceptor/TimestampIntroductionInterceptor.java
  26. 1
      spring-context/spring-context.gradle
  27. 2
      spring-context/src/test/java/org/springframework/aop/config/AopNamespaceHandlerTests.java
  28. 14
      spring-context/src/test/java/org/springframework/aop/framework/AbstractAopProxyTests.java
  29. 4
      spring-context/src/test/java/org/springframework/aop/framework/CglibProxyTests.java
  30. 8
      spring-context/src/test/java/org/springframework/aop/framework/ProxyFactoryBeanTests.java
  31. 4
      spring-context/src/test/java/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorTests.java
  32. 4
      spring-context/src/test/java/org/springframework/aop/framework/autoproxy/BeanNameAutoProxyCreatorTests.java
  33. 2
      spring-context/src/test/java/org/springframework/beans/factory/xml/support/CustomNamespaceHandlerTests.java
  34. 2
      spring-context/src/test/java/org/springframework/jmx/export/MBeanExporterTests.java
  35. 2
      spring-context/src/test/java/org/springframework/jmx/export/assembler/AbstractMetadataAssemblerTests.java
  36. 4
      spring-context/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerAdviceTypeTests-error.xml
  37. 4
      spring-context/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerAdviceTypeTests-ok.xml
  38. 4
      spring-context/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerArgNamesTests-error.xml
  39. 4
      spring-context/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerArgNamesTests-ok.xml
  40. 4
      spring-context/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerProxyTargetClassTests-context.xml
  41. 4
      spring-context/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerReturningTests-error.xml
  42. 4
      spring-context/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerReturningTests-ok.xml
  43. 4
      spring-context/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerTests-context.xml
  44. 4
      spring-context/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerThrowingTests-error.xml
  45. 4
      spring-context/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerThrowingTests-ok.xml
  46. 2
      spring-context/src/test/resources/org/springframework/aop/framework/ProxyFactoryBeanTests-autowiring.xml
  47. 2
      spring-context/src/test/resources/org/springframework/aop/framework/ProxyFactoryBeanTests-context.xml
  48. 2
      spring-context/src/test/resources/org/springframework/aop/framework/ProxyFactoryBeanTests-double-targetsource.xml
  49. 2
      spring-context/src/test/resources/org/springframework/aop/framework/ProxyFactoryBeanTests-frozen.xml
  50. 2
      spring-context/src/test/resources/org/springframework/aop/framework/ProxyFactoryBeanTests-inner-bean-target.xml
  51. 2
      spring-context/src/test/resources/org/springframework/aop/framework/ProxyFactoryBeanTests-notlast-targetsource.xml
  52. 2
      spring-context/src/test/resources/org/springframework/aop/framework/ProxyFactoryBeanTests-prototype.xml
  53. 4
      spring-context/src/test/resources/org/springframework/aop/framework/ProxyFactoryBeanTests-serialization.xml
  54. 4
      spring-context/src/test/resources/org/springframework/aop/framework/ProxyFactoryBeanTests-targetsource.xml
  55. 6
      spring-context/src/test/resources/org/springframework/aop/framework/ProxyFactoryBeanTests-throws-advice.xml
  56. 4
      spring-context/src/test/resources/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorTests-common-interceptors.xml
  57. 2
      spring-context/src/test/resources/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorTests-optimized.xml
  58. 8
      spring-context/src/test/resources/org/springframework/aop/framework/autoproxy/BeanNameAutoProxyCreatorTests-context.xml
  59. 4
      spring-context/src/test/resources/org/springframework/aop/target/CommonsPool2TargetSourceTests-context.xml

3
buildSrc/src/main/java/org/springframework/build/testsources/TestSourcesPlugin.java

@ -62,7 +62,8 @@ public class TestSourcesPlugin implements Plugin<Project> { @@ -62,7 +62,8 @@ public class TestSourcesPlugin implements Plugin<Project> {
private static final List<String> excludedProjects = Arrays.asList(
"integration-tests",
"kotlin-coroutines",
// "spring-aop",
"spring-aop",
"spring-aspects",
"spring-beans",
"spring-context",
"spring-context-indexer",

1
integration-tests/integration-tests.gradle

@ -7,6 +7,7 @@ dependencies { @@ -7,6 +7,7 @@ dependencies {
testCompile(project(":spring-beans"))
testCompile(project(":spring-context"))
testCompile(project(":spring-core"))
testCompile(testFixtures(project(":spring-aop")))
testCompile(testFixtures(project(":spring-beans")))
testCompile(testFixtures(project(":spring-core")))
testCompile(testFixtures(project(":spring-tx")))

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

@ -26,14 +26,14 @@ import org.junit.jupiter.api.Test; @@ -26,14 +26,14 @@ import org.junit.jupiter.api.Test;
import org.springframework.aop.support.AopUtils;
import org.springframework.aop.support.StaticMethodMatcherPointcutAdvisor;
import org.springframework.aop.testfixture.advice.CountingBeforeAdvice;
import org.springframework.aop.testfixture.advice.MethodCounter;
import org.springframework.aop.testfixture.interceptor.NopInterceptor;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.testfixture.beans.ITestBean;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.lang.Nullable;
import org.springframework.tests.aop.advice.CountingBeforeAdvice;
import org.springframework.tests.aop.advice.MethodCounter;
import org.springframework.tests.aop.interceptor.NopInterceptor;
import org.springframework.transaction.NoTransactionException;
import org.springframework.transaction.interceptor.TransactionInterceptor;
import org.springframework.transaction.testfixture.CallCountingTransactionManager;

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

@ -85,7 +85,7 @@ @@ -85,7 +85,7 @@
<property name="pattern"><value>org.springframework.beans.testfixture.beans.ITestBean.getName</value></property>
</bean>
<bean id="countingAdvice" class="org.springframework.tests.aop.advice.CountingAfterReturningAdvice"/>
<bean id="countingAdvice" class="org.springframework.aop.testfixture.advice.CountingAfterReturningAdvice"/>
<bean id="test" class="org.springframework.beans.testfixture.beans.TestBean">
<property name="age"><value>4</value></property>

1
spring-aop/spring-aop.gradle

@ -8,4 +8,5 @@ dependencies { @@ -8,4 +8,5 @@ dependencies {
optional("com.jamonapi:jamon")
testCompile(testFixtures(project(":spring-beans")))
testCompile(testFixtures(project(":spring-core")))
testFixturesImplementation(testFixtures(project(":spring-core")))
}

30
spring-aop/src/test/java/org/springframework/aop/framework/ProxyFactoryTests.java

@ -33,15 +33,15 @@ import org.springframework.aop.interceptor.DebugInterceptor; @@ -33,15 +33,15 @@ import org.springframework.aop.interceptor.DebugInterceptor;
import org.springframework.aop.support.AopUtils;
import org.springframework.aop.support.DefaultIntroductionAdvisor;
import org.springframework.aop.support.DefaultPointcutAdvisor;
import org.springframework.aop.support.DelegatingIntroductionInterceptor;
import org.springframework.aop.testfixture.advice.CountingBeforeAdvice;
import org.springframework.aop.testfixture.interceptor.NopInterceptor;
import org.springframework.aop.testfixture.interceptor.TimestampIntroductionInterceptor;
import org.springframework.beans.testfixture.beans.IOther;
import org.springframework.beans.testfixture.beans.ITestBean;
import org.springframework.beans.testfixture.beans.TestBean;
import org.springframework.core.annotation.AnnotationAwareOrderComparator;
import org.springframework.core.annotation.Order;
import org.springframework.core.testfixture.TimeStamped;
import org.springframework.tests.aop.advice.CountingBeforeAdvice;
import org.springframework.tests.aop.interceptor.NopInterceptor;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
@ -371,30 +371,6 @@ public class ProxyFactoryTests { @@ -371,30 +371,6 @@ public class ProxyFactoryTests {
}
@SuppressWarnings("serial")
private static class TimestampIntroductionInterceptor extends DelegatingIntroductionInterceptor
implements TimeStamped {
private long ts;
public TimestampIntroductionInterceptor() {
}
public TimestampIntroductionInterceptor(long ts) {
this.ts = ts;
}
public void setTime(long ts) {
this.ts = ts;
}
@Override
public long getTimeStamp() {
return ts;
}
}
@Order(2)
public static class A implements Runnable {

24
spring-aop/src/test/java/org/springframework/aop/framework/adapter/ThrowsAdviceInterceptorTests.java

@ -17,16 +17,13 @@ @@ -17,16 +17,13 @@
package org.springframework.aop.framework.adapter;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.lang.reflect.Method;
import java.rmi.ConnectException;
import java.rmi.RemoteException;
import org.aopalliance.intercept.MethodInvocation;
import org.junit.jupiter.api.Test;
import org.springframework.aop.ThrowsAdvice;
import org.springframework.tests.aop.advice.MethodCounter;
import org.springframework.aop.testfixture.advice.MyThrowsHandler;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
@ -128,23 +125,4 @@ public class ThrowsAdviceInterceptorTests { @@ -128,23 +125,4 @@ public class ThrowsAdviceInterceptorTests {
assertThat(th.getCalls("remoteException")).isEqualTo(1);
}
@SuppressWarnings("serial")
static class MyThrowsHandler extends MethodCounter implements ThrowsAdvice {
// Full method signature
public void afterThrowing(Method m, Object[] args, Object target, IOException ex) {
count("ioException");
}
public void afterThrowing(RemoteException ex) throws Throwable {
count("remoteException");
}
/** Not valid, wrong number of arguments */
public void afterThrowing(Method m, Exception ex) throws Throwable {
throw new UnsupportedOperationException("Shouldn't be called");
}
}
}

2
spring-aop/src/test/java/org/springframework/aop/support/AopUtilsTests.java

@ -25,10 +25,10 @@ import org.springframework.aop.MethodMatcher; @@ -25,10 +25,10 @@ import org.springframework.aop.MethodMatcher;
import org.springframework.aop.Pointcut;
import org.springframework.aop.interceptor.ExposeInvocationInterceptor;
import org.springframework.aop.target.EmptyTargetSource;
import org.springframework.aop.testfixture.interceptor.NopInterceptor;
import org.springframework.beans.testfixture.beans.TestBean;
import org.springframework.core.testfixture.io.SerializationTestUtils;
import org.springframework.lang.Nullable;
import org.springframework.tests.aop.interceptor.NopInterceptor;
import static org.assertj.core.api.Assertions.assertThat;

2
spring-aop/src/test/java/org/springframework/aop/support/ControlFlowPointcutTests.java

@ -20,9 +20,9 @@ import org.junit.jupiter.api.Test; @@ -20,9 +20,9 @@ import org.junit.jupiter.api.Test;
import org.springframework.aop.Pointcut;
import org.springframework.aop.framework.ProxyFactory;
import org.springframework.aop.testfixture.interceptor.NopInterceptor;
import org.springframework.beans.testfixture.beans.ITestBean;
import org.springframework.beans.testfixture.beans.TestBean;
import org.springframework.tests.aop.interceptor.NopInterceptor;
import static org.assertj.core.api.Assertions.assertThat;

2
spring-aop/src/test/java/org/springframework/aop/support/DelegatingIntroductionInterceptorTests.java

@ -24,6 +24,7 @@ import org.junit.jupiter.api.Test; @@ -24,6 +24,7 @@ import org.junit.jupiter.api.Test;
import org.springframework.aop.IntroductionAdvisor;
import org.springframework.aop.IntroductionInterceptor;
import org.springframework.aop.framework.ProxyFactory;
import org.springframework.aop.testfixture.interceptor.SerializableNopInterceptor;
import org.springframework.beans.testfixture.beans.INestedTestBean;
import org.springframework.beans.testfixture.beans.ITestBean;
import org.springframework.beans.testfixture.beans.NestedTestBean;
@ -32,7 +33,6 @@ import org.springframework.beans.testfixture.beans.SerializablePerson; @@ -32,7 +33,6 @@ import org.springframework.beans.testfixture.beans.SerializablePerson;
import org.springframework.beans.testfixture.beans.TestBean;
import org.springframework.core.testfixture.TimeStamped;
import org.springframework.core.testfixture.io.SerializationTestUtils;
import org.springframework.tests.aop.interceptor.SerializableNopInterceptor;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException;

4
spring-aop/src/test/java/org/springframework/aop/support/NameMatchMethodPointcutTests.java

@ -21,11 +21,11 @@ import org.junit.jupiter.api.Test; @@ -21,11 +21,11 @@ import org.junit.jupiter.api.Test;
import org.springframework.aop.framework.Advised;
import org.springframework.aop.framework.ProxyFactory;
import org.springframework.aop.testfixture.interceptor.NopInterceptor;
import org.springframework.aop.testfixture.interceptor.SerializableNopInterceptor;
import org.springframework.beans.testfixture.beans.Person;
import org.springframework.beans.testfixture.beans.SerializablePerson;
import org.springframework.core.testfixture.io.SerializationTestUtils;
import org.springframework.tests.aop.interceptor.NopInterceptor;
import org.springframework.tests.aop.interceptor.SerializableNopInterceptor;
import static org.assertj.core.api.Assertions.assertThat;

4
spring-aop/src/test/java/org/springframework/aop/support/RegexpMethodPointcutAdvisorIntegrationTests.java

@ -19,6 +19,8 @@ package org.springframework.aop.support; @@ -19,6 +19,8 @@ package org.springframework.aop.support;
import org.junit.jupiter.api.Test;
import org.springframework.aop.framework.Advised;
import org.springframework.aop.testfixture.interceptor.NopInterceptor;
import org.springframework.aop.testfixture.interceptor.SerializableNopInterceptor;
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
import org.springframework.beans.factory.xml.XmlBeanDefinitionReader;
import org.springframework.beans.testfixture.beans.ITestBean;
@ -26,8 +28,6 @@ import org.springframework.beans.testfixture.beans.Person; @@ -26,8 +28,6 @@ import org.springframework.beans.testfixture.beans.Person;
import org.springframework.beans.testfixture.beans.TestBean;
import org.springframework.core.io.Resource;
import org.springframework.core.testfixture.io.SerializationTestUtils;
import org.springframework.tests.aop.interceptor.NopInterceptor;
import org.springframework.tests.aop.interceptor.SerializableNopInterceptor;
import static org.assertj.core.api.Assertions.assertThat;
import static org.springframework.core.testfixture.io.ResourceTestUtils.qualifiedResource;

2
spring-aop/src/test/java/org/springframework/aop/target/HotSwappableTargetSourceTests.java

@ -23,13 +23,13 @@ import org.junit.jupiter.api.Test; @@ -23,13 +23,13 @@ import org.junit.jupiter.api.Test;
import org.springframework.aop.framework.Advised;
import org.springframework.aop.framework.ProxyFactory;
import org.springframework.aop.support.DefaultPointcutAdvisor;
import org.springframework.aop.testfixture.interceptor.SerializableNopInterceptor;
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
import org.springframework.beans.factory.xml.XmlBeanDefinitionReader;
import org.springframework.beans.testfixture.beans.Person;
import org.springframework.beans.testfixture.beans.SerializablePerson;
import org.springframework.beans.testfixture.beans.SideEffectBean;
import org.springframework.core.testfixture.io.SerializationTestUtils;
import org.springframework.tests.aop.interceptor.SerializableNopInterceptor;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException;

4
spring-aop/src/test/resources/org/springframework/aop/interceptor/ExposeInvocationInterceptorTests-context.xml

@ -6,7 +6,7 @@ @@ -6,7 +6,7 @@
-->
<beans>
<bean id="nopInterceptor" class="org.springframework.tests.aop.interceptor.NopInterceptor"/>
<bean id="nopInterceptor" class="org.springframework.aop.testfixture.interceptor.NopInterceptor"/>
<bean id="exposeInvocation" class="org.springframework.beans.factory.config.FieldRetrievingFactoryBean">
<property name="targetClass">
@ -15,7 +15,7 @@ @@ -15,7 +15,7 @@
<property name="targetField"><value>INSTANCE</value></property>
</bean>
<bean id="countingBeforeAdvice" class="org.springframework.tests.aop.advice.CountingBeforeAdvice"/>
<bean id="countingBeforeAdvice" class="org.springframework.aop.testfixture.advice.CountingBeforeAdvice"/>
<bean id="proxy" class="org.springframework.aop.framework.ProxyFactoryBean">
<property name="target">

2
spring-aop/src/test/resources/org/springframework/aop/support/RegexpMethodPointcutAdvisorIntegrationTests-context.xml

@ -9,7 +9,7 @@ @@ -9,7 +9,7 @@
<property name="age"><value>666</value></property>
</bean>
<bean id="nopInterceptor" class="org.springframework.tests.aop.interceptor.SerializableNopInterceptor"/>
<bean id="nopInterceptor" class="org.springframework.aop.testfixture.interceptor.SerializableNopInterceptor"/>
<bean id="settersAdvisor" class="org.springframework.aop.support.RegexpMethodPointcutAdvisor">
<property name="advice"><ref bean="nopInterceptor"/></property>

2
spring-aop/src/test/resources/org/springframework/aop/target/PrototypeTargetSourceTests-context.xml

@ -16,7 +16,7 @@ @@ -16,7 +16,7 @@
<property name="targetBeanName"><value>prototypeTest</value></property>
</bean>
<bean id="debugInterceptor" class="org.springframework.tests.aop.interceptor.NopInterceptor" />
<bean id="debugInterceptor" class="org.springframework.aop.testfixture.interceptor.NopInterceptor" />
<bean id="singleton" class="org.springframework.aop.framework.ProxyFactoryBean">
<property name="interceptorNames"><value>debugInterceptor,test</value></property>

2
spring-aop/src/test/resources/org/springframework/aop/target/ThreadLocalTargetSourceTests-context.xml

@ -11,7 +11,7 @@ @@ -11,7 +11,7 @@
<property name="targetBeanName"><value>prototypeTest</value></property>
</bean>
<bean id="debugInterceptor" class="org.springframework.tests.aop.interceptor.NopInterceptor" />
<bean id="debugInterceptor" class="org.springframework.aop.testfixture.interceptor.NopInterceptor" />
<!--
We want to invoke the getStatsMixin method on our ThreadLocal invoker

4
spring-aop/src/test/java/org/springframework/tests/aop/advice/CountingAfterReturningAdvice.java → spring-aop/src/testFixtures/java/org/springframework/aop/testfixture/advice/CountingAfterReturningAdvice.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.tests.aop.advice;
package org.springframework.aop.testfixture.advice;
import java.lang.reflect.Method;

4
spring-aop/src/test/java/org/springframework/tests/aop/advice/CountingBeforeAdvice.java → spring-aop/src/testFixtures/java/org/springframework/aop/testfixture/advice/CountingBeforeAdvice.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.tests.aop.advice;
package org.springframework.aop.testfixture.advice;
import java.lang.reflect.Method;

4
spring-aop/src/test/java/org/springframework/tests/aop/advice/MethodCounter.java → spring-aop/src/testFixtures/java/org/springframework/aop/testfixture/advice/MethodCounter.java

@ -1,5 +1,5 @@ @@ -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 @@ @@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.tests.aop.advice;
package org.springframework.aop.testfixture.advice;
import java.io.Serializable;
import java.lang.reflect.Method;

5
spring-aop/src/test/java/org/springframework/tests/aop/advice/MyThrowsHandler.java → spring-aop/src/testFixtures/java/org/springframework/aop/testfixture/advice/MyThrowsHandler.java

@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.tests.aop.advice;
package org.springframework.aop.testfixture.advice;
import java.io.IOException;
import java.lang.reflect.Method;
@ -24,10 +24,12 @@ import org.springframework.aop.ThrowsAdvice; @@ -24,10 +24,12 @@ import org.springframework.aop.ThrowsAdvice;
@SuppressWarnings("serial")
public class MyThrowsHandler extends MethodCounter implements ThrowsAdvice {
// Full method signature
public void afterThrowing(Method m, Object[] args, Object target, IOException ex) {
count("ioException");
}
public void afterThrowing(RemoteException ex) throws Throwable {
count("remoteException");
}
@ -36,4 +38,5 @@ public class MyThrowsHandler extends MethodCounter implements ThrowsAdvice { @@ -36,4 +38,5 @@ public class MyThrowsHandler extends MethodCounter implements ThrowsAdvice {
public void afterThrowing(Method m, Exception ex) throws Throwable {
throw new UnsupportedOperationException("Shouldn't be called");
}
}

4
spring-aop/src/test/java/org/springframework/tests/aop/advice/TimestampIntroductionAdvisor.java → spring-aop/src/testFixtures/java/org/springframework/aop/testfixture/advice/TimestampIntroductionAdvisor.java

@ -14,11 +14,11 @@ @@ -14,11 +14,11 @@
* limitations under the License.
*/
package org.springframework.tests.aop.advice;
package org.springframework.aop.testfixture.advice;
import org.springframework.aop.support.DefaultIntroductionAdvisor;
import org.springframework.aop.support.DelegatingIntroductionInterceptor;
import org.springframework.tests.aop.interceptor.TimestampIntroductionInterceptor;
import org.springframework.aop.testfixture.interceptor.TimestampIntroductionInterceptor;
/**
* @author Rod Johnson

2
spring-aop/src/test/java/org/springframework/tests/aop/interceptor/NopInterceptor.java → spring-aop/src/testFixtures/java/org/springframework/aop/testfixture/interceptor/NopInterceptor.java

@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.tests.aop.interceptor;
package org.springframework.aop.testfixture.interceptor;
import org.aopalliance.intercept.MethodInterceptor;
import org.aopalliance.intercept.MethodInvocation;

2
spring-aop/src/test/java/org/springframework/tests/aop/interceptor/SerializableNopInterceptor.java → spring-aop/src/testFixtures/java/org/springframework/aop/testfixture/interceptor/SerializableNopInterceptor.java

@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.tests.aop.interceptor;
package org.springframework.aop.testfixture.interceptor;
import java.io.Serializable;

2
spring-aop/src/test/java/org/springframework/tests/aop/interceptor/TimestampIntroductionInterceptor.java → spring-aop/src/testFixtures/java/org/springframework/aop/testfixture/interceptor/TimestampIntroductionInterceptor.java

@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.tests.aop.interceptor;
package org.springframework.aop.testfixture.interceptor;
import org.springframework.aop.support.DelegatingIntroductionInterceptor;
import org.springframework.core.testfixture.TimeStamped;

1
spring-context/spring-context.gradle

@ -26,6 +26,7 @@ dependencies { @@ -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-aop")))
testCompile(testFixtures(project(":spring-beans")))
testCompile(testFixtures(project(":spring-core")))
testCompile("io.projectreactor:reactor-core")

2
spring-context/src/test/java/org/springframework/aop/config/AopNamespaceHandlerTests.java

@ -23,11 +23,11 @@ import org.junit.jupiter.api.Test; @@ -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.aop.testfixture.advice.CountingBeforeAdvice;
import org.springframework.beans.testfixture.beans.ITestBean;
import org.springframework.beans.testfixture.beans.TestBean;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.tests.aop.advice.CountingBeforeAdvice;
import static org.assertj.core.api.Assertions.assertThat;

14
spring-context/src/test/java/org/springframework/aop/framework/AbstractAopProxyTests.java

@ -57,6 +57,13 @@ import org.springframework.aop.support.Pointcuts; @@ -57,6 +57,13 @@ 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.aop.testfixture.advice.CountingAfterReturningAdvice;
import org.springframework.aop.testfixture.advice.CountingBeforeAdvice;
import org.springframework.aop.testfixture.advice.MethodCounter;
import org.springframework.aop.testfixture.advice.MyThrowsHandler;
import org.springframework.aop.testfixture.interceptor.NopInterceptor;
import org.springframework.aop.testfixture.interceptor.SerializableNopInterceptor;
import org.springframework.aop.testfixture.interceptor.TimestampIntroductionInterceptor;
import org.springframework.beans.testfixture.beans.IOther;
import org.springframework.beans.testfixture.beans.ITestBean;
import org.springframework.beans.testfixture.beans.Person;
@ -67,13 +74,6 @@ import org.springframework.core.testfixture.TestGroup; @@ -67,13 +74,6 @@ import org.springframework.core.testfixture.TestGroup;
import org.springframework.core.testfixture.TimeStamped;
import org.springframework.core.testfixture.io.SerializationTestUtils;
import org.springframework.lang.Nullable;
import org.springframework.tests.aop.advice.CountingAfterReturningAdvice;
import org.springframework.tests.aop.advice.CountingBeforeAdvice;
import org.springframework.tests.aop.advice.MethodCounter;
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.util.StopWatch;
import static org.assertj.core.api.Assertions.assertThat;

4
spring-context/src/test/java/org/springframework/aop/framework/CglibProxyTests.java

@ -28,13 +28,13 @@ import org.springframework.aop.MethodMatcher; @@ -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.aop.testfixture.advice.CountingBeforeAdvice;
import org.springframework.aop.testfixture.interceptor.NopInterceptor;
import org.springframework.beans.testfixture.beans.ITestBean;
import org.springframework.beans.testfixture.beans.TestBean;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextException;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.tests.aop.advice.CountingBeforeAdvice;
import org.springframework.tests.aop.interceptor.NopInterceptor;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;

8
spring-context/src/test/java/org/springframework/aop/framework/ProxyFactoryBeanTests.java

@ -38,6 +38,10 @@ import org.springframework.aop.support.AopUtils; @@ -38,6 +38,10 @@ import org.springframework.aop.support.AopUtils;
import org.springframework.aop.support.DefaultIntroductionAdvisor;
import org.springframework.aop.support.DefaultPointcutAdvisor;
import org.springframework.aop.support.DynamicMethodMatcherPointcut;
import org.springframework.aop.testfixture.advice.CountingBeforeAdvice;
import org.springframework.aop.testfixture.advice.MyThrowsHandler;
import org.springframework.aop.testfixture.interceptor.NopInterceptor;
import org.springframework.aop.testfixture.interceptor.TimestampIntroductionInterceptor;
import org.springframework.beans.factory.BeanCreationException;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.FactoryBean;
@ -55,10 +59,6 @@ import org.springframework.core.io.ClassPathResource; @@ -55,10 +59,6 @@ import org.springframework.core.io.ClassPathResource;
import org.springframework.core.testfixture.TimeStamped;
import org.springframework.core.testfixture.io.SerializationTestUtils;
import org.springframework.lang.Nullable;
import org.springframework.tests.aop.advice.CountingBeforeAdvice;
import org.springframework.tests.aop.advice.MyThrowsHandler;
import org.springframework.tests.aop.interceptor.NopInterceptor;
import org.springframework.tests.aop.interceptor.TimestampIntroductionInterceptor;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;

4
spring-context/src/test/java/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorTests.java

@ -30,12 +30,12 @@ import org.springframework.aop.target.CommonsPool2TargetSource; @@ -30,12 +30,12 @@ import org.springframework.aop.target.CommonsPool2TargetSource;
import org.springframework.aop.target.LazyInitTargetSource;
import org.springframework.aop.target.PrototypeTargetSource;
import org.springframework.aop.target.ThreadLocalTargetSource;
import org.springframework.aop.testfixture.advice.CountingBeforeAdvice;
import org.springframework.aop.testfixture.interceptor.NopInterceptor;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.testfixture.beans.CountingTestBean;
import org.springframework.beans.testfixture.beans.ITestBean;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.tests.aop.advice.CountingBeforeAdvice;
import org.springframework.tests.aop.interceptor.NopInterceptor;
import static org.assertj.core.api.Assertions.assertThat;

4
spring-context/src/test/java/org/springframework/aop/framework/autoproxy/BeanNameAutoProxyCreatorTests.java

@ -23,14 +23,14 @@ import test.mixin.LockedException; @@ -23,14 +23,14 @@ import test.mixin.LockedException;
import org.springframework.aop.framework.Advised;
import org.springframework.aop.support.AopUtils;
import org.springframework.aop.testfixture.advice.CountingBeforeAdvice;
import org.springframework.aop.testfixture.interceptor.NopInterceptor;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.FactoryBean;
import org.springframework.beans.testfixture.beans.ITestBean;
import org.springframework.beans.testfixture.beans.TestBean;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.core.testfixture.TimeStamped;
import org.springframework.tests.aop.advice.CountingBeforeAdvice;
import org.springframework.tests.aop.interceptor.NopInterceptor;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;

2
spring-context/src/test/java/org/springframework/beans/factory/xml/support/CustomNamespaceHandlerTests.java

@ -34,6 +34,7 @@ import org.springframework.aop.config.AbstractInterceptorDrivenBeanDefinitionDec @@ -34,6 +34,7 @@ import org.springframework.aop.config.AbstractInterceptorDrivenBeanDefinitionDec
import org.springframework.aop.framework.Advised;
import org.springframework.aop.interceptor.DebugInterceptor;
import org.springframework.aop.support.AopUtils;
import org.springframework.aop.testfixture.interceptor.NopInterceptor;
import org.springframework.beans.BeanInstantiationException;
import org.springframework.beans.MutablePropertyValues;
import org.springframework.beans.factory.BeanCreationException;
@ -57,7 +58,6 @@ import org.springframework.context.ApplicationListener; @@ -57,7 +58,6 @@ 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 static java.lang.String.format;
import static org.assertj.core.api.Assertions.assertThat;

2
spring-context/src/test/java/org/springframework/jmx/export/MBeanExporterTests.java

@ -38,6 +38,7 @@ import javax.management.modelmbean.ModelMBeanInfo; @@ -38,6 +38,7 @@ import javax.management.modelmbean.ModelMBeanInfo;
import org.junit.jupiter.api.Test;
import org.springframework.aop.framework.ProxyFactory;
import org.springframework.aop.testfixture.interceptor.NopInterceptor;
import org.springframework.beans.factory.FactoryBean;
import org.springframework.beans.factory.support.BeanDefinitionBuilder;
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
@ -54,7 +55,6 @@ import org.springframework.jmx.export.assembler.SimpleReflectiveMBeanInfoAssembl @@ -54,7 +55,6 @@ import org.springframework.jmx.export.assembler.SimpleReflectiveMBeanInfoAssembl
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 static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;

2
spring-context/src/test/java/org/springframework/jmx/export/assembler/AbstractMetadataAssemblerTests.java

@ -29,12 +29,12 @@ import javax.management.modelmbean.ModelMBeanOperationInfo; @@ -29,12 +29,12 @@ import javax.management.modelmbean.ModelMBeanOperationInfo;
import org.junit.jupiter.api.Test;
import org.springframework.aop.framework.ProxyFactory;
import org.springframework.aop.testfixture.interceptor.NopInterceptor;
import org.springframework.jmx.IJmxTestBean;
import org.springframework.jmx.JmxTestBean;
import org.springframework.jmx.export.MBeanExporter;
import org.springframework.jmx.export.metadata.JmxAttributeSource;
import org.springframework.jmx.support.ObjectNameManager;
import org.springframework.tests.aop.interceptor.NopInterceptor;
import static org.assertj.core.api.Assertions.assertThat;

4
spring-context/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerAdviceTypeTests-error.xml

@ -15,9 +15,9 @@ @@ -15,9 +15,9 @@
</aop:config>
<bean id="getNameCounter" class="org.springframework.tests.aop.advice.CountingBeforeAdvice"/>
<bean id="getNameCounter" class="org.springframework.aop.testfixture.advice.CountingBeforeAdvice"/>
<bean id="getAgeCounter" class="org.springframework.tests.aop.advice.CountingBeforeAdvice"/>
<bean id="getAgeCounter" class="org.springframework.aop.testfixture.advice.CountingBeforeAdvice"/>
<bean id="testBean" class="org.springframework.beans.testfixture.beans.TestBean"/>

4
spring-context/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerAdviceTypeTests-ok.xml

@ -16,9 +16,9 @@ @@ -16,9 +16,9 @@
</aop:aspect>
</aop:config>
<bean id="getNameCounter" class="org.springframework.tests.aop.advice.CountingBeforeAdvice"/>
<bean id="getNameCounter" class="org.springframework.aop.testfixture.advice.CountingBeforeAdvice"/>
<bean id="getAgeCounter" class="org.springframework.tests.aop.advice.CountingBeforeAdvice"/>
<bean id="getAgeCounter" class="org.springframework.aop.testfixture.advice.CountingBeforeAdvice"/>
<bean id="testBean" class="org.springframework.beans.testfixture.beans.TestBean"/>

4
spring-context/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerArgNamesTests-error.xml

@ -12,9 +12,9 @@ @@ -12,9 +12,9 @@
</aop:aspect>
</aop:config>
<bean id="getNameCounter" class="org.springframework.tests.aop.advice.CountingBeforeAdvice"/>
<bean id="getNameCounter" class="org.springframework.aop.testfixture.advice.CountingBeforeAdvice"/>
<bean id="getAgeCounter" class="org.springframework.tests.aop.advice.CountingBeforeAdvice"/>
<bean id="getAgeCounter" class="org.springframework.aop.testfixture.advice.CountingBeforeAdvice"/>
<bean id="testBean" class="org.springframework.beans.testfixture.beans.TestBean"/>

4
spring-context/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerArgNamesTests-ok.xml

@ -12,9 +12,9 @@ @@ -12,9 +12,9 @@
</aop:aspect>
</aop:config>
<bean id="getNameCounter" class="org.springframework.tests.aop.advice.CountingBeforeAdvice"/>
<bean id="getNameCounter" class="org.springframework.aop.testfixture.advice.CountingBeforeAdvice"/>
<bean id="getAgeCounter" class="org.springframework.tests.aop.advice.CountingBeforeAdvice"/>
<bean id="getAgeCounter" class="org.springframework.aop.testfixture.advice.CountingBeforeAdvice"/>
<bean id="testBean" class="org.springframework.beans.testfixture.beans.TestBean"/>

4
spring-context/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerProxyTargetClassTests-context.xml

@ -19,9 +19,9 @@ @@ -19,9 +19,9 @@
</aop:config>
<bean id="getNameCounter" class="org.springframework.tests.aop.advice.CountingBeforeAdvice"/>
<bean id="getNameCounter" class="org.springframework.aop.testfixture.advice.CountingBeforeAdvice"/>
<bean id="getAgeCounter" class="org.springframework.tests.aop.advice.CountingBeforeAdvice"/>
<bean id="getAgeCounter" class="org.springframework.aop.testfixture.advice.CountingBeforeAdvice"/>
<bean id="testBean" class="org.springframework.beans.testfixture.beans.TestBean"/>

4
spring-context/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerReturningTests-error.xml

@ -11,9 +11,9 @@ @@ -11,9 +11,9 @@
</aop:aspect>
</aop:config>
<bean id="getNameCounter" class="org.springframework.tests.aop.advice.CountingBeforeAdvice"/>
<bean id="getNameCounter" class="org.springframework.aop.testfixture.advice.CountingBeforeAdvice"/>
<bean id="getAgeCounter" class="org.springframework.tests.aop.advice.CountingBeforeAdvice"/>
<bean id="getAgeCounter" class="org.springframework.aop.testfixture.advice.CountingBeforeAdvice"/>
<bean id="testBean" class="org.springframework.beans.testfixture.beans.TestBean"/>

4
spring-context/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerReturningTests-ok.xml

@ -11,9 +11,9 @@ @@ -11,9 +11,9 @@
</aop:aspect>
</aop:config>
<bean id="getNameCounter" class="org.springframework.tests.aop.advice.CountingBeforeAdvice"/>
<bean id="getNameCounter" class="org.springframework.aop.testfixture.advice.CountingBeforeAdvice"/>
<bean id="getAgeCounter" class="org.springframework.tests.aop.advice.CountingBeforeAdvice"/>
<bean id="getAgeCounter" class="org.springframework.aop.testfixture.advice.CountingBeforeAdvice"/>
<bean id="testBean" class="org.springframework.beans.testfixture.beans.TestBean"/>

4
spring-context/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerTests-context.xml

@ -19,9 +19,9 @@ @@ -19,9 +19,9 @@
</aop:config>
<bean id="getNameCounter" class="org.springframework.tests.aop.advice.CountingBeforeAdvice"/>
<bean id="getNameCounter" class="org.springframework.aop.testfixture.advice.CountingBeforeAdvice"/>
<bean id="getAgeCounter" class="org.springframework.tests.aop.advice.CountingBeforeAdvice"/>
<bean id="getAgeCounter" class="org.springframework.aop.testfixture.advice.CountingBeforeAdvice"/>
<bean id="testBean" class="org.springframework.beans.testfixture.beans.TestBean"/>

4
spring-context/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerThrowingTests-error.xml

@ -11,9 +11,9 @@ @@ -11,9 +11,9 @@
</aop:aspect>
</aop:config>
<bean id="getNameCounter" class="org.springframework.tests.aop.advice.CountingBeforeAdvice"/>
<bean id="getNameCounter" class="org.springframework.aop.testfixture.advice.CountingBeforeAdvice"/>
<bean id="getAgeCounter" class="org.springframework.tests.aop.advice.CountingBeforeAdvice"/>
<bean id="getAgeCounter" class="org.springframework.aop.testfixture.advice.CountingBeforeAdvice"/>
<bean id="testBean" class="org.springframework.beans.testfixture.beans.TestBean"/>

4
spring-context/src/test/resources/org/springframework/aop/config/AopNamespaceHandlerThrowingTests-ok.xml

@ -11,9 +11,9 @@ @@ -11,9 +11,9 @@
</aop:aspect>
</aop:config>
<bean id="getNameCounter" class="org.springframework.tests.aop.advice.CountingBeforeAdvice"/>
<bean id="getNameCounter" class="org.springframework.aop.testfixture.advice.CountingBeforeAdvice"/>
<bean id="getAgeCounter" class="org.springframework.tests.aop.advice.CountingBeforeAdvice"/>
<bean id="getAgeCounter" class="org.springframework.aop.testfixture.advice.CountingBeforeAdvice"/>
<bean id="testBean" class="org.springframework.beans.testfixture.beans.TestBean"/>

2
spring-context/src/test/resources/org/springframework/aop/framework/ProxyFactoryBeanTests-autowiring.xml

@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
<beans>
<bean id="debugInterceptor" class="org.springframework.tests.aop.interceptor.NopInterceptor"/>
<bean id="debugInterceptor" class="org.springframework.aop.testfixture.interceptor.NopInterceptor"/>
<bean id="testBean" class="org.springframework.aop.framework.ProxyFactoryBean">
<!-- Target is autowired, so can check type of parent without a guard -->

2
spring-context/src/test/resources/org/springframework/aop/framework/ProxyFactoryBeanTests-context.xml

@ -9,7 +9,7 @@ @@ -9,7 +9,7 @@
<property name="age"><value>666</value></property>
</bean>
<bean id="debugInterceptor" class="org.springframework.tests.aop.interceptor.NopInterceptor"/>
<bean id="debugInterceptor" class="org.springframework.aop.testfixture.interceptor.NopInterceptor"/>
<bean id="test1" class="org.springframework.aop.framework.ProxyFactoryBean">
<property name="interfaces"><value>org.springframework.beans.testfixture.beans.ITestBean</value></property>

2
spring-context/src/test/resources/org/springframework/aop/framework/ProxyFactoryBeanTests-double-targetsource.xml

@ -27,7 +27,7 @@ @@ -27,7 +27,7 @@
</bean>
<bean id="countingBeforeAdvice"
class="org.springframework.tests.aop.advice.CountingBeforeAdvice"
class="org.springframework.aop.testfixture.advice.CountingBeforeAdvice"
/>
<bean id="doubleTarget"

2
spring-context/src/test/resources/org/springframework/aop/framework/ProxyFactoryBeanTests-frozen.xml

@ -10,7 +10,7 @@ @@ -10,7 +10,7 @@
</bean>
<bean id="debugInterceptor" class="org.springframework.tests.aop.interceptor.NopInterceptor">
<bean id="debugInterceptor" class="org.springframework.aop.testfixture.interceptor.NopInterceptor">
</bean>
<bean id="frozen"

2
spring-context/src/test/resources/org/springframework/aop/framework/ProxyFactoryBeanTests-inner-bean-target.xml

@ -9,7 +9,7 @@ @@ -9,7 +9,7 @@
<beans>
<bean id="nopInterceptor" class="org.springframework.tests.aop.interceptor.NopInterceptor">
<bean id="nopInterceptor" class="org.springframework.aop.testfixture.interceptor.NopInterceptor">
</bean>
<bean id="testBean"

2
spring-context/src/test/resources/org/springframework/aop/framework/ProxyFactoryBeanTests-notlast-targetsource.xml

@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
</bean>
<bean id="countingBeforeAdvice"
class="org.springframework.tests.aop.advice.CountingBeforeAdvice"
class="org.springframework.aop.testfixture.advice.CountingBeforeAdvice"
/>
<!--

2
spring-context/src/test/resources/org/springframework/aop/framework/ProxyFactoryBeanTests-prototype.xml

@ -15,7 +15,7 @@ @@ -15,7 +15,7 @@
<property name="count"><value>10</value></property>
</bean>
<bean id="debugInterceptor" class="org.springframework.tests.aop.interceptor.NopInterceptor"/>
<bean id="debugInterceptor" class="org.springframework.aop.testfixture.interceptor.NopInterceptor"/>
<bean id="singleton" class="org.springframework.aop.framework.ProxyFactoryBean">
<property name="interceptorNames"><value>debugInterceptor,test</value></property>

4
spring-context/src/test/resources/org/springframework/aop/framework/ProxyFactoryBeanTests-serialization.xml

@ -6,9 +6,9 @@ @@ -6,9 +6,9 @@
-->
<beans>
<bean id="nopInterceptor" class="org.springframework.tests.aop.interceptor.NopInterceptor"/>
<bean id="nopInterceptor" class="org.springframework.aop.testfixture.interceptor.NopInterceptor"/>
<bean id="serializableNopInterceptor" class="org.springframework.tests.aop.interceptor.SerializableNopInterceptor"/>
<bean id="serializableNopInterceptor" class="org.springframework.aop.testfixture.interceptor.SerializableNopInterceptor"/>
<bean id="serializableSingleton" class="org.springframework.aop.framework.ProxyFactoryBean">
<property name="interceptorNames"><value>serializableNopInterceptor</value></property>

4
spring-context/src/test/resources/org/springframework/aop/framework/ProxyFactoryBeanTests-targetsource.xml

@ -13,11 +13,11 @@ @@ -13,11 +13,11 @@
<property name="name"><value>Adam</value></property>
</bean>
<bean id="nopInterceptor" class="org.springframework.tests.aop.interceptor.NopInterceptor">
<bean id="nopInterceptor" class="org.springframework.aop.testfixture.interceptor.NopInterceptor">
</bean>
<bean id="countingBeforeAdvice"
class="org.springframework.tests.aop.advice.CountingBeforeAdvice"
class="org.springframework.aop.testfixture.advice.CountingBeforeAdvice"
/>
<!--

6
spring-context/src/test/resources/org/springframework/aop/framework/ProxyFactoryBeanTests-throws-advice.xml

@ -11,11 +11,11 @@ @@ -11,11 +11,11 @@
<!-- Simple target -->
<bean id="target" class="org.springframework.aop.framework.Echo"/>
<bean id="nopInterceptor" class="org.springframework.tests.aop.interceptor.NopInterceptor"/>
<bean id="nopInterceptor" class="org.springframework.aop.testfixture.interceptor.NopInterceptor"/>
<bean id="countingBeforeAdvice" class="org.springframework.tests.aop.advice.CountingBeforeAdvice" />
<bean id="countingBeforeAdvice" class="org.springframework.aop.testfixture.advice.CountingBeforeAdvice" />
<bean id="throwsAdvice" class="org.springframework.tests.aop.advice.MyThrowsHandler"/>
<bean id="throwsAdvice" class="org.springframework.aop.testfixture.advice.MyThrowsHandler"/>
<bean id="throwsAdvised" class="org.springframework.aop.framework.ProxyFactoryBean">
<property name="interceptorNames">

4
spring-context/src/test/resources/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorTests-common-interceptors.xml

@ -17,7 +17,7 @@ @@ -17,7 +17,7 @@
</property>
</bean>
<bean id="nopInterceptor" class="org.springframework.tests.aop.interceptor.NopInterceptor"/>
<bean id="nopInterceptor" class="org.springframework.aop.testfixture.interceptor.NopInterceptor"/>
<bean id="pointcutAdvisor" class="org.springframework.aop.support.DefaultPointcutAdvisor">
<property name="pointcut">
@ -26,7 +26,7 @@ @@ -26,7 +26,7 @@
</bean>
</property>
<property name="advice">
<bean class="org.springframework.tests.aop.interceptor.NopInterceptor"/>
<bean class="org.springframework.aop.testfixture.interceptor.NopInterceptor"/>
</property>
</bean>

2
spring-context/src/test/resources/org/springframework/aop/framework/autoproxy/AdvisorAutoProxyCreatorTests-optimized.xml

@ -7,7 +7,7 @@ @@ -7,7 +7,7 @@
<property name="name" value="Optimized"/>
</bean>
<bean id="countingAdvice" class="org.springframework.tests.aop.advice.CountingBeforeAdvice"/>
<bean id="countingAdvice" class="org.springframework.aop.testfixture.advice.CountingBeforeAdvice"/>
<bean id="advisor" class="org.springframework.aop.support.RegexpMethodPointcutAdvisor">
<property name="advice" ref="countingAdvice"/>

8
spring-context/src/test/resources/org/springframework/aop/framework/autoproxy/BeanNameAutoProxyCreatorTests-context.xml

@ -59,7 +59,7 @@ @@ -59,7 +59,7 @@
</property>
</bean>
<bean id="timestampIntroduction" class="org.springframework.tests.aop.advice.TimestampIntroductionAdvisor"/>
<bean id="timestampIntroduction" class="org.springframework.aop.testfixture.advice.TimestampIntroductionAdvisor"/>
<!--
Stateful mixin. Note that singleton property is false.
@ -67,11 +67,11 @@ @@ -67,11 +67,11 @@
<bean id="lockableAdvisor" class="test.mixin.LockMixinAdvisor"
scope="prototype"/>
<bean id="countingBeforeAdvice" class="org.springframework.tests.aop.advice.CountingBeforeAdvice"/>
<bean id="countingBeforeAdvice" class="org.springframework.aop.testfixture.advice.CountingBeforeAdvice"/>
<bean id="nopInterceptor" class="org.springframework.tests.aop.interceptor.NopInterceptor"/>
<bean id="nopInterceptor" class="org.springframework.aop.testfixture.interceptor.NopInterceptor"/>
<bean id="introductionNopInterceptor" class="org.springframework.tests.aop.interceptor.NopInterceptor"/>
<bean id="introductionNopInterceptor" class="org.springframework.aop.testfixture.interceptor.NopInterceptor"/>
<bean id="introductionUsingJdk" class="org.springframework.beans.testfixture.beans.TestBean">
<property name="name"><value>introductionUsingJdk</value></property>

4
spring-context/src/test/resources/org/springframework/aop/target/CommonsPool2TargetSourceTests-context.xml

@ -17,7 +17,7 @@ @@ -17,7 +17,7 @@
<property name="targetMethod"><value>getPoolingConfigMixin</value></property>
</bean>
<bean id="nop" class="org.springframework.tests.aop.interceptor.NopInterceptor"/>
<bean id="nop" class="org.springframework.aop.testfixture.interceptor.NopInterceptor"/>
<!--
This will create a bean for each thread ("apartment")
@ -40,7 +40,7 @@ @@ -40,7 +40,7 @@
</bean>
<!-- Serialization tests using serializable target and advice -->
<bean id="serializableNop" class="org.springframework.tests.aop.interceptor.SerializableNopInterceptor" />
<bean id="serializableNop" class="org.springframework.aop.testfixture.interceptor.SerializableNopInterceptor" />
<bean id="prototypePerson" class="org.springframework.beans.testfixture.beans.SerializablePerson" scope="prototype"/>

Loading…
Cancel
Save