|
|
@ -60,13 +60,15 @@ class RuntimeHintsUtilsTests { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
@Test |
|
|
|
void registerAnnotationTypeProxyRegistersJdkProxy() { |
|
|
|
void registerAnnotationTypeProxyRegistersJdkProxies() { |
|
|
|
RuntimeHintsUtils.registerAnnotation(this.hints, RetryInvoker.class); |
|
|
|
RuntimeHintsUtils.registerAnnotation(this.hints, RetryInvoker.class); |
|
|
|
assertThat(this.hints.reflection().typeHints()) |
|
|
|
assertThat(this.hints.reflection().typeHints()) |
|
|
|
.anySatisfy(annotationHint(RetryInvoker.class)) |
|
|
|
.anySatisfy(annotationHint(RetryInvoker.class)) |
|
|
|
.anySatisfy(annotationHint(SampleInvoker.class)); |
|
|
|
.anySatisfy(annotationHint(SampleInvoker.class)); |
|
|
|
assertThat(this.hints.proxies().jdkProxies()).singleElement() |
|
|
|
assertThat(this.hints.proxies().jdkProxies()) |
|
|
|
.satisfies(annotationProxy(RetryInvoker.class)); |
|
|
|
.anySatisfy(annotationProxy(RetryInvoker.class)) |
|
|
|
|
|
|
|
.anySatisfy(annotationProxy(SampleInvoker.class)) |
|
|
|
|
|
|
|
.hasSize(2); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
@Test |
|
|
@ -78,8 +80,11 @@ class RuntimeHintsUtilsTests { |
|
|
|
.anySatisfy(annotationHint(RetryInvoker.class)) |
|
|
|
.anySatisfy(annotationHint(RetryInvoker.class)) |
|
|
|
.anySatisfy(annotationHint(SampleInvoker.class)) |
|
|
|
.anySatisfy(annotationHint(SampleInvoker.class)) |
|
|
|
.hasSize(3); |
|
|
|
.hasSize(3); |
|
|
|
assertThat(this.hints.proxies().jdkProxies()).singleElement() |
|
|
|
assertThat(this.hints.proxies().jdkProxies()) |
|
|
|
.satisfies(annotationProxy(RetryWithEnabledFlagInvoker.class)); |
|
|
|
.anySatisfy(annotationProxy(RetryWithEnabledFlagInvoker.class)) |
|
|
|
|
|
|
|
.anySatisfy(annotationProxy(RetryInvoker.class)) |
|
|
|
|
|
|
|
.anySatisfy(annotationProxy(SampleInvoker.class)) |
|
|
|
|
|
|
|
.hasSize(3); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private Consumer<TypeHint> annotationHint(Class<?> type) { |
|
|
|
private Consumer<TypeHint> annotationHint(Class<?> type) { |
|
|
|