mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-06-29 15:22:15 +00:00
Polish Annotation Test
This test was made more effective by having it focus on the real scenario of resolving annotations from the standpoint of a bean
This commit is contained in:
parent
b743d8f7a1
commit
90335bd0a6
@ -71,9 +71,8 @@ public class UniqueMergedAnnotationSynthesizerTests {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
void synthesizeWhenInterfaceOverridingMultipleInterfaceInheritanceThenResolves() throws Exception {
|
void synthesizeWhenInterfaceOverridingMultipleInterfaceInheritanceThenResolves() throws Exception {
|
||||||
Method method = InterfaceOverridingMultipleInterfaceInheritance.class.getMethod("method");
|
Method method = ClassInheritingInterfaceOverridingMultipleInterfaceInheritance.class.getDeclaredMethod("method");
|
||||||
PreAuthorize preAuthorize = this.synthesizer.synthesize(method,
|
PreAuthorize preAuthorize = this.synthesizer.synthesize(method);
|
||||||
InterfaceOverridingMultipleInterfaceInheritance.class);
|
|
||||||
assertThat(preAuthorize.value()).isEqualTo("ten");
|
assertThat(preAuthorize.value()).isEqualTo("ten");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -311,6 +310,14 @@ public class UniqueMergedAnnotationSynthesizerTests {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static class ClassInheritingInterfaceOverridingMultipleInterfaceInheritance
|
||||||
|
implements InterfaceOverridingMultipleInterfaceInheritance {
|
||||||
|
@Override
|
||||||
|
public String method() {
|
||||||
|
return "ok";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private interface InterfaceMethodOverridingMultipleInterfaceInheritance
|
private interface InterfaceMethodOverridingMultipleInterfaceInheritance
|
||||||
extends AnnotationOnInterface, AlsoAnnotationOnInterface {
|
extends AnnotationOnInterface, AlsoAnnotationOnInterface {
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user