Package org.springframework.beans.factory

Examples of org.springframework.beans.factory.DummyFactory


    rod = (TestBean) parent.getBean("rod");
    assertTrue("Bean from root context", "Roderick".equals(rod.getName()));
  }

  public void testFactoryReferences() {
    DummyFactory factory = (DummyFactory) getBeanFactory().getBean("&singletonFactory");

    DummyReferencer ref = (DummyReferencer) getBeanFactory().getBean("factoryReferencer");
    assertTrue(ref.getTestBean1() == ref.getTestBean2());
    assertTrue(ref.getDummyFactory() == factory);
View Full Code Here


  }

  public void testBeanPostProcessor() throws Exception {
    TestBean kerry = (TestBean) getBeanFactory().getBean("kerry");
    TestBean kathy = (TestBean) getBeanFactory().getBean("kathy");
    DummyFactory factory = (DummyFactory) getBeanFactory().getBean("&singletonFactory");
    TestBean factoryCreated = (TestBean) getBeanFactory().getBean("singletonFactory");
    assertTrue(kerry.isPostProcessed());
    assertTrue(kathy.isPostProcessed());
    assertTrue(factory.isPostProcessed());
    assertTrue(factoryCreated.isPostProcessed());
  }
View Full Code Here

  }

  public void testFactoryReferenceCircle() {
    XmlBeanFactory xbf = new XmlBeanFactory(new ClassPathResource("factoryCircle.xml", getClass()));
    TestBean tb = (TestBean) xbf.getBean("singletonFactory");
    DummyFactory db = (DummyFactory) xbf.getBean("&singletonFactory");
    assertTrue(tb == db.getOtherTestBean());
  }
View Full Code Here

    assertTrue(tb == db.getOtherTestBean());
  }

  public void testFactoryReferenceWithDoublePrefix() {
    XmlBeanFactory xbf = new XmlBeanFactory(new ClassPathResource("factoryCircle.xml", getClass()));
    DummyFactory db = (DummyFactory) xbf.getBean("&&singletonFactory");
  }
View Full Code Here

TOP

Related Classes of org.springframework.beans.factory.DummyFactory

Copyright © 2018 www.massapicom. 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.