Package org.springframework.beans

Examples of org.springframework.beans.DerivedTestBean.wasInitialized()


    DerivedTestBean inherits = (DerivedTestBean) child.getBean("inheritsWithDifferentClass");
    // Name property value is overridden
    assertTrue(inherits.getName().equals("override"));
    // Age property is inherited from bean in parent factory
    assertTrue(inherits.getAge() == 1);
    assertTrue(inherits.wasInitialized());
  }

  public void testInheritanceWithClass() throws Exception {
    XmlBeanFactory parent = new XmlBeanFactory(new ClassPathResource("parent.xml", getClass()));
    XmlBeanFactory child = new XmlBeanFactory(new ClassPathResource("child.xml", getClass()), parent);
View Full Code Here


    DerivedTestBean inherits = (DerivedTestBean) child.getBean("inheritsWithClass");
    // Name property value is overridden
    assertTrue(inherits.getName().equals("override"));
    // Age property is inherited from bean in parent factory
    assertTrue(inherits.getAge() == 1);
    assertTrue(inherits.wasInitialized());
  }

  public void testPrototypeInheritanceFromParentFactoryPrototype() throws Exception {
    XmlBeanFactory parent = new XmlBeanFactory(new ClassPathResource("parent.xml", getClass()));
    XmlBeanFactory child = new XmlBeanFactory(new ClassPathResource("child.xml", getClass()), parent);
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.