Examples of DummyFactory


Examples of org.springframework.tests.sample.beans.factory.DummyFactory

  @Test
  public void testFindsBeansOfTypeWithStaticFactory() {
    StaticListableBeanFactory lbf = new StaticListableBeanFactory();
    TestBean t1 = new TestBean();
    TestBean t2 = new TestBean();
    DummyFactory t3 = new DummyFactory();
    DummyFactory t4 = new DummyFactory();
    t4.setSingleton(false);
    lbf.addBean("t1", t1);
    lbf.addBean("t2", t2);
    lbf.addBean("t3", t3);
    lbf.addBean("t4", t4);
View Full Code Here

Examples of org.springframework.tests.sample.beans.factory.DummyFactory

  @Test
  public void testFactoryReferenceCircle() {
    DefaultListableBeanFactory xbf = new DefaultListableBeanFactory();
    new XmlBeanDefinitionReader(xbf).loadBeanDefinitions(FACTORY_CIRCLE_CONTEXT);
    TestBean tb = (TestBean) xbf.getBean("singletonFactory");
    DummyFactory db = (DummyFactory) xbf.getBean("&singletonFactory");
    assertTrue(tb == db.getOtherTestBean());
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.