@@ -17,11 +17,13 @@ public class TestParameterAnnotations {
17
17
18
18
TypeResolver types ;
19
19
MemberResolver members ;
20
+ AnnotationConfiguration annotations ;
20
21
21
22
@ Before
22
23
public void setup () {
23
24
types = new TypeResolver ();
24
25
members = new MemberResolver (types );
26
+ annotations = new AnnotationConfiguration .StdConfiguration (AnnotationInclusion .INCLUDE_AND_INHERIT_IF_INHERITED );
25
27
}
26
28
27
29
@ Retention (RetentionPolicy .RUNTIME )
@@ -63,8 +65,7 @@ static interface ExtendedMixIn extends MixIn {
63
65
// note: most of the above is unimplemented currently
64
66
65
67
@ Test
66
- public void testIncludesUninheritableAnnotationsDirectly () throws NoSuchMethodException {
67
- AnnotationConfiguration annotations = new AnnotationConfiguration .StdConfiguration (AnnotationInclusion .INCLUDE_AND_INHERIT_IF_INHERITED );
68
+ public void testIncludesUninheritableAnnotationsDirectly () {
68
69
ResolvedTypeWithMembers type = members .resolve (types .resolve (BaseInterface .class ), annotations , null );
69
70
ResolvedMethod [] methods = type .getMemberMethods ();
70
71
@@ -76,8 +77,7 @@ public void testIncludesUninheritableAnnotationsDirectly() throws NoSuchMethodEx
76
77
}
77
78
78
79
@ Test
79
- public void testInheritsOnlyMarkedAnnotations () throws NoSuchMethodException {
80
- AnnotationConfiguration annotations = new AnnotationConfiguration .StdConfiguration (AnnotationInclusion .INCLUDE_AND_INHERIT_IF_INHERITED );
80
+ public void testInheritsOnlyMarkedAnnotations () {
81
81
ResolvedTypeWithMembers type = members .resolve (types .resolve (ExtendedInterface .class ), annotations , null );
82
82
ResolvedMethod [] methods = type .getMemberMethods ();
83
83
@@ -93,8 +93,7 @@ public void testInheritsOnlyMarkedAnnotations() throws NoSuchMethodException {
93
93
}
94
94
95
95
@ Test
96
- public void testMixInAnnotations () throws NoSuchMethodException {
97
- AnnotationConfiguration annotations = new AnnotationConfiguration .StdConfiguration (AnnotationInclusion .INCLUDE_AND_INHERIT_IF_INHERITED );
96
+ public void testMixInAnnotations () {
98
97
ResolvedTypeWithMembers type = members .resolve (types .resolve (TargetInterface .class ), annotations , AnnotationOverrides .builder ().add (TargetInterface .class , ExtendedMixIn .class ).build ());
99
98
ResolvedMethod [] methods = type .getMemberMethods ();
100
99
0 commit comments