Browse Source

Migrate rest of test suite from JUnit 4 to JUnit Jupiter

This commit migrates the rest of Spring's test suite to JUnit Jupiter,
except spring-test which will be migrated in a separate commit.

See gh-23451
pull/23477/head
Sam Brannen 7 years ago
parent
commit
3f3e41923f
  1. 2
      spring-aop/src/test/java/org/springframework/aop/aspectj/AspectJAdviceParameterNameDiscoverAnnotationTests.java
  2. 2
      spring-aop/src/test/java/org/springframework/aop/aspectj/AspectJAdviceParameterNameDiscovererTests.java
  3. 6
      spring-aop/src/test/java/org/springframework/aop/aspectj/AspectJExpressionPointcutTests.java
  4. 2
      spring-aop/src/test/java/org/springframework/aop/aspectj/BeanNamePointcutMatchingTests.java
  5. 2
      spring-aop/src/test/java/org/springframework/aop/aspectj/MethodInvocationProceedingJoinPointTests.java
  6. 2
      spring-aop/src/test/java/org/springframework/aop/aspectj/TigerAspectJAdviceParameterNameDiscovererTests.java
  7. 6
      spring-aop/src/test/java/org/springframework/aop/aspectj/TigerAspectJExpressionPointcutTests.java
  8. 2
      spring-aop/src/test/java/org/springframework/aop/aspectj/TrickyAspectJPointcutExpressionTests.java
  9. 2
      spring-aop/src/test/java/org/springframework/aop/aspectj/TypePatternClassFilterTests.java
  10. 6
      spring-aop/src/test/java/org/springframework/aop/aspectj/annotation/AbstractAspectJAdvisorFactoryTests.java
  11. 2
      spring-aop/src/test/java/org/springframework/aop/aspectj/annotation/ArgumentBindingTests.java
  12. 2
      spring-aop/src/test/java/org/springframework/aop/aspectj/annotation/AspectJPointcutAdvisorTests.java
  13. 2
      spring-aop/src/test/java/org/springframework/aop/aspectj/annotation/AspectMetadataTests.java
  14. 2
      spring-aop/src/test/java/org/springframework/aop/aspectj/annotation/AspectProxyFactoryTests.java
  15. 6
      spring-aop/src/test/java/org/springframework/aop/aspectj/autoproxy/AspectJNamespaceHandlerTests.java
  16. 6
      spring-aop/src/test/java/org/springframework/aop/aspectj/autoproxy/AspectJPrecedenceComparatorTests.java
  17. 6
      spring-aop/src/test/java/org/springframework/aop/config/AopNamespaceHandlerEventTests.java
  18. 2
      spring-aop/src/test/java/org/springframework/aop/config/AopNamespaceHandlerPointcutErrorTests.java
  19. 2
      spring-aop/src/test/java/org/springframework/aop/config/TopLevelAopTagTests.java
  20. 2
      spring-aop/src/test/java/org/springframework/aop/framework/AopProxyUtilsTests.java
  21. 2
      spring-aop/src/test/java/org/springframework/aop/framework/IntroductionBenchmarkTests.java
  22. 2
      spring-aop/src/test/java/org/springframework/aop/framework/MethodInvocationTests.java
  23. 2
      spring-aop/src/test/java/org/springframework/aop/framework/NullPrimitiveTests.java
  24. 2
      spring-aop/src/test/java/org/springframework/aop/framework/PrototypeTargetTests.java
  25. 6
      spring-aop/src/test/java/org/springframework/aop/framework/ProxyFactoryTests.java
  26. 2
      spring-aop/src/test/java/org/springframework/aop/framework/adapter/ThrowsAdviceInterceptorTests.java
  27. 2
      spring-aop/src/test/java/org/springframework/aop/interceptor/ConcurrencyThrottleInterceptorTests.java
  28. 2
      spring-aop/src/test/java/org/springframework/aop/interceptor/CustomizableTraceInterceptorTests.java
  29. 2
      spring-aop/src/test/java/org/springframework/aop/interceptor/DebugInterceptorTests.java
  30. 2
      spring-aop/src/test/java/org/springframework/aop/interceptor/ExposeBeanNameAdvisorsTests.java
  31. 2
      spring-aop/src/test/java/org/springframework/aop/interceptor/ExposeInvocationInterceptorTests.java
  32. 10
      spring-aop/src/test/java/org/springframework/aop/interceptor/JamonPerformanceMonitorInterceptorTests.java
  33. 2
      spring-aop/src/test/java/org/springframework/aop/interceptor/PerformanceMonitorInterceptorTests.java
  34. 2
      spring-aop/src/test/java/org/springframework/aop/interceptor/SimpleTraceInterceptorTests.java
  35. 2
      spring-aop/src/test/java/org/springframework/aop/scope/DefaultScopedObjectTests.java
  36. 2
      spring-aop/src/test/java/org/springframework/aop/scope/ScopedProxyAutowireTests.java
  37. 6
      spring-aop/src/test/java/org/springframework/aop/support/AbstractRegexpMethodPointcutTests.java
  38. 2
      spring-aop/src/test/java/org/springframework/aop/support/AopUtilsTests.java
  39. 2
      spring-aop/src/test/java/org/springframework/aop/support/ClassFiltersTests.java
  40. 2
      spring-aop/src/test/java/org/springframework/aop/support/ClassUtilsTests.java
  41. 2
      spring-aop/src/test/java/org/springframework/aop/support/ComposablePointcutTests.java
  42. 2
      spring-aop/src/test/java/org/springframework/aop/support/ControlFlowPointcutTests.java
  43. 2
      spring-aop/src/test/java/org/springframework/aop/support/DelegatingIntroductionInterceptorTests.java
  44. 2
      spring-aop/src/test/java/org/springframework/aop/support/MethodMatchersTests.java
  45. 6
      spring-aop/src/test/java/org/springframework/aop/support/NameMatchMethodPointcutTests.java
  46. 2
      spring-aop/src/test/java/org/springframework/aop/support/PointcutsTests.java
  47. 2
      spring-aop/src/test/java/org/springframework/aop/support/RegexpMethodPointcutAdvisorIntegrationTests.java
  48. 2
      spring-aop/src/test/java/org/springframework/aop/target/CommonsPool2TargetSourceProxyTests.java
  49. 10
      spring-aop/src/test/java/org/springframework/aop/target/HotSwappableTargetSourceTests.java
  50. 2
      spring-aop/src/test/java/org/springframework/aop/target/LazyCreationTargetSourceTests.java
  51. 2
      spring-aop/src/test/java/org/springframework/aop/target/LazyInitTargetSourceTests.java
  52. 2
      spring-aop/src/test/java/org/springframework/aop/target/PrototypeBasedTargetSourceTests.java
  53. 6
      spring-aop/src/test/java/org/springframework/aop/target/PrototypeTargetSourceTests.java
  54. 6
      spring-aop/src/test/java/org/springframework/aop/target/ThreadLocalTargetSourceTests.java
  55. 2
      spring-aop/src/test/java/org/springframework/aop/target/dynamic/RefreshableTargetSourceTests.java
  56. 2
      spring-aspects/src/test/java/org/springframework/aop/aspectj/autoproxy/AutoProxyWithCodeStyleAspectsTests.java
  57. 2
      spring-aspects/src/test/java/org/springframework/beans/factory/aspectj/SpringConfiguredWithAutoProxyingTests.java
  58. 2
      spring-aspects/src/test/java/org/springframework/beans/factory/aspectj/XmlBeanConfigurerTests.java
  59. 2
      spring-aspects/src/test/java/org/springframework/cache/aspectj/AspectJCacheAnnotationTests.java
  60. 10
      spring-aspects/src/test/java/org/springframework/cache/aspectj/AspectJEnableCachingIsolatedTests.java
  61. 2
      spring-aspects/src/test/java/org/springframework/context/annotation/aspectj/AnnotationBeanConfigurerTests.java
  62. 6
      spring-aspects/src/test/java/org/springframework/scheduling/aspectj/AnnotationAsyncExecutionAspectTests.java
  63. 10
      spring-aspects/src/test/java/org/springframework/scheduling/aspectj/AnnotationDrivenBeanDefinitionParserTests.java
  64. 12
      spring-aspects/src/test/java/org/springframework/transaction/aspectj/JtaTransactionAspectsTests.java
  65. 6
      spring-aspects/src/test/java/org/springframework/transaction/aspectj/TransactionAspectTests.java
  66. 16
      spring-beans/src/test/java/org/springframework/beans/AbstractPropertyAccessorTests.java
  67. 2
      spring-beans/src/test/java/org/springframework/beans/BeanUtilsTests.java
  68. 6
      spring-beans/src/test/java/org/springframework/beans/BeanWrapperAutoGrowingTests.java
  69. 2
      spring-beans/src/test/java/org/springframework/beans/BeanWrapperEnumTests.java
  70. 2
      spring-beans/src/test/java/org/springframework/beans/BeanWrapperGenericsTests.java
  71. 2
      spring-beans/src/test/java/org/springframework/beans/BeanWrapperTests.java
  72. 2
      spring-beans/src/test/java/org/springframework/beans/CachedIntrospectionResultsTests.java
  73. 2
      spring-beans/src/test/java/org/springframework/beans/ConcurrentBeanWrapperTests.java
  74. 2
      spring-beans/src/test/java/org/springframework/beans/DirectFieldAccessorTests.java
  75. 2
      spring-beans/src/test/java/org/springframework/beans/ExtendedBeanInfoFactoryTests.java
  76. 2
      spring-beans/src/test/java/org/springframework/beans/ExtendedBeanInfoTests.java
  77. 2
      spring-beans/src/test/java/org/springframework/beans/MutablePropertyValuesTests.java
  78. 2
      spring-beans/src/test/java/org/springframework/beans/PropertyAccessorUtilsTests.java
  79. 2
      spring-beans/src/test/java/org/springframework/beans/PropertyMatchesTests.java
  80. 2
      spring-beans/src/test/java/org/springframework/beans/SimplePropertyDescriptorTests.java
  81. 6
      spring-beans/src/test/java/org/springframework/beans/factory/BeanFactoryUtilsTests.java
  82. 6
      spring-beans/src/test/java/org/springframework/beans/factory/ConcurrentBeanFactoryTests.java
  83. 16
      spring-beans/src/test/java/org/springframework/beans/factory/DefaultListableBeanFactoryTests.java
  84. 6
      spring-beans/src/test/java/org/springframework/beans/factory/FactoryBeanLookupTests.java
  85. 2
      spring-beans/src/test/java/org/springframework/beans/factory/FactoryBeanTests.java
  86. 2
      spring-beans/src/test/java/org/springframework/beans/factory/Spr5475Tests.java
  87. 2
      spring-beans/src/test/java/org/springframework/beans/factory/annotation/AnnotationBeanWiringInfoResolverTests.java
  88. 14
      spring-beans/src/test/java/org/springframework/beans/factory/annotation/AutowiredAnnotationBeanPostProcessorTests.java
  89. 2
      spring-beans/src/test/java/org/springframework/beans/factory/annotation/CustomAutowireConfigurerTests.java
  90. 10
      spring-beans/src/test/java/org/springframework/beans/factory/annotation/InjectAnnotationBeanPostProcessorTests.java
  91. 6
      spring-beans/src/test/java/org/springframework/beans/factory/annotation/LookupAnnotationTests.java
  92. 2
      spring-beans/src/test/java/org/springframework/beans/factory/annotation/ParameterResolutionTests.java
  93. 2
      spring-beans/src/test/java/org/springframework/beans/factory/annotation/RequiredAnnotationBeanPostProcessorTests.java
  94. 2
      spring-beans/src/test/java/org/springframework/beans/factory/config/CustomEditorConfigurerTests.java
  95. 2
      spring-beans/src/test/java/org/springframework/beans/factory/config/CustomScopeConfigurerTests.java
  96. 2
      spring-beans/src/test/java/org/springframework/beans/factory/config/DeprecatedBeanWarnerTests.java
  97. 2
      spring-beans/src/test/java/org/springframework/beans/factory/config/FieldRetrievingFactoryBeanTests.java
  98. 2
      spring-beans/src/test/java/org/springframework/beans/factory/config/MethodInvokingFactoryBeanTests.java
  99. 10
      spring-beans/src/test/java/org/springframework/beans/factory/config/ObjectFactoryCreatingFactoryBeanTests.java
  100. 2
      spring-beans/src/test/java/org/springframework/beans/factory/config/PropertiesFactoryBeanTests.java
  101. Some files were not shown because too many files have changed in this diff Show More

2
spring-aop/src/test/java/org/springframework/aop/aspectj/AspectJAdviceParameterNameDiscoverAnnotationTests.java

@ -17,7 +17,7 @@ @@ -17,7 +17,7 @@
package org.springframework.aop.aspectj;
import org.aspectj.lang.ProceedingJoinPoint;
import org.junit.Test;
import org.junit.jupiter.api.Test;
/**
* Additional parameter name discover tests that need Java 5.

2
spring-aop/src/test/java/org/springframework/aop/aspectj/AspectJAdviceParameterNameDiscovererTests.java

@ -19,7 +19,7 @@ package org.springframework.aop.aspectj; @@ -19,7 +19,7 @@ package org.springframework.aop.aspectj;
import java.lang.reflect.Method;
import org.aspectj.lang.JoinPoint;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import org.springframework.aop.aspectj.AspectJAdviceParameterNameDiscoverer.AmbiguousBindingException;

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

@ -23,8 +23,8 @@ import org.aopalliance.intercept.MethodInvocation; @@ -23,8 +23,8 @@ import org.aopalliance.intercept.MethodInvocation;
import org.aspectj.weaver.tools.PointcutExpression;
import org.aspectj.weaver.tools.PointcutPrimitive;
import org.aspectj.weaver.tools.UnsupportedPointcutPrimitiveException;
import org.junit.Before;
import org.junit.Test;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.springframework.aop.ClassFilter;
import org.springframework.aop.MethodMatcher;
@ -57,7 +57,7 @@ public class AspectJExpressionPointcutTests { @@ -57,7 +57,7 @@ public class AspectJExpressionPointcutTests {
private Method setSomeNumber;
@Before
@BeforeEach
public void setUp() throws NoSuchMethodException {
getAge = TestBean.class.getMethod("getAge");
setAge = TestBean.class.getMethod("setAge", int.class);

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

@ -16,7 +16,7 @@ @@ -16,7 +16,7 @@
package org.springframework.aop.aspectj;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import org.springframework.tests.sample.beans.TestBean;

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

@ -26,7 +26,7 @@ import org.aspectj.lang.ProceedingJoinPoint; @@ -26,7 +26,7 @@ import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.reflect.MethodSignature;
import org.aspectj.lang.reflect.SourceLocation;
import org.aspectj.runtime.reflect.Factory;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import org.springframework.aop.MethodBeforeAdvice;
import org.springframework.aop.framework.AopContext;

2
spring-aop/src/test/java/org/springframework/aop/aspectj/TigerAspectJAdviceParameterNameDiscovererTests.java

@ -16,7 +16,7 @@ @@ -16,7 +16,7 @@
package org.springframework.aop.aspectj;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import org.springframework.aop.aspectj.AspectJAdviceParameterNameDiscoverer.AmbiguousBindingException;

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

@ -21,8 +21,8 @@ import java.util.HashMap; @@ -21,8 +21,8 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.junit.Before;
import org.junit.Test;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import test.annotation.EmptySpringAnnotation;
import test.annotation.transaction.Tx;
@ -44,7 +44,7 @@ public class TigerAspectJExpressionPointcutTests { @@ -44,7 +44,7 @@ public class TigerAspectJExpressionPointcutTests {
private final Map<String, Method> methodsOnHasGeneric = new HashMap<>();
@Before
@BeforeEach
public void setup() throws NoSuchMethodException {
getAge = TestBean.class.getMethod("getAge");
// Assumes no overloading

2
spring-aop/src/test/java/org/springframework/aop/aspectj/TrickyAspectJPointcutExpressionTests.java

@ -24,7 +24,7 @@ import java.lang.annotation.RetentionPolicy; @@ -24,7 +24,7 @@ import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import java.lang.reflect.Method;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import org.springframework.aop.Advisor;
import org.springframework.aop.MethodBeforeAdvice;

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

@ -16,7 +16,7 @@ @@ -16,7 +16,7 @@
package org.springframework.aop.aspectj;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.support.DefaultListableBeanFactory;

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

@ -38,8 +38,8 @@ import org.aspectj.lang.annotation.DeclareParents; @@ -38,8 +38,8 @@ import org.aspectj.lang.annotation.DeclareParents;
import org.aspectj.lang.annotation.DeclarePrecedence;
import org.aspectj.lang.annotation.Pointcut;
import org.aspectj.lang.reflect.MethodSignature;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import test.aop.DefaultLockable;
import test.aop.Lockable;
import test.aop.PerTargetAspect;
@ -414,7 +414,7 @@ public abstract class AbstractAspectJAdvisorFactoryTests { @@ -414,7 +414,7 @@ public abstract class AbstractAspectJAdvisorFactoryTests {
// TODO: Why does this test fail? It hasn't been run before, so it maybe never actually passed...
@Test
@Ignore
@Disabled
public void testIntroductionWithArgumentBinding() {
TestBean target = new TestBean();

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

@ -24,7 +24,7 @@ import org.aspectj.lang.ProceedingJoinPoint; @@ -24,7 +24,7 @@ import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import org.springframework.aop.aspectj.AspectJAdviceParameterNameDiscoverer;
import org.springframework.tests.sample.beans.ITestBean;

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

@ -16,7 +16,7 @@ @@ -16,7 +16,7 @@
package org.springframework.aop.aspectj.annotation;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import test.aop.PerTargetAspect;
import org.springframework.aop.Pointcut;

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

@ -17,7 +17,7 @@ @@ -17,7 +17,7 @@
package org.springframework.aop.aspectj.annotation;
import org.aspectj.lang.reflect.PerClauseKind;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import test.aop.PerTargetAspect;
import org.springframework.aop.Pointcut;

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

@ -23,7 +23,7 @@ import org.apache.commons.logging.LogFactory; @@ -23,7 +23,7 @@ import org.apache.commons.logging.LogFactory;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import test.aop.PerThisAspect;
import org.springframework.util.SerializationTestUtils;

6
spring-aop/src/test/java/org/springframework/aop/aspectj/autoproxy/AspectJNamespaceHandlerTests.java

@ -16,8 +16,8 @@ @@ -16,8 +16,8 @@
package org.springframework.aop.aspectj.autoproxy;
import org.junit.Before;
import org.junit.Test;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.springframework.aop.config.AopConfigUtils;
import org.springframework.aop.config.AopNamespaceUtils;
@ -46,7 +46,7 @@ public class AspectJNamespaceHandlerTests { @@ -46,7 +46,7 @@ public class AspectJNamespaceHandlerTests {
private BeanDefinitionRegistry registry = new DefaultListableBeanFactory();
@Before
@BeforeEach
public void setUp() throws Exception {
SourceExtractor sourceExtractor = new PassThroughSourceExtractor();
XmlBeanDefinitionReader reader = new XmlBeanDefinitionReader(this.registry);

6
spring-aop/src/test/java/org/springframework/aop/aspectj/autoproxy/AspectJPrecedenceComparatorTests.java

@ -18,8 +18,8 @@ package org.springframework.aop.aspectj.autoproxy; @@ -18,8 +18,8 @@ package org.springframework.aop.aspectj.autoproxy;
import java.lang.reflect.Method;
import org.junit.Before;
import org.junit.Test;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.springframework.aop.Advisor;
import org.springframework.aop.AfterReturningAdvice;
@ -56,7 +56,7 @@ public class AspectJPrecedenceComparatorTests { @@ -56,7 +56,7 @@ public class AspectJPrecedenceComparatorTests {
private AspectJExpressionPointcut anyOldPointcut;
@Before
@BeforeEach
public void setUp() throws Exception {
this.comparator = new AspectJPrecedenceComparator();
this.anyOldMethod = getClass().getMethods()[0];

6
spring-aop/src/test/java/org/springframework/aop/config/AopNamespaceHandlerEventTests.java

@ -19,8 +19,8 @@ package org.springframework.aop.config; @@ -19,8 +19,8 @@ package org.springframework.aop.config;
import java.util.HashSet;
import java.util.Set;
import org.junit.Before;
import org.junit.Test;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.beans.factory.config.BeanReference;
@ -56,7 +56,7 @@ public class AopNamespaceHandlerEventTests { @@ -56,7 +56,7 @@ public class AopNamespaceHandlerEventTests {
private XmlBeanDefinitionReader reader;
@Before
@BeforeEach
public void setup() {
this.reader = new XmlBeanDefinitionReader(this.beanFactory);
this.reader.setEventListener(this.eventListener);

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

@ -16,7 +16,7 @@ @@ -16,7 +16,7 @@
package org.springframework.aop.config;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.BeanDefinitionStoreException;
import org.springframework.beans.factory.parsing.BeanDefinitionParsingException;

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

@ -16,7 +16,7 @@ @@ -16,7 +16,7 @@
package org.springframework.aop.config;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
import org.springframework.beans.factory.xml.XmlBeanDefinitionReader;

2
spring-aop/src/test/java/org/springframework/aop/framework/AopProxyUtilsTests.java

@ -20,7 +20,7 @@ import java.lang.reflect.Proxy; @@ -20,7 +20,7 @@ import java.lang.reflect.Proxy;
import java.util.Arrays;
import java.util.List;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import org.springframework.aop.SpringProxy;
import org.springframework.tests.sample.beans.ITestBean;

2
spring-aop/src/test/java/org/springframework/aop/framework/IntroductionBenchmarkTests.java

@ -16,7 +16,7 @@ @@ -16,7 +16,7 @@
package org.springframework.aop.framework;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import org.springframework.aop.support.DelegatingIntroductionInterceptor;
import org.springframework.tests.sample.beans.ITestBean;

2
spring-aop/src/test/java/org/springframework/aop/framework/MethodInvocationTests.java

@ -22,7 +22,7 @@ import java.util.List; @@ -22,7 +22,7 @@ import java.util.List;
import org.aopalliance.intercept.MethodInterceptor;
import org.aopalliance.intercept.MethodInvocation;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import org.springframework.tests.sample.beans.TestBean;

2
spring-aop/src/test/java/org/springframework/aop/framework/NullPrimitiveTests.java

@ -18,7 +18,7 @@ package org.springframework.aop.framework; @@ -18,7 +18,7 @@ package org.springframework.aop.framework;
import org.aopalliance.intercept.MethodInterceptor;
import org.aopalliance.intercept.MethodInvocation;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import org.springframework.aop.AopInvocationException;

2
spring-aop/src/test/java/org/springframework/aop/framework/PrototypeTargetTests.java

@ -18,7 +18,7 @@ package org.springframework.aop.framework; @@ -18,7 +18,7 @@ package org.springframework.aop.framework;
import org.aopalliance.intercept.MethodInterceptor;
import org.aopalliance.intercept.MethodInvocation;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
import org.springframework.beans.factory.xml.XmlBeanDefinitionReader;

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

@ -24,8 +24,8 @@ import javax.swing.RootPaneContainer; @@ -24,8 +24,8 @@ import javax.swing.RootPaneContainer;
import org.aopalliance.intercept.MethodInterceptor;
import org.aopalliance.intercept.MethodInvocation;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.springframework.aop.Advisor;
import org.springframework.aop.interceptor.DebugInterceptor;
@ -325,7 +325,7 @@ public class ProxyFactoryTests { @@ -325,7 +325,7 @@ public class ProxyFactoryTests {
}
@Test
@Ignore("Not implemented yet, see https://jira.springframework.org/browse/SPR-5708")
@Disabled("Not implemented yet, see https://jira.springframework.org/browse/SPR-5708")
public void testExclusionOfNonPublicInterfaces() {
JFrame frame = new JFrame();
ProxyFactory proxyFactory = new ProxyFactory(frame);

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

@ -23,7 +23,7 @@ import java.rmi.ConnectException; @@ -23,7 +23,7 @@ import java.rmi.ConnectException;
import java.rmi.RemoteException;
import org.aopalliance.intercept.MethodInvocation;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import org.springframework.aop.ThrowsAdvice;
import org.springframework.tests.aop.advice.MethodCounter;

2
spring-aop/src/test/java/org/springframework/aop/interceptor/ConcurrencyThrottleInterceptorTests.java

@ -18,7 +18,7 @@ package org.springframework.aop.interceptor; @@ -18,7 +18,7 @@ package org.springframework.aop.interceptor;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import org.springframework.aop.framework.Advised;
import org.springframework.aop.framework.ProxyFactory;

2
spring-aop/src/test/java/org/springframework/aop/interceptor/CustomizableTraceInterceptorTests.java

@ -18,7 +18,7 @@ package org.springframework.aop.interceptor; @@ -18,7 +18,7 @@ package org.springframework.aop.interceptor;
import org.aopalliance.intercept.MethodInvocation;
import org.apache.commons.logging.Log;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException;
import static org.mockito.ArgumentMatchers.anyString;

2
spring-aop/src/test/java/org/springframework/aop/interceptor/DebugInterceptorTests.java

@ -18,7 +18,7 @@ package org.springframework.aop.interceptor; @@ -18,7 +18,7 @@ package org.springframework.aop.interceptor;
import org.aopalliance.intercept.MethodInvocation;
import org.apache.commons.logging.Log;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException;

2
spring-aop/src/test/java/org/springframework/aop/interceptor/ExposeBeanNameAdvisorsTests.java

@ -16,7 +16,7 @@ @@ -16,7 +16,7 @@
package org.springframework.aop.interceptor;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import org.springframework.aop.framework.ProxyFactory;
import org.springframework.beans.factory.NamedBean;

2
spring-aop/src/test/java/org/springframework/aop/interceptor/ExposeInvocationInterceptorTests.java

@ -17,7 +17,7 @@ @@ -17,7 +17,7 @@
package org.springframework.aop.interceptor;
import org.aopalliance.intercept.MethodInvocation;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
import org.springframework.beans.factory.xml.XmlBeanDefinitionReader;

10
spring-aop/src/test/java/org/springframework/aop/interceptor/JamonPerformanceMonitorInterceptorTests.java

@ -19,9 +19,9 @@ package org.springframework.aop.interceptor; @@ -19,9 +19,9 @@ package org.springframework.aop.interceptor;
import com.jamonapi.MonitorFactory;
import org.aopalliance.intercept.MethodInvocation;
import org.apache.commons.logging.Log;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException;
@ -41,12 +41,12 @@ public class JamonPerformanceMonitorInterceptorTests { @@ -41,12 +41,12 @@ public class JamonPerformanceMonitorInterceptorTests {
private final Log log = mock(Log.class);
@Before
@BeforeEach
public void setUp() {
MonitorFactory.reset();
}
@After
@AfterEach
public void tearDown() {
MonitorFactory.reset();
}

2
spring-aop/src/test/java/org/springframework/aop/interceptor/PerformanceMonitorInterceptorTests.java

@ -18,7 +18,7 @@ package org.springframework.aop.interceptor; @@ -18,7 +18,7 @@ package org.springframework.aop.interceptor;
import org.aopalliance.intercept.MethodInvocation;
import org.apache.commons.logging.Log;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException;

2
spring-aop/src/test/java/org/springframework/aop/interceptor/SimpleTraceInterceptorTests.java

@ -18,7 +18,7 @@ package org.springframework.aop.interceptor; @@ -18,7 +18,7 @@ package org.springframework.aop.interceptor;
import org.aopalliance.intercept.MethodInvocation;
import org.apache.commons.logging.Log;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException;
import static org.mockito.ArgumentMatchers.anyString;

2
spring-aop/src/test/java/org/springframework/aop/scope/DefaultScopedObjectTests.java

@ -16,7 +16,7 @@ @@ -16,7 +16,7 @@
package org.springframework.aop.scope;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.config.ConfigurableBeanFactory;

2
spring-aop/src/test/java/org/springframework/aop/scope/ScopedProxyAutowireTests.java

@ -18,7 +18,7 @@ package org.springframework.aop.scope; @@ -18,7 +18,7 @@ package org.springframework.aop.scope;
import java.util.Arrays;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
import org.springframework.beans.factory.xml.XmlBeanDefinitionReader;

6
spring-aop/src/test/java/org/springframework/aop/support/AbstractRegexpMethodPointcutTests.java

@ -18,8 +18,8 @@ package org.springframework.aop.support; @@ -18,8 +18,8 @@ package org.springframework.aop.support;
import java.io.IOException;
import org.junit.Before;
import org.junit.Test;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.springframework.tests.sample.beans.TestBean;
import org.springframework.util.SerializationTestUtils;
@ -35,7 +35,7 @@ public abstract class AbstractRegexpMethodPointcutTests { @@ -35,7 +35,7 @@ public abstract class AbstractRegexpMethodPointcutTests {
private AbstractRegexpMethodPointcut rpc;
@Before
@BeforeEach
public void setUp() {
rpc = getRegexpMethodPointcut();
}

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

@ -18,7 +18,7 @@ package org.springframework.aop.support; @@ -18,7 +18,7 @@ package org.springframework.aop.support;
import java.lang.reflect.Method;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import org.springframework.aop.ClassFilter;
import org.springframework.aop.MethodMatcher;

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

@ -16,7 +16,7 @@ @@ -16,7 +16,7 @@
package org.springframework.aop.support;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import org.springframework.aop.ClassFilter;
import org.springframework.core.NestedRuntimeException;

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

@ -15,7 +15,7 @@ @@ -15,7 +15,7 @@
*/
package org.springframework.aop.support;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import org.springframework.aop.framework.ProxyFactory;
import org.springframework.tests.sample.beans.TestBean;

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

@ -18,7 +18,7 @@ package org.springframework.aop.support; @@ -18,7 +18,7 @@ package org.springframework.aop.support;
import java.lang.reflect.Method;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import org.springframework.aop.ClassFilter;
import org.springframework.aop.MethodMatcher;

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

@ -16,7 +16,7 @@ @@ -16,7 +16,7 @@
package org.springframework.aop.support;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import org.springframework.aop.Pointcut;
import org.springframework.aop.framework.ProxyFactory;

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

@ -19,7 +19,7 @@ package org.springframework.aop.support; @@ -19,7 +19,7 @@ package org.springframework.aop.support;
import java.io.Serializable;
import org.aopalliance.intercept.MethodInterceptor;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import org.springframework.aop.IntroductionAdvisor;
import org.springframework.aop.IntroductionInterceptor;

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

@ -18,7 +18,7 @@ package org.springframework.aop.support; @@ -18,7 +18,7 @@ package org.springframework.aop.support;
import java.lang.reflect.Method;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import org.springframework.aop.MethodMatcher;
import org.springframework.lang.Nullable;

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

@ -16,8 +16,8 @@ @@ -16,8 +16,8 @@
package org.springframework.aop.support;
import org.junit.Before;
import org.junit.Test;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.springframework.aop.framework.Advised;
import org.springframework.aop.framework.ProxyFactory;
@ -45,7 +45,7 @@ public class NameMatchMethodPointcutTests { @@ -45,7 +45,7 @@ public class NameMatchMethodPointcutTests {
/**
* Create an empty pointcut, populating instance variables.
*/
@Before
@BeforeEach
public void setup() {
ProxyFactory pf = new ProxyFactory(new SerializablePerson());
nop = new SerializableNopInterceptor();

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

@ -18,7 +18,7 @@ package org.springframework.aop.support; @@ -18,7 +18,7 @@ package org.springframework.aop.support;
import java.lang.reflect.Method;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import org.springframework.aop.ClassFilter;
import org.springframework.aop.Pointcut;

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

@ -16,7 +16,7 @@ @@ -16,7 +16,7 @@
package org.springframework.aop.support;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import org.springframework.aop.framework.Advised;
import org.springframework.beans.factory.support.DefaultListableBeanFactory;

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

@ -16,7 +16,7 @@ @@ -16,7 +16,7 @@
package org.springframework.aop.target;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import org.springframework.aop.support.AopUtils;
import org.springframework.beans.factory.support.DefaultListableBeanFactory;

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

@ -16,9 +16,9 @@ @@ -16,9 +16,9 @@
package org.springframework.aop.target;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.springframework.aop.framework.Advised;
import org.springframework.aop.framework.ProxyFactory;
@ -47,7 +47,7 @@ public class HotSwappableTargetSourceTests { @@ -47,7 +47,7 @@ public class HotSwappableTargetSourceTests {
private DefaultListableBeanFactory beanFactory;
@Before
@BeforeEach
public void setup() {
this.beanFactory = new DefaultListableBeanFactory();
new XmlBeanDefinitionReader(this.beanFactory).loadBeanDefinitions(
@ -57,7 +57,7 @@ public class HotSwappableTargetSourceTests { @@ -57,7 +57,7 @@ public class HotSwappableTargetSourceTests {
/**
* We must simulate container shutdown, which should clear threads.
*/
@After
@AfterEach
public void close() {
// Will call pool.close()
this.beanFactory.destroySingletons();

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

@ -16,7 +16,7 @@ @@ -16,7 +16,7 @@
package org.springframework.aop.target;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import org.springframework.aop.TargetSource;
import org.springframework.aop.framework.ProxyFactory;

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

@ -18,7 +18,7 @@ package org.springframework.aop.target; @@ -18,7 +18,7 @@ package org.springframework.aop.target;
import java.util.Set;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
import org.springframework.beans.factory.xml.XmlBeanDefinitionReader;

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

@ -16,7 +16,7 @@ @@ -16,7 +16,7 @@
package org.springframework.aop.target;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import org.springframework.aop.TargetSource;
import org.springframework.beans.MutablePropertyValues;

6
spring-aop/src/test/java/org/springframework/aop/target/PrototypeTargetSourceTests.java

@ -16,8 +16,8 @@ @@ -16,8 +16,8 @@
package org.springframework.aop.target;
import org.junit.Before;
import org.junit.Test;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
import org.springframework.beans.factory.xml.XmlBeanDefinitionReader;
@ -38,7 +38,7 @@ public class PrototypeTargetSourceTests { @@ -38,7 +38,7 @@ public class PrototypeTargetSourceTests {
private DefaultListableBeanFactory beanFactory;
@Before
@BeforeEach
public void setup() {
this.beanFactory = new DefaultListableBeanFactory();
new XmlBeanDefinitionReader(this.beanFactory).loadBeanDefinitions(

6
spring-aop/src/test/java/org/springframework/aop/target/ThreadLocalTargetSourceTests.java

@ -16,8 +16,8 @@ @@ -16,8 +16,8 @@
package org.springframework.aop.target;
import org.junit.Before;
import org.junit.Test;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
import org.springframework.beans.factory.xml.XmlBeanDefinitionReader;
@ -39,7 +39,7 @@ public class ThreadLocalTargetSourceTests { @@ -39,7 +39,7 @@ public class ThreadLocalTargetSourceTests {
private DefaultListableBeanFactory beanFactory;
@Before
@BeforeEach
public void setup() {
this.beanFactory = new DefaultListableBeanFactory();
new XmlBeanDefinitionReader(this.beanFactory).loadBeanDefinitions(

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

@ -16,7 +16,7 @@ @@ -16,7 +16,7 @@
package org.springframework.aop.target.dynamic;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import org.springframework.tests.Assume;
import org.springframework.tests.TestGroup;

2
spring-aspects/src/test/java/org/springframework/aop/aspectj/autoproxy/AutoProxyWithCodeStyleAspectsTests.java

@ -16,7 +16,7 @@ @@ -16,7 +16,7 @@
package org.springframework.aop.aspectj.autoproxy;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import org.springframework.context.support.ClassPathXmlApplicationContext;

2
spring-aspects/src/test/java/org/springframework/beans/factory/aspectj/SpringConfiguredWithAutoProxyingTests.java

@ -16,7 +16,7 @@ @@ -16,7 +16,7 @@
package org.springframework.beans.factory.aspectj;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import org.springframework.context.support.ClassPathXmlApplicationContext;

2
spring-aspects/src/test/java/org/springframework/beans/factory/aspectj/XmlBeanConfigurerTests.java

@ -16,7 +16,7 @@ @@ -16,7 +16,7 @@
package org.springframework.beans.factory.aspectj;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import org.springframework.context.support.ClassPathXmlApplicationContext;

2
spring-aspects/src/test/java/org/springframework/cache/aspectj/AspectJCacheAnnotationTests.java vendored

@ -16,7 +16,7 @@ @@ -16,7 +16,7 @@
package org.springframework.cache.aspectj;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import org.springframework.cache.Cache;
import org.springframework.cache.config.AbstractCacheAnnotationTests;

10
spring-aspects/src/test/java/org/springframework/cache/aspectj/AspectJEnableCachingIsolatedTests.java vendored

@ -16,9 +16,9 @@ @@ -16,9 +16,9 @@
package org.springframework.cache.aspectj;
import org.junit.After;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.BeanCreationException;
import org.springframework.cache.CacheManager;
@ -57,7 +57,7 @@ public class AspectJEnableCachingIsolatedTests { @@ -57,7 +57,7 @@ public class AspectJEnableCachingIsolatedTests {
this.ctx = new AnnotationConfigApplicationContext(config);
}
@After
@AfterEach
public void closeContext() {
if (this.ctx != null) {
this.ctx.close();
@ -126,7 +126,7 @@ public class AspectJEnableCachingIsolatedTests { @@ -126,7 +126,7 @@ public class AspectJEnableCachingIsolatedTests {
}
@Test
@Ignore("AspectJ has some sort of caching that makes this one fail")
@Disabled("AspectJ has some sort of caching that makes this one fail")
public void emptyConfigSupport() {
load(EmptyConfigSupportConfig.class);
AnnotationCacheAspect aspect = this.ctx.getBean(AnnotationCacheAspect.class);

2
spring-aspects/src/test/java/org/springframework/context/annotation/aspectj/AnnotationBeanConfigurerTests.java

@ -16,7 +16,7 @@ @@ -16,7 +16,7 @@
package org.springframework.context.annotation.aspectj;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.aspectj.ShouldBeConfiguredBySpring;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

6
spring-aspects/src/test/java/org/springframework/scheduling/aspectj/AnnotationAsyncExecutionAspectTests.java

@ -22,8 +22,8 @@ import java.util.concurrent.CompletableFuture; @@ -22,8 +22,8 @@ import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Future;
import org.junit.Before;
import org.junit.Test;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.springframework.aop.interceptor.AsyncUncaughtExceptionHandler;
import org.springframework.aop.interceptor.SimpleAsyncUncaughtExceptionHandler;
@ -55,7 +55,7 @@ public class AnnotationAsyncExecutionAspectTests { @@ -55,7 +55,7 @@ public class AnnotationAsyncExecutionAspectTests {
private CountingExecutor executor;
@Before
@BeforeEach
public void setUp() {
Assume.group(TestGroup.PERFORMANCE);

10
spring-aspects/src/test/java/org/springframework/scheduling/aspectj/AnnotationDrivenBeanDefinitionParserTests.java

@ -18,9 +18,9 @@ package org.springframework.scheduling.aspectj; @@ -18,9 +18,9 @@ package org.springframework.scheduling.aspectj;
import java.util.function.Supplier;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.springframework.beans.DirectFieldAccessor;
import org.springframework.context.ConfigurableApplicationContext;
@ -36,13 +36,13 @@ public class AnnotationDrivenBeanDefinitionParserTests { @@ -36,13 +36,13 @@ public class AnnotationDrivenBeanDefinitionParserTests {
private ConfigurableApplicationContext context;
@Before
@BeforeEach
public void setup() {
this.context = new ClassPathXmlApplicationContext(
"annotationDrivenContext.xml", AnnotationDrivenBeanDefinitionParserTests.class);
}
@After
@AfterEach
public void after() {
if (this.context != null) {
this.context.close();

12
spring-aspects/src/test/java/org/springframework/transaction/aspectj/JtaTransactionAspectsTests.java

@ -19,15 +19,15 @@ package org.springframework.transaction.aspectj; @@ -19,15 +19,15 @@ package org.springframework.transaction.aspectj;
import java.io.IOException;
import javax.transaction.Transactional;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.junit.jupiter.SpringExtension;
import org.springframework.tests.transaction.CallCountingTransactionManager;
import static org.assertj.core.api.Assertions.assertThat;
@ -37,14 +37,14 @@ import static org.assertj.core.api.Assertions.assertThatIOException; @@ -37,14 +37,14 @@ import static org.assertj.core.api.Assertions.assertThatIOException;
/**
* @author Stephane Nicoll
*/
@RunWith(SpringJUnit4ClassRunner.class)
@ExtendWith(SpringExtension.class)
@ContextConfiguration(classes = JtaTransactionAspectsTests.Config.class)
public class JtaTransactionAspectsTests {
@Autowired
private CallCountingTransactionManager txManager;
@Before
@BeforeEach
public void setUp() {
this.txManager.clear();
}

6
spring-aspects/src/test/java/org/springframework/transaction/aspectj/TransactionAspectTests.java

@ -16,8 +16,8 @@ @@ -16,8 +16,8 @@
package org.springframework.transaction.aspectj;
import org.junit.Before;
import org.junit.Test;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.springframework.tests.transaction.CallCountingTransactionManager;
@ -47,7 +47,7 @@ public class TransactionAspectTests { @@ -47,7 +47,7 @@ public class TransactionAspectTests {
new MethodAnnotationOnClassWithNoInterface();
@Before
@BeforeEach
public void initContext() {
AnnotationTransactionAspect.aspectOf().setTransactionManager(txManager);
}

16
spring-beans/src/test/java/org/springframework/beans/AbstractPropertyAccessorTests.java

@ -36,7 +36,7 @@ import java.util.TreeMap; @@ -36,7 +36,7 @@ import java.util.TreeMap;
import java.util.TreeSet;
import org.apache.commons.logging.LogFactory;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowire;
import org.springframework.beans.propertyeditors.CustomNumberEditor;
@ -76,14 +76,12 @@ import static org.assertj.core.api.Assertions.within; @@ -76,14 +76,12 @@ import static org.assertj.core.api.Assertions.within;
*/
public abstract class AbstractPropertyAccessorTests {
protected abstract AbstractPropertyAccessor createAccessor(Object target);
@Test
public void createWithNullTarget() {
assertThatIllegalArgumentException().isThrownBy(() ->
createAccessor(null));
assertThatIllegalArgumentException().isThrownBy(() -> createAccessor(null));
}
@Test
@ -114,8 +112,7 @@ public abstract class AbstractPropertyAccessorTests { @@ -114,8 +112,7 @@ public abstract class AbstractPropertyAccessorTests {
public void isReadablePropertyNull() {
AbstractPropertyAccessor accessor = createAccessor(new NoRead());
assertThatIllegalArgumentException().isThrownBy(() ->
accessor.isReadableProperty(null));
assertThatIllegalArgumentException().isThrownBy(() -> accessor.isReadableProperty(null));
}
@Test
@ -129,8 +126,7 @@ public abstract class AbstractPropertyAccessorTests { @@ -129,8 +126,7 @@ public abstract class AbstractPropertyAccessorTests {
public void isWritablePropertyNull() {
AbstractPropertyAccessor accessor = createAccessor(new NoRead());
assertThatIllegalArgumentException().isThrownBy(() ->
accessor.isWritableProperty(null));
assertThatIllegalArgumentException().isThrownBy(() -> accessor.isWritableProperty(null));
}
@Test
@ -519,7 +515,6 @@ public abstract class AbstractPropertyAccessorTests { @@ -519,7 +515,6 @@ public abstract class AbstractPropertyAccessorTests {
assertThat(target.getSpouse() == null).as("spouse is now null").isTrue();
}
@Test
public void setIndexedPropertyIgnored() {
MutablePropertyValues values = new MutablePropertyValues();
@ -692,7 +687,6 @@ public abstract class AbstractPropertyAccessorTests { @@ -692,7 +687,6 @@ public abstract class AbstractPropertyAccessorTests {
assertThat(target.getMyPrimitiveDouble()).isCloseTo(Double.MAX_VALUE, within(0.001));
assertThat(target.getMyDouble().doubleValue()).isCloseTo(Double.MAX_VALUE, within(0.001));
}
@Test
@ -1105,7 +1099,6 @@ public abstract class AbstractPropertyAccessorTests { @@ -1105,7 +1099,6 @@ public abstract class AbstractPropertyAccessorTests {
assertThat(target.getObject()).isEqualTo(array);
}
@Test
public void setCollectionProperty() {
IndexedTestBean target = new IndexedTestBean();
@ -1918,7 +1911,6 @@ public abstract class AbstractPropertyAccessorTests { @@ -1918,7 +1911,6 @@ public abstract class AbstractPropertyAccessorTests {
// class to test naming of beans in a error message
}
@SuppressWarnings("unused")
private static class NumberPropertyBean {

2
spring-beans/src/test/java/org/springframework/beans/BeanUtilsTests.java

@ -22,7 +22,7 @@ import java.lang.reflect.Constructor; @@ -22,7 +22,7 @@ import java.lang.reflect.Constructor;
import java.lang.reflect.Method;
import java.util.List;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.propertyeditors.CustomDateEditor;

6
spring-beans/src/test/java/org/springframework/beans/BeanWrapperAutoGrowingTests.java

@ -19,8 +19,8 @@ package org.springframework.beans; @@ -19,8 +19,8 @@ package org.springframework.beans;
import java.util.List;
import java.util.Map;
import org.junit.Before;
import org.junit.Test;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
@ -36,7 +36,7 @@ public class BeanWrapperAutoGrowingTests { @@ -36,7 +36,7 @@ public class BeanWrapperAutoGrowingTests {
private final BeanWrapperImpl wrapper = new BeanWrapperImpl(bean);
@Before
@BeforeEach
public void setUp() {
wrapper.setAutoGrowNestedPaths(true);
}

2
spring-beans/src/test/java/org/springframework/beans/BeanWrapperEnumTests.java

@ -19,7 +19,7 @@ package org.springframework.beans; @@ -19,7 +19,7 @@ package org.springframework.beans;
import java.util.LinkedHashMap;
import java.util.Map;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import org.springframework.core.convert.support.DefaultConversionService;
import org.springframework.tests.sample.beans.CustomEnum;

2
spring-beans/src/test/java/org/springframework/beans/BeanWrapperGenericsTests.java

@ -29,7 +29,7 @@ import java.util.Map; @@ -29,7 +29,7 @@ import java.util.Map;
import java.util.Properties;
import java.util.Set;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import org.springframework.beans.propertyeditors.CustomNumberEditor;
import org.springframework.beans.propertyeditors.StringTrimmerEditor;

2
spring-beans/src/test/java/org/springframework/beans/BeanWrapperTests.java

@ -20,7 +20,7 @@ import java.util.Collections; @@ -20,7 +20,7 @@ import java.util.Collections;
import java.util.Map;
import java.util.Optional;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import org.springframework.tests.sample.beans.TestBean;

2
spring-beans/src/test/java/org/springframework/beans/CachedIntrospectionResultsTests.java

@ -20,7 +20,7 @@ import java.beans.BeanInfo; @@ -20,7 +20,7 @@ import java.beans.BeanInfo;
import java.beans.PropertyDescriptor;
import java.util.ArrayList;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import org.springframework.core.OverridingClassLoader;
import org.springframework.tests.sample.beans.TestBean;

2
spring-beans/src/test/java/org/springframework/beans/ConcurrentBeanWrapperTests.java

@ -26,7 +26,7 @@ import java.util.Set; @@ -26,7 +26,7 @@ import java.util.Set;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import static org.assertj.core.api.Assertions.assertThat;

2
spring-beans/src/test/java/org/springframework/beans/DirectFieldAccessorTests.java

@ -16,7 +16,7 @@ @@ -16,7 +16,7 @@
package org.springframework.beans;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import org.springframework.tests.sample.beans.TestBean;

2
spring-beans/src/test/java/org/springframework/beans/ExtendedBeanInfoFactoryTests.java

@ -18,7 +18,7 @@ package org.springframework.beans; @@ -18,7 +18,7 @@ package org.springframework.beans;
import java.beans.IntrospectionException;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import static org.assertj.core.api.Assertions.assertThat;

2
spring-beans/src/test/java/org/springframework/beans/ExtendedBeanInfoTests.java

@ -23,7 +23,7 @@ import java.beans.Introspector; @@ -23,7 +23,7 @@ import java.beans.Introspector;
import java.beans.PropertyDescriptor;
import java.math.BigDecimal;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import org.springframework.tests.sample.beans.TestBean;

2
spring-beans/src/test/java/org/springframework/beans/MutablePropertyValuesTests.java

@ -18,7 +18,7 @@ package org.springframework.beans; @@ -18,7 +18,7 @@ package org.springframework.beans;
import java.util.Iterator;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;

2
spring-beans/src/test/java/org/springframework/beans/PropertyAccessorUtilsTests.java

@ -16,7 +16,7 @@ @@ -16,7 +16,7 @@
package org.springframework.beans;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import static org.assertj.core.api.Assertions.assertThat;

2
spring-beans/src/test/java/org/springframework/beans/PropertyMatchesTests.java

@ -16,7 +16,7 @@ @@ -16,7 +16,7 @@
package org.springframework.beans;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import static org.assertj.core.api.Assertions.assertThat;

2
spring-beans/src/test/java/org/springframework/beans/SimplePropertyDescriptorTests.java

@ -21,7 +21,7 @@ import java.beans.IntrospectionException; @@ -21,7 +21,7 @@ import java.beans.IntrospectionException;
import java.beans.PropertyDescriptor;
import java.lang.reflect.Method;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import static org.assertj.core.api.Assertions.assertThat;

6
spring-beans/src/test/java/org/springframework/beans/factory/BeanFactoryUtilsTests.java

@ -20,8 +20,8 @@ import java.util.Arrays; @@ -20,8 +20,8 @@ import java.util.Arrays;
import java.util.List;
import java.util.Map;
import org.junit.Before;
import org.junit.Test;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
import org.springframework.beans.factory.support.StaticListableBeanFactory;
@ -58,7 +58,7 @@ public class BeanFactoryUtilsTests { @@ -58,7 +58,7 @@ public class BeanFactoryUtilsTests {
private DefaultListableBeanFactory dependentBeansFactory;
@Before
@BeforeEach
public void setUp() {
// Interesting hierarchical factory to test counts.
// Slow to read so we cache it.

6
spring-beans/src/test/java/org/springframework/beans/factory/ConcurrentBeanFactoryTests.java

@ -27,8 +27,8 @@ import java.util.Set; @@ -27,8 +27,8 @@ import java.util.Set;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.junit.Before;
import org.junit.Test;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
import org.springframework.beans.factory.xml.XmlBeanDefinitionReader;
@ -71,7 +71,7 @@ public class ConcurrentBeanFactoryTests { @@ -71,7 +71,7 @@ public class ConcurrentBeanFactoryTests {
private Throwable ex;
@Before
@BeforeEach
public void setup() throws Exception {
Assume.group(TestGroup.PERFORMANCE);

16
spring-beans/src/test/java/org/springframework/beans/factory/DefaultListableBeanFactoryTests.java

@ -43,8 +43,9 @@ import javax.security.auth.Subject; @@ -43,8 +43,9 @@ import javax.security.auth.Subject;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.Timeout;
import org.springframework.beans.BeansException;
import org.springframework.beans.MutablePropertyValues;
@ -2329,7 +2330,7 @@ public class DefaultListableBeanFactoryTests { @@ -2329,7 +2330,7 @@ public class DefaultListableBeanFactoryTests {
}
@Test
@Ignore // TODO re-enable when ConstructorResolver TODO sorted out
@Disabled // TODO re-enable when ConstructorResolver TODO sorted out
public void testPrototypeCreationWithConstructorArgumentsIsFastEnough() {
Assume.group(TestGroup.PERFORMANCE);
Assume.notLogging(factoryLog);
@ -2794,7 +2795,8 @@ public class DefaultListableBeanFactoryTests { @@ -2794,7 +2795,8 @@ public class DefaultListableBeanFactoryTests {
* under the 1000 ms timeout, usually ~= 300ms. With caching removed and on the same
* hardware the method will take ~13000 ms. See SPR-6870.
*/
@Test(timeout = 1000)
@Test
@Timeout(1)
public void testByTypeLookupIsFastEnough() {
Assume.group(TestGroup.PERFORMANCE);
@ -2810,7 +2812,8 @@ public class DefaultListableBeanFactoryTests { @@ -2810,7 +2812,8 @@ public class DefaultListableBeanFactoryTests {
}
}
@Test(timeout = 1000)
@Test
@Timeout(1)
public void testRegistrationOfManyBeanDefinitionsIsFastEnough() {
Assume.group(TestGroup.PERFORMANCE);
lbf.registerBeanDefinition("b", new RootBeanDefinition(B.class));
@ -2821,7 +2824,8 @@ public class DefaultListableBeanFactoryTests { @@ -2821,7 +2824,8 @@ public class DefaultListableBeanFactoryTests {
}
}
@Test(timeout = 1000)
@Test
@Timeout(1)
public void testRegistrationOfManySingletonsIsFastEnough() {
Assume.group(TestGroup.PERFORMANCE);
lbf.registerBeanDefinition("b", new RootBeanDefinition(B.class));

6
spring-beans/src/test/java/org/springframework/beans/factory/FactoryBeanLookupTests.java

@ -16,8 +16,8 @@ @@ -16,8 +16,8 @@
package org.springframework.beans.factory;
import org.junit.Before;
import org.junit.Test;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.config.AbstractFactoryBean;
import org.springframework.beans.factory.support.BeanDefinitionRegistry;
@ -35,7 +35,7 @@ import static org.assertj.core.api.Assertions.assertThat; @@ -35,7 +35,7 @@ import static org.assertj.core.api.Assertions.assertThat;
public class FactoryBeanLookupTests {
private BeanFactory beanFactory;
@Before
@BeforeEach
public void setUp() {
beanFactory = new DefaultListableBeanFactory();
new XmlBeanDefinitionReader((BeanDefinitionRegistry) beanFactory).loadBeanDefinitions(

2
spring-beans/src/test/java/org/springframework/beans/factory/FactoryBeanTests.java

@ -20,7 +20,7 @@ import java.util.HashMap; @@ -20,7 +20,7 @@ import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.atomic.AtomicInteger;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.config.BeanFactoryPostProcessor;
import org.springframework.beans.factory.config.BeanPostProcessor;

2
spring-beans/src/test/java/org/springframework/beans/factory/Spr5475Tests.java

@ -16,7 +16,7 @@ @@ -16,7 +16,7 @@
package org.springframework.beans.factory;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.beans.factory.config.ConstructorArgumentValues;

2
spring-beans/src/test/java/org/springframework/beans/factory/annotation/AnnotationBeanWiringInfoResolverTests.java

@ -16,7 +16,7 @@ @@ -16,7 +16,7 @@
package org.springframework.beans.factory.annotation;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.wiring.BeanWiringInfo;

14
spring-beans/src/test/java/org/springframework/beans/factory/annotation/AutowiredAnnotationBeanPostProcessorTests.java

@ -40,10 +40,10 @@ import java.util.function.Consumer; @@ -40,10 +40,10 @@ import java.util.function.Consumer;
import java.util.function.Function;
import java.util.stream.Collectors;
import org.junit.After;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.mockito.Mockito;
import org.springframework.beans.factory.BeanCreationException;
@ -92,7 +92,7 @@ public class AutowiredAnnotationBeanPostProcessorTests { @@ -92,7 +92,7 @@ public class AutowiredAnnotationBeanPostProcessorTests {
private AutowiredAnnotationBeanPostProcessor bpp;
@Before
@BeforeEach
public void setup() {
bf = new DefaultListableBeanFactory();
bf.registerResolvableDependency(BeanFactory.class, bf);
@ -103,7 +103,7 @@ public class AutowiredAnnotationBeanPostProcessorTests { @@ -103,7 +103,7 @@ public class AutowiredAnnotationBeanPostProcessorTests {
bf.setDependencyComparator(AnnotationAwareOrderComparator.INSTANCE);
}
@After
@AfterEach
public void close() {
bf.destroySingletons();
}
@ -2052,7 +2052,7 @@ public class AutowiredAnnotationBeanPostProcessorTests { @@ -2052,7 +2052,7 @@ public class AutowiredAnnotationBeanPostProcessorTests {
}
@Test
@Ignore // SPR-11521
@Disabled // SPR-11521
@SuppressWarnings("rawtypes")
public void testGenericsBasedInjectionIntoTypeVariableSelectingBestMatchAgainstFactoryMethodSignature() {
RootBeanDefinition bd = new RootBeanDefinition(GenericInterface1Impl.class);

2
spring-beans/src/test/java/org/springframework/beans/factory/annotation/CustomAutowireConfigurerTests.java

@ -16,7 +16,7 @@ @@ -16,7 +16,7 @@
package org.springframework.beans.factory.annotation;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.config.BeanDefinitionHolder;
import org.springframework.beans.factory.config.DependencyDescriptor;

10
spring-beans/src/test/java/org/springframework/beans/factory/annotation/InjectAnnotationBeanPostProcessorTests.java

@ -26,9 +26,9 @@ import javax.inject.Inject; @@ -26,9 +26,9 @@ import javax.inject.Inject;
import javax.inject.Named;
import javax.inject.Provider;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.BeanCreationException;
import org.springframework.beans.factory.BeanFactory;
@ -62,7 +62,7 @@ public class InjectAnnotationBeanPostProcessorTests { @@ -62,7 +62,7 @@ public class InjectAnnotationBeanPostProcessorTests {
private AutowiredAnnotationBeanPostProcessor bpp;
@Before
@BeforeEach
public void setup() {
bf = new DefaultListableBeanFactory();
bf.registerResolvableDependency(BeanFactory.class, bf);
@ -72,7 +72,7 @@ public class InjectAnnotationBeanPostProcessorTests { @@ -72,7 +72,7 @@ public class InjectAnnotationBeanPostProcessorTests {
bf.setAutowireCandidateResolver(new QualifierAnnotationAutowireCandidateResolver());
}
@After
@AfterEach
public void close() {
bf.destroySingletons();
}

6
spring-beans/src/test/java/org/springframework/beans/factory/annotation/LookupAnnotationTests.java

@ -16,8 +16,8 @@ @@ -16,8 +16,8 @@
package org.springframework.beans.factory.annotation;
import org.junit.Before;
import org.junit.Test;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
import org.springframework.beans.factory.support.RootBeanDefinition;
@ -35,7 +35,7 @@ public class LookupAnnotationTests { @@ -35,7 +35,7 @@ public class LookupAnnotationTests {
private DefaultListableBeanFactory beanFactory;
@Before
@BeforeEach
public void setUp() {
beanFactory = new DefaultListableBeanFactory();
AutowiredAnnotationBeanPostProcessor aabpp = new AutowiredAnnotationBeanPostProcessor();

2
spring-beans/src/test/java/org/springframework/beans/factory/annotation/ParameterResolutionTests.java

@ -21,7 +21,7 @@ import java.lang.reflect.Executable; @@ -21,7 +21,7 @@ import java.lang.reflect.Executable;
import java.lang.reflect.Method;
import java.lang.reflect.Parameter;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.config.AutowireCapableBeanFactory;
import org.springframework.beans.factory.config.DependencyDescriptor;

2
spring-beans/src/test/java/org/springframework/beans/factory/annotation/RequiredAnnotationBeanPostProcessorTests.java

@ -21,7 +21,7 @@ import java.lang.annotation.Retention; @@ -21,7 +21,7 @@ import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.BeanCreationException;
import org.springframework.beans.factory.BeanFactory;

2
spring-beans/src/test/java/org/springframework/beans/factory/config/CustomEditorConfigurerTests.java

@ -25,7 +25,7 @@ import java.util.HashMap; @@ -25,7 +25,7 @@ import java.util.HashMap;
import java.util.Locale;
import java.util.Map;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import org.springframework.beans.MutablePropertyValues;
import org.springframework.beans.PropertyEditorRegistrar;

2
spring-beans/src/test/java/org/springframework/beans/factory/config/CustomScopeConfigurerTests.java

@ -19,7 +19,7 @@ package org.springframework.beans.factory.config; @@ -19,7 +19,7 @@ package org.springframework.beans.factory.config;
import java.util.HashMap;
import java.util.Map;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.support.DefaultListableBeanFactory;

2
spring-beans/src/test/java/org/springframework/beans/factory/config/DeprecatedBeanWarnerTests.java

@ -16,7 +16,7 @@ @@ -16,7 +16,7 @@
package org.springframework.beans.factory.config;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
import org.springframework.beans.factory.support.RootBeanDefinition;

2
spring-beans/src/test/java/org/springframework/beans/factory/config/FieldRetrievingFactoryBeanTests.java

@ -18,7 +18,7 @@ package org.springframework.beans.factory.config; @@ -18,7 +18,7 @@ package org.springframework.beans.factory.config;
import java.sql.Connection;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
import org.springframework.beans.factory.xml.XmlBeanDefinitionReader;

2
spring-beans/src/test/java/org/springframework/beans/factory/config/MethodInvokingFactoryBeanTests.java

@ -20,7 +20,7 @@ import java.util.ArrayList; @@ -20,7 +20,7 @@ import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import org.springframework.beans.propertyeditors.StringTrimmerEditor;
import org.springframework.beans.support.ArgumentConvertingMethodInvoker;

10
spring-beans/src/test/java/org/springframework/beans/factory/config/ObjectFactoryCreatingFactoryBeanTests.java

@ -19,9 +19,9 @@ package org.springframework.beans.factory.config; @@ -19,9 +19,9 @@ package org.springframework.beans.factory.config;
import java.util.Date;
import javax.inject.Provider;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.ObjectFactory;
@ -46,7 +46,7 @@ public class ObjectFactoryCreatingFactoryBeanTests { @@ -46,7 +46,7 @@ public class ObjectFactoryCreatingFactoryBeanTests {
private DefaultListableBeanFactory beanFactory;
@Before
@BeforeEach
public void setup() {
this.beanFactory = new DefaultListableBeanFactory();
new XmlBeanDefinitionReader(this.beanFactory).loadBeanDefinitions(
@ -54,7 +54,7 @@ public class ObjectFactoryCreatingFactoryBeanTests { @@ -54,7 +54,7 @@ public class ObjectFactoryCreatingFactoryBeanTests {
this.beanFactory.setSerializationId("test");
}
@After
@AfterEach
public void close() {
this.beanFactory.setSerializationId(null);
}

2
spring-beans/src/test/java/org/springframework/beans/factory/config/PropertiesFactoryBeanTests.java

@ -18,7 +18,7 @@ package org.springframework.beans.factory.config; @@ -18,7 +18,7 @@ package org.springframework.beans.factory.config;
import java.util.Properties;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import org.springframework.core.io.Resource;

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save