Package example.scannable

Examples of example.scannable.ScopedProxyTestBean.foo()


    context.getBeanFactory().registerScope("myScope", new SimpleMapScope());
    ScopedProxyTestBean bean = (ScopedProxyTestBean) context.getBean("scopedProxyTestBean");
    // should be a class-based proxy
    assertTrue(AopUtils.isCglibProxy(bean));
    // test serializability
    assertEquals("bar", bean.foo(1));
    ScopedProxyTestBean deserialized = (ScopedProxyTestBean) SerializationTestUtils.serializeAndDeserialize(bean);
    assertNotNull(deserialized);
    assertEquals("bar", deserialized.foo(1));
  }
View Full Code Here


    assertTrue(AopUtils.isCglibProxy(bean));
    // test serializability
    assertEquals("bar", bean.foo(1));
    ScopedProxyTestBean deserialized = (ScopedProxyTestBean) SerializationTestUtils.serializeAndDeserialize(bean);
    assertNotNull(deserialized);
    assertEquals("bar", deserialized.foo(1));
  }

  @Test
  public void testInvalidConfigScopedProxy() {
    try {
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.