Polishing

This commit is contained in:
Sam Brannen
2022-07-10 18:31:58 +02:00
parent d7b45b7c8e
commit 9db43037fe
4 changed files with 21 additions and 20 deletions
@@ -59,13 +59,13 @@ class ProxyHintsTests {
}
@Test
void registerJdkProxyWithSupplier() {
void registerJdkProxyWithConsumer() {
this.proxyHints.registerJdkProxy(springProxy(TypeReference.of("com.example.Test")));
assertThat(this.proxyHints.jdkProxies()).singleElement().satisfies(proxiedInterfaces(
"com.example.Test",
"org.springframework.aop.SpringProxy",
"org.springframework.aop.framework.Advised",
"org.springframework.core.DecoratingProxy",
"com.example.Test"));
"org.springframework.core.DecoratingProxy"));
}
@Test
@@ -102,10 +102,11 @@ class ProxyHintsTests {
}
private static Consumer<JdkProxyHint.Builder> springProxy(TypeReference proxiedInterface) {
return builder -> builder.proxiedInterfaces(Stream.of("org.springframework.aop.SpringProxy",
return builder -> builder
.proxiedInterfaces(proxiedInterface)
.proxiedInterfaces(Stream.of("org.springframework.aop.SpringProxy",
"org.springframework.aop.framework.Advised", "org.springframework.core.DecoratingProxy")
.map(TypeReference::of).toArray(TypeReference[]::new))
.proxiedInterfaces(proxiedInterface);
.map(TypeReference::of).toArray(TypeReference[]::new));
}
private Consumer<JdkProxyHint> proxiedInterfaces(String... proxiedInterfaces) {