Package org.apache.wicket.spring

Examples of org.apache.wicket.spring.SpringBeanLocator.locateProxyTarget()


  {
    Bean bean = new Bean();
    ctx.putBean("bean", bean);

    SpringBeanLocator locator = new SpringBeanLocator("bean", Bean.class, ctxLocator);
    assertTrue(locator.locateProxyTarget() == bean);

  }

  /**
   * tests lookup by name after locator has been deserialized
View Full Code Here


    ctx.putBean("bean", bean);

    SpringBeanLocator locator = (SpringBeanLocator) Objects
        .cloneObject(new SpringBeanLocator("bean", Bean.class, ctxLocator));

    assertNotNull(locator.locateProxyTarget());
  }

  /**
   * tests error if no bean with name found
   */
 
View Full Code Here

  public void testLookupByNameNotFound()
  {
    SpringBeanLocator locator = new SpringBeanLocator("bean", Bean.class, ctxLocator);
    try
    {
      locator.locateProxyTarget();
      fail();
    }
    catch (IllegalStateException e)
    {
      // noop
View Full Code Here

  {
    SpringContextLocatorMock ctxLocator = new SpringContextLocatorMock(null);
    SpringBeanLocator locator = new SpringBeanLocator(Bean.class, ctxLocator);
    try
    {
      locator.locateProxyTarget();
    }
    catch (IllegalStateException e)
    {
      // noop
    }
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.