use of cn.taketoday.beans.factory.support.DefaultBeanNameGenerator in project today-infrastructure by TAKETODAY.
the class ApplicationTests method customBeanNameGeneratorWithNonWebApplication.
@Test
void customBeanNameGeneratorWithNonWebApplication() {
TestApplication application = new TestApplication(ExampleWebConfig.class);
application.setApplicationType(ApplicationType.NONE_WEB);
BeanNameGenerator beanNameGenerator = new DefaultBeanNameGenerator();
application.setBeanNameGenerator(beanNameGenerator);
this.context = application.run();
then(application.getLoader()).should().setBeanNameGenerator(beanNameGenerator);
Object actualGenerator = this.context.getBean(AnnotationConfigUtils.CONFIGURATION_BEAN_NAME_GENERATOR);
assertThat(actualGenerator).isSameAs(beanNameGenerator);
}
use of cn.taketoday.beans.factory.support.DefaultBeanNameGenerator in project today-infrastructure by TAKETODAY.
the class ApplicationTests method customBeanNameGenerator.
@Test
void customBeanNameGenerator() {
TestApplication application = new TestApplication(ExampleWebConfig.class);
BeanNameGenerator beanNameGenerator = new DefaultBeanNameGenerator();
application.setBeanNameGenerator(beanNameGenerator);
this.context = application.run();
then(application.getLoader()).should().setBeanNameGenerator(beanNameGenerator);
Object actualGenerator = this.context.getBean(AnnotationConfigUtils.CONFIGURATION_BEAN_NAME_GENERATOR);
assertThat(actualGenerator).isSameAs(beanNameGenerator);
}
use of cn.taketoday.beans.factory.support.DefaultBeanNameGenerator in project today-framework by TAKETODAY.
the class ApplicationTests method customBeanNameGenerator.
@Test
void customBeanNameGenerator() {
TestApplication application = new TestApplication(ExampleWebConfig.class);
BeanNameGenerator beanNameGenerator = new DefaultBeanNameGenerator();
application.setBeanNameGenerator(beanNameGenerator);
this.context = application.run();
then(application.getLoader()).should().setBeanNameGenerator(beanNameGenerator);
Object actualGenerator = this.context.getBean(AnnotationConfigUtils.CONFIGURATION_BEAN_NAME_GENERATOR);
assertThat(actualGenerator).isSameAs(beanNameGenerator);
}
use of cn.taketoday.beans.factory.support.DefaultBeanNameGenerator in project today-framework by TAKETODAY.
the class ApplicationTests method customBeanNameGeneratorWithNonWebApplication.
@Test
void customBeanNameGeneratorWithNonWebApplication() {
TestApplication application = new TestApplication(ExampleWebConfig.class);
application.setApplicationType(ApplicationType.NONE_WEB);
BeanNameGenerator beanNameGenerator = new DefaultBeanNameGenerator();
application.setBeanNameGenerator(beanNameGenerator);
this.context = application.run();
then(application.getLoader()).should().setBeanNameGenerator(beanNameGenerator);
Object actualGenerator = this.context.getBean(AnnotationConfigUtils.CONFIGURATION_BEAN_NAME_GENERATOR);
assertThat(actualGenerator).isSameAs(beanNameGenerator);
}
Aggregations