Examples of destroySingletons()


Examples of org.springframework.beans.factory.support.DefaultListableBeanFactory.destroySingletons()

    bf.registerBeanDefinition("annotatedBean", new RootBeanDefinition(MapMethodInjectionBean.class));

    MapMethodInjectionBean bean = (MapMethodInjectionBean) bf.getBean("annotatedBean");
    assertNull(bean.getTestBeanMap());
    assertNull(bean.getTestBean());
    bf.destroySingletons();
  }

  public void testCustomAnnotationRequiredFieldResourceInjection() {
    DefaultListableBeanFactory bf = new DefaultListableBeanFactory();
    AutowiredAnnotationBeanPostProcessor bpp = new AutowiredAnnotationBeanPostProcessor();
View Full Code Here

Examples of org.springframework.beans.factory.support.DefaultListableBeanFactory.destroySingletons()

    TestBean tb = new TestBean();
    bf.registerSingleton("testBean", tb);

    CustomAnnotationRequiredFieldResourceInjectionBean bean = (CustomAnnotationRequiredFieldResourceInjectionBean) bf.getBean("customBean");
    assertSame(tb, bean.getTestBean());
    bf.destroySingletons();
  }

  public void testCustomAnnotationRequiredFieldResourceInjectionFailsWhenNoDependencyFound() {
    DefaultListableBeanFactory bf = new DefaultListableBeanFactory();
    AutowiredAnnotationBeanPostProcessor bpp = new AutowiredAnnotationBeanPostProcessor();
View Full Code Here

Examples of org.springframework.beans.factory.support.DefaultListableBeanFactory.destroySingletons()

      fail("expected BeanCreationException; no dependency available for required field");
    }
    catch (BeanCreationException e) {
      // expected
    }
    bf.destroySingletons();
  }

  public void testCustomAnnotationRequiredFieldResourceInjectionFailsWhenMultipleDependenciesFound() {
    DefaultListableBeanFactory bf = new DefaultListableBeanFactory();
    AutowiredAnnotationBeanPostProcessor bpp = new AutowiredAnnotationBeanPostProcessor();
View Full Code Here

Examples of org.springframework.beans.factory.support.DefaultListableBeanFactory.destroySingletons()

      fail("expected BeanCreationException; multiple beans of dependency type available");
    }
    catch (BeanCreationException e) {
      // expected
    }
    bf.destroySingletons();
  }

  public void testCustomAnnotationRequiredMethodResourceInjection() {
    DefaultListableBeanFactory bf = new DefaultListableBeanFactory();
    AutowiredAnnotationBeanPostProcessor bpp = new AutowiredAnnotationBeanPostProcessor();
View Full Code Here

Examples of org.springframework.beans.factory.support.DefaultListableBeanFactory.destroySingletons()

    TestBean tb = new TestBean();
    bf.registerSingleton("testBean", tb);

    CustomAnnotationRequiredMethodResourceInjectionBean bean = (CustomAnnotationRequiredMethodResourceInjectionBean) bf.getBean("customBean");
    assertSame(tb, bean.getTestBean());
    bf.destroySingletons();
  }

  public void testCustomAnnotationRequiredMethodResourceInjectionFailsWhenNoDependencyFound() {
    DefaultListableBeanFactory bf = new DefaultListableBeanFactory();
    AutowiredAnnotationBeanPostProcessor bpp = new AutowiredAnnotationBeanPostProcessor();
View Full Code Here

Examples of org.springframework.beans.factory.support.DefaultListableBeanFactory.destroySingletons()

      fail("expected BeanCreationException; no dependency available for required method");
    }
    catch (BeanCreationException e) {
      // expected
    }
    bf.destroySingletons();
  }

  public void testCustomAnnotationRequiredMethodResourceInjectionFailsWhenMultipleDependenciesFound() {
    DefaultListableBeanFactory bf = new DefaultListableBeanFactory();
    AutowiredAnnotationBeanPostProcessor bpp = new AutowiredAnnotationBeanPostProcessor();
View Full Code Here

Examples of org.springframework.beans.factory.support.DefaultListableBeanFactory.destroySingletons()

      fail("expected BeanCreationException; multiple beans of dependency type available");
    }
    catch (BeanCreationException e) {
      // expected
    }
    bf.destroySingletons();
  }

  public void testCustomAnnotationOptionalFieldResourceInjection() {
    DefaultListableBeanFactory bf = new DefaultListableBeanFactory();
    AutowiredAnnotationBeanPostProcessor bpp = new AutowiredAnnotationBeanPostProcessor();
View Full Code Here

Examples of org.springframework.beans.factory.support.DefaultListableBeanFactory.destroySingletons()

    CustomAnnotationOptionalFieldResourceInjectionBean bean = (CustomAnnotationOptionalFieldResourceInjectionBean) bf.getBean("customBean");
    assertSame(tb, bean.getTestBean3());
    assertNull(bean.getTestBean());
    assertNull(bean.getTestBean2());
    bf.destroySingletons();
  }

  public void testCustomAnnotationOptionalFieldResourceInjectionWhenNoDependencyFound() {
    DefaultListableBeanFactory bf = new DefaultListableBeanFactory();
    AutowiredAnnotationBeanPostProcessor bpp = new AutowiredAnnotationBeanPostProcessor();
View Full Code Here

Examples of org.springframework.beans.factory.support.DefaultListableBeanFactory.destroySingletons()

    CustomAnnotationOptionalFieldResourceInjectionBean bean = (CustomAnnotationOptionalFieldResourceInjectionBean) bf.getBean("customBean");
    assertNull(bean.getTestBean3());
    assertNull(bean.getTestBean());
    assertNull(bean.getTestBean2());
    bf.destroySingletons();
  }

  public void testCustomAnnotationOptionalFieldResourceInjectionWhenMultipleDependenciesFound() {
    DefaultListableBeanFactory bf = new DefaultListableBeanFactory();
    AutowiredAnnotationBeanPostProcessor bpp = new AutowiredAnnotationBeanPostProcessor();
View Full Code Here

Examples of org.springframework.beans.factory.support.DefaultListableBeanFactory.destroySingletons()

      fail("expected BeanCreationException; multiple beans of dependency type available");
    }
    catch (BeanCreationException e) {
      // expected
    }
    bf.destroySingletons();
  }

  public void testCustomAnnotationOptionalMethodResourceInjection() {
    DefaultListableBeanFactory bf = new DefaultListableBeanFactory();
    AutowiredAnnotationBeanPostProcessor bpp = new AutowiredAnnotationBeanPostProcessor();
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.