Browse Source

Add test to validate AOT infrastructure registration

See gh-28561
pull/28569/head
Stephane Nicoll 2 years ago
parent
commit
3aefa88d3c
  1. 7
      spring-beans/src/test/java/org/springframework/beans/factory/aot/BeanRegistrationsAotProcessorTests.java

7
spring-beans/src/test/java/org/springframework/beans/factory/aot/BeanRegistrationsAotProcessorTests.java

@ -33,6 +33,13 @@ import static org.assertj.core.api.Assertions.assertThat; @@ -33,6 +33,13 @@ import static org.assertj.core.api.Assertions.assertThat;
*/
class BeanRegistrationsAotProcessorTests {
@Test
void beanRegistrationsAotProcessorIsRegistered() {
assertThat(new AotFactoriesLoader(new DefaultListableBeanFactory())
.load(BeanFactoryInitializationAotProcessor.class))
.anyMatch(BeanRegistrationsAotProcessor.class::isInstance);
}
@Test
void processAheadOfTimeReturnsBeanRegistrationsAotContributionWithRegistrations() {
BeanRegistrationsAotProcessor processor = new BeanRegistrationsAotProcessor();

Loading…
Cancel
Save