Merge branch '6.0.x'

This commit is contained in:
Sébastien Deleuze
2023-06-09 15:21:54 +02:00
2 changed files with 14 additions and 3 deletions

View File

@@ -22,9 +22,10 @@ import org.junit.jupiter.api.Test;
import org.springframework.aot.hint.MemberCategory;
import org.springframework.aot.hint.RuntimeHints;
import org.springframework.aot.hint.RuntimeHintsRegistrar;
import org.springframework.aot.hint.TypeReference;
import org.springframework.aot.hint.predicate.RuntimeHintsPredicates;
import org.springframework.core.io.ResourceEditor;
import org.springframework.core.io.support.SpringFactoriesLoader;
import org.springframework.http.MediaTypeEditor;
import org.springframework.util.ClassUtils;
import static org.assertj.core.api.Assertions.assertThat;
@@ -48,7 +49,13 @@ class BeanUtilsRuntimeHintsTests {
@Test
void mediaTypeEditorHasHints() {
assertThat(RuntimeHintsPredicates.reflection().onType(TypeReference.of("org.springframework.http.MediaTypeEditor"))
assertThat(RuntimeHintsPredicates.reflection().onType(MediaTypeEditor.class)
.withMemberCategories(MemberCategory.INVOKE_DECLARED_CONSTRUCTORS)).accepts(this.hints);
}
@Test
void resourceEditorHasHints() {
assertThat(RuntimeHintsPredicates.reflection().onType(ResourceEditor.class)
.withMemberCategories(MemberCategory.INVOKE_DECLARED_CONSTRUCTORS)).accepts(this.hints);
}