Test DirContextProcessor Runtime Hints
Issue gh-721
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
package org.springframework.ldap.aot.hint;
|
||||
|
||||
import javax.naming.ldap.PagedResultsControl;
|
||||
import javax.naming.ldap.PagedResultsResponseControl;
|
||||
import javax.naming.ldap.SortControl;
|
||||
import javax.naming.ldap.SortResponseControl;
|
||||
import javax.net.ssl.SSLSocketFactory;
|
||||
|
||||
import org.junit.Before;
|
||||
@@ -48,6 +52,30 @@ public class LdapCoreRuntimeHintsTests {
|
||||
.accepts(this.hints);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void pagedResultsControlHasHints() {
|
||||
assertThat(RuntimeHintsPredicates.reflection().onType(PagedResultsControl.class).withMemberCategories(
|
||||
MemberCategory.INVOKE_PUBLIC_METHODS, MemberCategory.INVOKE_PUBLIC_CONSTRUCTORS)).accepts(this.hints);
|
||||
assertThat(RuntimeHintsPredicates.reflection().onType(com.sun.jndi.ldap.ctl.PagedResultsControl.class).withMemberCategories(
|
||||
MemberCategory.INVOKE_PUBLIC_METHODS, MemberCategory.INVOKE_PUBLIC_CONSTRUCTORS)).accepts(this.hints);
|
||||
assertThat(RuntimeHintsPredicates.reflection().onType(PagedResultsResponseControl.class).withMemberCategories(
|
||||
MemberCategory.INVOKE_PUBLIC_METHODS, MemberCategory.INVOKE_PUBLIC_CONSTRUCTORS)).accepts(this.hints);
|
||||
assertThat(RuntimeHintsPredicates.reflection().onType(com.sun.jndi.ldap.ctl.PagedResultsResponseControl.class).withMemberCategories(
|
||||
MemberCategory.INVOKE_PUBLIC_METHODS, MemberCategory.INVOKE_PUBLIC_CONSTRUCTORS)).accepts(this.hints);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void sortControlHasHints() {
|
||||
assertThat(RuntimeHintsPredicates.reflection().onType(SortControl.class).withMemberCategories(
|
||||
MemberCategory.INVOKE_PUBLIC_METHODS, MemberCategory.INVOKE_PUBLIC_CONSTRUCTORS)).accepts(this.hints);
|
||||
assertThat(RuntimeHintsPredicates.reflection().onType(com.sun.jndi.ldap.ctl.SortControl.class).withMemberCategories(
|
||||
MemberCategory.INVOKE_PUBLIC_METHODS, MemberCategory.INVOKE_PUBLIC_CONSTRUCTORS)).accepts(this.hints);
|
||||
assertThat(RuntimeHintsPredicates.reflection().onType(SortResponseControl.class).withMemberCategories(
|
||||
MemberCategory.INVOKE_PUBLIC_METHODS, MemberCategory.INVOKE_PUBLIC_CONSTRUCTORS)).accepts(this.hints);
|
||||
assertThat(RuntimeHintsPredicates.reflection().onType(com.sun.jndi.ldap.ctl.SortResponseControl.class).withMemberCategories(
|
||||
MemberCategory.INVOKE_PUBLIC_METHODS, MemberCategory.INVOKE_PUBLIC_CONSTRUCTORS)).accepts(this.hints);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void sslSocketFactoryHasHints() throws Exception {
|
||||
assertThat(RuntimeHintsPredicates.reflection().onMethod(SSLSocketFactory.class.getDeclaredMethod("getDefault")))
|
||||
|
||||
Reference in New Issue
Block a user