mirror of
https://github.com/spring-projects/spring-boot.git
synced 2026-09-17 12:09:16 +00:00
Add missing tests for reflection hints
See gh-51382
This commit is contained in:
+13
@@ -27,6 +27,9 @@ import org.junit.jupiter.api.AfterEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.extension.ExtendWith;
|
||||
|
||||
import org.springframework.aot.hint.MemberCategory;
|
||||
import org.springframework.aot.hint.RuntimeHints;
|
||||
import org.springframework.aot.hint.predicate.RuntimeHintsPredicates;
|
||||
import org.springframework.boot.autoconfigure.AutoConfigurations;
|
||||
import org.springframework.boot.convert.ApplicationConversionService;
|
||||
import org.springframework.boot.ssl.DefaultSslBundleRegistry;
|
||||
@@ -304,6 +307,16 @@ class LdapAutoConfigurationTests {
|
||||
});
|
||||
}
|
||||
|
||||
@Test
|
||||
void shouldRegisterHintsForSocketFactoryLoadedByJndi() {
|
||||
RuntimeHints runtimeHints = new RuntimeHints();
|
||||
new LdapAutoConfiguration.LdapAutoConfigurationRuntimeHints().registerHints(runtimeHints,
|
||||
getClass().getClassLoader());
|
||||
assertThat(RuntimeHintsPredicates.reflection()
|
||||
.onType(LdapSslSocketFactory.class)
|
||||
.withMemberCategory(MemberCategory.INVOKE_PUBLIC_METHODS)).accepts(runtimeHints);
|
||||
}
|
||||
|
||||
@Test
|
||||
void shouldFailWhenSslBundleConfiguredWithMixedSchemeUrls() {
|
||||
SslBundle sslBundle = mock(SslBundle.class);
|
||||
|
||||
Reference in New Issue
Block a user