Package org.springframework.beans

Examples of org.springframework.beans.NestedTestBean


    BindTag tag = new BindTag();
    tag.setPageContext(pc);
    tag.setPath("tb.doctor");
    tag.setHtmlEscape("true");
    TestBean tb = new TestBean("somebody", 99);
    NestedTestBean ntb = new NestedTestBean("juergen&eva");
    tb.setDoctor(ntb);
    pc.getRequest().setAttribute("tb", tb);
    tag.doStartTag();
    BindStatus status = (BindStatus) pc.getAttribute(BindTag.STATUS_VARIABLE_NAME, PageContext.REQUEST_SCOPE);
    assertEquals("doctor", status.getExpression());
View Full Code Here


 
    assertEquals(raw.toString(), tsp.toString());
  }
 
  public void testDelegateReturnsThisIsMassagedToReturnProxy() {
      NestedTestBean target = new NestedTestBean();
      String company = "Interface21";
      target.setCompany(company);
      TestBean delegate = new TestBean() {
            public ITestBean getSpouse() {
                return this;
            }
      };
View Full Code Here

    bf.registerSingleton("testBean2", tb2);
    TestBean tb3 = new TestBean();
    bf.registerSingleton("testBean3", tb3);
    TestBean tb4 = new TestBean();
    bf.registerSingleton("testBean4", tb4);
    NestedTestBean tb6 = new NestedTestBean();
    bf.registerSingleton("xy", tb6);
    bf.registerAlias("xy", "testBean9");

    ExtendedResourceInjectionBean bean = (ExtendedResourceInjectionBean) bf.getBean("annotatedBean");
    assertTrue(bean.initCalled);
View Full Code Here

    bf.registerSingleton("testBean2", tb2);
    TestBean tb3 = new TestBean();
    bf.registerSingleton("testBean3", tb3);
    TestBean tb4 = new TestBean();
    bf.registerSingleton("testBean4", tb4);
    NestedTestBean tb6 = new NestedTestBean();
    bf.registerSingleton("xy", tb6);

    ExtendedResourceInjectionBean bean = (ExtendedResourceInjectionBean) bf.getBean("annotatedBean");
    assertTrue(bean.initCalled);
    assertTrue(bean.init2Called);
View Full Code Here

    bf.registerSingleton("testBean2", tb2);
    TestBean tb3 = new TestBean();
    bf.registerSingleton("testBean3", tb3);
    TestBean tb4 = new TestBean();
    bf.registerSingleton("testBean4", tb4);
    NestedTestBean tb6 = new NestedTestBean();
    bf.registerSingleton("xy", tb6);
    bf.registerAlias("xy", "testBean9");

    ExtendedEjbInjectionBean bean = (ExtendedEjbInjectionBean) bf.getBean("annotatedBean");
    assertTrue(bean.initCalled);
View Full Code Here

    RootBeanDefinition bd = new RootBeanDefinition(TypedExtendedResourceInjectionBean.class);
    bd.setScope(RootBeanDefinition.SCOPE_PROTOTYPE);
    bf.registerBeanDefinition("annotatedBean", bd);
    TestBean tb = new TestBean();
    bf.registerSingleton("testBean", tb);
    NestedTestBean ntb = new NestedTestBean();
    bf.registerSingleton("nestedTestBean", ntb);

    TypedExtendedResourceInjectionBean bean = (TypedExtendedResourceInjectionBean) bf.getBean("annotatedBean");
    assertSame(tb, bean.getTestBean());
    assertSame(tb, bean.getTestBean2());
View Full Code Here

    TestBean tb2 = new TestBean();
    annotatedBd.getPropertyValues().addPropertyValue("testBean2", tb2);
    bf.registerBeanDefinition("annotatedBean", annotatedBd);
    TestBean tb = new TestBean();
    bf.registerSingleton("testBean", tb);
    NestedTestBean ntb = new NestedTestBean();
    bf.registerSingleton("nestedTestBean", ntb);

    TypedExtendedResourceInjectionBean bean = (TypedExtendedResourceInjectionBean) bf.getBean("annotatedBean");
    assertSame(tb, bean.getTestBean());
    assertSame(tb2, bean.getTestBean2());
View Full Code Here

    RootBeanDefinition bd = new RootBeanDefinition(TypedExtendedResourceInjectionBean.class);
    bd.setScope(RootBeanDefinition.SCOPE_PROTOTYPE);
    bf.registerBeanDefinition("annotatedBean", bd);
    TestBean tb = new TestBean();
    bf.registerSingleton("testBean", tb);
    NestedTestBean ntb = new NestedTestBean();
    bf.registerSingleton("nestedTestBean", ntb);

    TypedExtendedResourceInjectionBean bean = (TypedExtendedResourceInjectionBean) bf.getBean("annotatedBean");
    assertSame(tb, bean.getTestBean());
    assertSame(tb, bean.getTestBean2());
View Full Code Here

    bf.registerBeanDefinition("annotatedBean", new RootBeanDefinition(OptionalResourceInjectionBean.class));
    TestBean tb = new TestBean();
    bf.registerSingleton("testBean", tb);
    IndexedTestBean itb = new IndexedTestBean();
    bf.registerSingleton("indexedTestBean", itb);
    NestedTestBean ntb1 = new NestedTestBean();
    bf.registerSingleton("nestedTestBean1", ntb1);
    NestedTestBean ntb2 = new NestedTestBean();
    bf.registerSingleton("nestedTestBean2", ntb2);

    OptionalResourceInjectionBean bean = (OptionalResourceInjectionBean) bf.getBean("annotatedBean");
    assertSame(tb, bean.getTestBean());
    assertSame(tb, bean.getTestBean2());
View Full Code Here

    bf.registerBeanDefinition("annotatedBean", rbd);
    TestBean tb = new TestBean();
    bf.registerSingleton("testBean", tb);
    IndexedTestBean itb = new IndexedTestBean();
    bf.registerSingleton("indexedTestBean", itb);
    NestedTestBean ntb1 = new NestedTestBean();
    bf.registerSingleton("nestedTestBean1", ntb1);
    NestedTestBean ntb2 = new NestedTestBean();
    bf.registerSingleton("nestedTestBean2", ntb2);

    // Two calls to verify that caching doesn't break re-creation.
    OptionalCollectionResourceInjectionBean bean = (OptionalCollectionResourceInjectionBean) bf.getBean("annotatedBean");
    bean = (OptionalCollectionResourceInjectionBean) bf.getBean("annotatedBean");
View Full Code Here

TOP

Related Classes of org.springframework.beans.NestedTestBean

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.