Package org.springframework.beans

Examples of org.springframework.beans.TestBean.wasDestroyed()


    FactoryMethods fm2 = (FactoryMethods) xbf.getBean("full");
    assertSame(fm, fm2);

    xbf.destroySingletons();
    assertTrue(tb.wasDestroyed());
  }

  public void testFactoryMethodsWithNullInstance() {
    DefaultListableBeanFactory xbf = new DefaultListableBeanFactory();
    XmlBeanDefinitionReader reader = new XmlBeanDefinitionReader(xbf);
View Full Code Here


      assertNotNull(request.getAttribute(outerBeanName));
      TestBean inner1 = (TestBean) outer1.getSpouse();
      assertSame(outer1, this.beanFactory.getBean(outerBeanName));
      requestAttributes.requestCompleted();
      assertTrue(outer1.wasDestroyed());
      assertTrue(inner1.wasDestroyed());
      request = new MockHttpServletRequest();
      requestAttributes = new ServletRequestAttributes(request);
      RequestContextHolder.setRequestAttributes(requestAttributes);
      TestBean outer2 = (TestBean) this.beanFactory.getBean(outerBeanName);
      assertNotSame(outer1, outer2);
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.