mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-09-17 08:24:13 +00:00
Enable SpringJUnit5 Checkstyle rule
See gh-36496 Closes gh-36496
This commit is contained in:
+2
-2
@@ -49,12 +49,12 @@ import static org.assertj.core.api.Assertions.assertThatIllegalStateException;
|
||||
class MethodInvocationProceedingJoinPointTests {
|
||||
|
||||
@Test
|
||||
void testingBindingWithJoinPoint() {
|
||||
void bindingWithJoinPoint() {
|
||||
assertThatIllegalStateException().isThrownBy(AbstractAspectJAdvice::currentJoinPoint);
|
||||
}
|
||||
|
||||
@Test
|
||||
void testingBindingWithProceedingJoinPoint() {
|
||||
void bindingWithProceedingJoinPoint() {
|
||||
assertThatIllegalStateException().isThrownBy(AbstractAspectJAdvice::currentJoinPoint);
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -47,7 +47,7 @@ class AspectJNamespaceHandlerTests {
|
||||
|
||||
|
||||
@BeforeEach
|
||||
public void setUp() {
|
||||
void setUp() {
|
||||
SourceExtractor sourceExtractor = new PassThroughSourceExtractor();
|
||||
XmlBeanDefinitionReader reader = new XmlBeanDefinitionReader(this.registry);
|
||||
XmlReaderContext readerContext =
|
||||
|
||||
+12
-7
@@ -33,6 +33,7 @@ import org.springframework.aop.aspectj.AspectJExpressionPointcut;
|
||||
import org.springframework.aop.aspectj.AspectJMethodBeforeAdvice;
|
||||
import org.springframework.aop.aspectj.AspectJPointcutAdvisor;
|
||||
import org.springframework.aop.support.DefaultPointcutAdvisor;
|
||||
import org.springframework.util.ClassUtils;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
@@ -48,18 +49,15 @@ class AspectJPrecedenceComparatorTests {
|
||||
private static final int LATE_ADVICE_DECLARATION_ORDER = 10;
|
||||
|
||||
|
||||
private AspectJPrecedenceComparator comparator;
|
||||
private final AspectJPrecedenceComparator comparator = new AspectJPrecedenceComparator();
|
||||
|
||||
private Method anyOldMethod;
|
||||
private final Method anyOldMethod = ClassUtils.getMethod(MessageService.class, "getMessage");
|
||||
|
||||
private AspectJExpressionPointcut anyOldPointcut;
|
||||
private final AspectJExpressionPointcut anyOldPointcut = new AspectJExpressionPointcut();
|
||||
|
||||
|
||||
@BeforeEach
|
||||
public void setUp() {
|
||||
this.comparator = new AspectJPrecedenceComparator();
|
||||
this.anyOldMethod = getClass().getMethods()[0];
|
||||
this.anyOldPointcut = new AspectJExpressionPointcut();
|
||||
void setUp() {
|
||||
this.anyOldPointcut.setExpression("execution(* *(..))");
|
||||
}
|
||||
|
||||
@@ -209,4 +207,11 @@ class AspectJPrecedenceComparatorTests {
|
||||
return advisor;
|
||||
}
|
||||
|
||||
static class MessageService {
|
||||
|
||||
public String getMessage() {
|
||||
return "test";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+2
-2
@@ -48,7 +48,7 @@ class HotSwappableTargetSourceTests {
|
||||
|
||||
|
||||
@BeforeEach
|
||||
public void setup() {
|
||||
void setup() {
|
||||
this.beanFactory = new DefaultListableBeanFactory();
|
||||
new XmlBeanDefinitionReader(this.beanFactory).loadBeanDefinitions(
|
||||
qualifiedResource(HotSwappableTargetSourceTests.class, "context.xml"));
|
||||
@@ -58,7 +58,7 @@ class HotSwappableTargetSourceTests {
|
||||
* We must simulate container shutdown, which should clear threads.
|
||||
*/
|
||||
@AfterEach
|
||||
public void close() {
|
||||
void close() {
|
||||
// Will call pool.close()
|
||||
this.beanFactory.destroySingletons();
|
||||
}
|
||||
|
||||
+1
-1
@@ -39,7 +39,7 @@ class PrototypeTargetSourceTests {
|
||||
|
||||
|
||||
@BeforeEach
|
||||
public void setup() {
|
||||
void setup() {
|
||||
this.beanFactory = new DefaultListableBeanFactory();
|
||||
new XmlBeanDefinitionReader(this.beanFactory).loadBeanDefinitions(
|
||||
qualifiedResource(PrototypeTargetSourceTests.class, "context.xml"));
|
||||
|
||||
+1
-1
@@ -40,7 +40,7 @@ class ThreadLocalTargetSourceTests {
|
||||
|
||||
|
||||
@BeforeEach
|
||||
public void setup() {
|
||||
void setup() {
|
||||
this.beanFactory = new DefaultListableBeanFactory();
|
||||
new XmlBeanDefinitionReader(this.beanFactory).loadBeanDefinitions(
|
||||
qualifiedResource(ThreadLocalTargetSourceTests.class, "context.xml"));
|
||||
|
||||
Reference in New Issue
Block a user