use of cn.taketoday.context.ApplicationContext in project today-infrastructure by TAKETODAY.
the class Spr11310Tests method orderedList.
@Test
public void orderedList() {
ApplicationContext context = new StandardApplicationContext(Config.class);
StringHolder holder = context.getBean(StringHolder.class);
assertThat(holder.itemsList.get(0)).isEqualTo("second");
assertThat(holder.itemsList.get(1)).isEqualTo("first");
assertThat(holder.itemsList.get(2)).isEqualTo("unknownOrder");
}
use of cn.taketoday.context.ApplicationContext in project today-infrastructure by TAKETODAY.
the class Spr11310Tests method orderedArray.
@Test
public void orderedArray() {
ApplicationContext context = new StandardApplicationContext(Config.class);
StringHolder holder = context.getBean(StringHolder.class);
assertThat(holder.itemsArray[0]).isEqualTo("second");
assertThat(holder.itemsArray[1]).isEqualTo("first");
assertThat(holder.itemsArray[2]).isEqualTo("unknownOrder");
}
use of cn.taketoday.context.ApplicationContext in project today-infrastructure by TAKETODAY.
the class Spr15275Tests method testWithAbstractFactoryBean.
@Test
public void testWithAbstractFactoryBean() {
ApplicationContext context = new StandardApplicationContext(ConfigWithAbstractFactoryBean.class);
assertThat(context.getBean(Bar.class).foo.toString()).isEqualTo("x");
assertThat(context.getBean(Bar.class).foo).isSameAs(context.getBean(FooInterface.class));
}
use of cn.taketoday.context.ApplicationContext in project today-infrastructure by TAKETODAY.
the class Spr15275Tests method testWithAbstractFactoryBeanForInterface.
@Test
public void testWithAbstractFactoryBeanForInterface() {
ApplicationContext context = new StandardApplicationContext(ConfigWithAbstractFactoryBeanForInterface.class);
assertThat(context.getBean(Bar.class).foo.toString()).isEqualTo("x");
assertThat(context.getBean(Bar.class).foo).isSameAs(context.getBean(FooInterface.class));
}
use of cn.taketoday.context.ApplicationContext in project today-infrastructure by TAKETODAY.
the class Spr11202Tests method testWithoutImporter.
@Test
public void testWithoutImporter() {
ApplicationContext context = new StandardApplicationContext(Config.class);
assertThat(context.getBean("value")).isEqualTo("foo");
}
Aggregations