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:
Josh Cummings 2024-07-31 13:19:44 -06:00
parent b743d8f7a1
commit 90335bd0a6
No known key found for this signature in database
GPG Key ID: A306A51F43B8E5A5
1 changed files with 10 additions and 3 deletions

View File

@ -71,9 +71,8 @@ public class UniqueMergedAnnotationSynthesizerTests {
@Test
void synthesizeWhenInterfaceOverridingMultipleInterfaceInheritanceThenResolves() throws Exception {
Method method = InterfaceOverridingMultipleInterfaceInheritance.class.getMethod("method");
PreAuthorize preAuthorize = this.synthesizer.synthesize(method,
InterfaceOverridingMultipleInterfaceInheritance.class);
Method method = ClassInheritingInterfaceOverridingMultipleInterfaceInheritance.class.getDeclaredMethod("method");
PreAuthorize preAuthorize = this.synthesizer.synthesize(method);
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
extends AnnotationOnInterface, AlsoAnnotationOnInterface {