Improve BeanDefinitionBuilder to handle the synthetic flag

Closes gh-27141
This commit is contained in:
Stephane Nicoll
2021-07-07 16:13:19 +02:00
parent cf78895ba0
commit fed1a426b6
2 changed files with 16 additions and 1 deletions

View File

@@ -110,6 +110,12 @@ class BeanDefinitionBuilderTests {
.isEqualTo(BeanDefinition.ROLE_INFRASTRUCTURE);
}
@Test
void builderWithSynthetic() {
assertThat(BeanDefinitionBuilder.rootBeanDefinition(TestBean.class)
.setSynthetic(true).getBeanDefinition().isSynthetic()).isTrue();
}
@Test
void builderWithCustomizers() {
BeanDefinition beanDefinition = BeanDefinitionBuilder.rootBeanDefinition(TestBean.class)