Skip to content

Commit 1e840cc

Browse files
philwebbrwinch
authored andcommitted
Move @mock annotations
Update a couple of tests to use the more traditional `@Mock` annotation placement. Issue gh-8945
1 parent 2f8e835 commit 1e840cc

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

aspects/src/test/java/org/springframework/security/access/intercept/aspectj/aspect/AnnotationSecurityAspectTests.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ public class AnnotationSecurityAspectTests {
5959

6060
private AffirmativeBased adm;
6161

62-
private @Mock AuthenticationManager authman;
62+
@Mock
63+
private AuthenticationManager authman;
6364

6465
private TestingAuthenticationToken anne = new TestingAuthenticationToken("anne", "", "ROLE_A");
6566

core/src/test/java/org/springframework/security/access/intercept/aspectj/AspectJMethodSecurityInterceptorTests.java

+8-4
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,17 @@ public class AspectJMethodSecurityInterceptorTests {
6868

6969
private AspectJMethodSecurityInterceptor interceptor;
7070

71-
private @Mock AccessDecisionManager adm;
71+
@Mock
72+
private AccessDecisionManager adm;
7273

73-
private @Mock MethodSecurityMetadataSource mds;
74+
@Mock
75+
private MethodSecurityMetadataSource mds;
7476

75-
private @Mock AuthenticationManager authman;
77+
@Mock
78+
private AuthenticationManager authman;
7679

77-
private @Mock AspectJCallback aspectJCallback;
80+
@Mock
81+
private AspectJCallback aspectJCallback;
7882

7983
private ProceedingJoinPoint joinPoint;
8084

0 commit comments

Comments
 (0)