Package org.apache.wicket.proxy.util

Examples of org.apache.wicket.proxy.util.IInterface


   */
  @Test
  public void testInterfaceProxy()
  {
    // test proxy creation for an interface class
    IInterface proxy = (IInterface)LazyInitProxyFactory.createProxy(IInterface.class,
      interfaceObjectLocator);

    // test we have a jdk dynamic proxy
    assertTrue(Proxy.isProxyClass(proxy.getClass()));

    // test proxy implements ILazyInitProxy
    assertTrue(proxy instanceof ILazyInitProxy);
    assertTrue(((ILazyInitProxy)proxy).getObjectLocator() == interfaceObjectLocator);

    // test method invocation
    assertEquals(proxy.getMessage(), "interface");

    // test serialization
    IInterface proxy2 = (IInterface)WicketObjects.cloneObject(proxy);
    assertTrue(proxy != proxy2);
    assertEquals(proxy2.getMessage(), "interface");

    // test equals/hashcode method interception
    final IObjectMethodTester tester = new ObjectMethodTester();
    assertTrue(tester.isValid());

View Full Code Here


   */
  @Test
  public void testInterfaceProxy()
  {
    // test proxy creation for an interface class
    IInterface proxy = (IInterface)LazyInitProxyFactory.createProxy(IInterface.class,
      interfaceObjectLocator);

    // test we have a jdk dynamic proxy
    assertTrue(Proxy.isProxyClass(proxy.getClass()));

    // test proxy implements ILazyInitProxy
    assertThat(proxy, instanceOf(ILazyInitProxy.class));
    assertTrue(((ILazyInitProxy)proxy).getObjectLocator() == interfaceObjectLocator);

    // test method invocation
    assertEquals(proxy.getMessage(), "interface");

    // test serialization
    IInterface proxy2 = WicketObjects.cloneObject(proxy);
    assertTrue(proxy != proxy2);
    assertEquals(proxy2.getMessage(), "interface");

    // test equals/hashcode method interception
    final IObjectMethodTester tester = new ObjectMethodTester();
    assertTrue(tester.isValid());

View Full Code Here

   * Tests lazy init proxy to represent interfaces
   */
  public void testInterfaceProxy()
  {
    // test proxy creation for an interface class
    IInterface proxy = (IInterface)LazyInitProxyFactory.createProxy(IInterface.class,
        interfaceObjectLocator);

    // test we have a jdk dynamic proxy
    assertTrue(Proxy.isProxyClass(proxy.getClass()));

    // test proxy implements ILazyInitProxy
    assertTrue(proxy instanceof ILazyInitProxy);
    assertTrue(((ILazyInitProxy)proxy).getObjectLocator() == interfaceObjectLocator);

    // test method invocation
    assertEquals(proxy.getMessage(), "interface");

    // test serialization
    IInterface proxy2 = (IInterface)Objects.cloneObject(proxy);
    assertTrue(proxy != proxy2);
    assertEquals(proxy2.getMessage(), "interface");

    // test equals/hashcode method interception
    final IObjectMethodTester tester = new ObjectMethodTester();
    assertTrue(tester.isValid());

View Full Code Here

   */
  @Test
  public void testInterfaceProxy()
  {
    // test proxy creation for an interface class
    IInterface proxy = (IInterface)LazyInitProxyFactory.createProxy(IInterface.class,
      interfaceObjectLocator);

    // test we have a jdk dynamic proxy
    assertTrue(Proxy.isProxyClass(proxy.getClass()));

    // test proxy implements ILazyInitProxy
    assertTrue(proxy instanceof ILazyInitProxy);
    assertTrue(((ILazyInitProxy)proxy).getObjectLocator() == interfaceObjectLocator);

    // test method invocation
    assertEquals(proxy.getMessage(), "interface");

    // test serialization
    IInterface proxy2 = (IInterface)WicketObjects.cloneObject(proxy);
    assertTrue(proxy != proxy2);
    assertEquals(proxy2.getMessage(), "interface");

    // test equals/hashcode method interception
    final IObjectMethodTester tester = new ObjectMethodTester();
    assertTrue(tester.isValid());

View Full Code Here

   */
  @Test
  public void testInterfaceProxy()
  {
    // test proxy creation for an interface class
    IInterface proxy = (IInterface)LazyInitProxyFactory.createProxy(IInterface.class,
      interfaceObjectLocator);

    // test we have a jdk dynamic proxy
    assertTrue(Proxy.isProxyClass(proxy.getClass()));

    // test proxy implements ILazyInitProxy
    assertTrue(proxy instanceof ILazyInitProxy);
    assertTrue(((ILazyInitProxy)proxy).getObjectLocator() == interfaceObjectLocator);

    // test method invocation
    assertEquals(proxy.getMessage(), "interface");

    // test serialization
    IInterface proxy2 = (IInterface)WicketObjects.cloneObject(proxy);
    assertTrue(proxy != proxy2);
    assertEquals(proxy2.getMessage(), "interface");

    // test equals/hashcode method interception
    final IObjectMethodTester tester = new ObjectMethodTester();
    assertTrue(tester.isValid());

View Full Code Here

   * Tests lazy init proxy to represent interfaces
   */
  public void testInterfaceProxy()
  {
    // test proxy creation for an interface class
    IInterface proxy = (IInterface) LazyInitProxyFactory.createProxy(
        IInterface.class, interfaceObjectLocator);

    // test we have a jdk dynamic proxy
    assertTrue(Proxy.isProxyClass(proxy.getClass()));

    // test proxy implements ILazyInitProxy
    assertTrue(proxy instanceof ILazyInitProxy);
    assertTrue(((ILazyInitProxy) proxy).getObjectLocator() == interfaceObjectLocator);

    // test method invocation
    assertEquals(proxy.getMessage(), "interface");

    // test serialization
    IInterface proxy2 = (IInterface) Objects.cloneObject(proxy);
    assertTrue(proxy != proxy2);
    assertEquals(proxy2.getMessage(), "interface");

    // test equals/hashcode method interception
    final IObjectMethodTester tester = new ObjectMethodTester();
    assertTrue(tester.isValid());

View Full Code Here

   * Tests lazy init proxy to represent interfaces
   */
  public void testInterfaceProxy()
  {
    // test proxy creation for an interface class
    IInterface proxy = (IInterface) LazyInitProxyFactory.createProxy(
        IInterface.class, interfaceObjectLocator);

    // test we have a jdk dynamic proxy
    assertTrue(Proxy.isProxyClass(proxy.getClass()));

    // test proxy implements ILazyInitProxy
    assertTrue(proxy instanceof ILazyInitProxy);
    assertTrue(((ILazyInitProxy) proxy).getObjectLocator() == interfaceObjectLocator);

    // test method invocation
    assertEquals(proxy.getMessage(), "interface");

    // test serialization
    IInterface proxy2 = (IInterface) Objects.cloneObject(proxy);
    assertTrue(proxy != proxy2);
    assertEquals(proxy2.getMessage(), "interface");

    // test equals/hashcode method interception
    final IObjectMethodTester tester = new ObjectMethodTester();
    assertTrue(tester.isValid());

View Full Code Here

   * Tests lazy init proxy to represent interfaces
   */
  public void testInterfaceProxy()
  {
    // test proxy creation for an interface class
    IInterface proxy = (IInterface)LazyInitProxyFactory.createProxy(IInterface.class,
      interfaceObjectLocator);

    // test we have a jdk dynamic proxy
    assertTrue(Proxy.isProxyClass(proxy.getClass()));

    // test proxy implements ILazyInitProxy
    assertTrue(proxy instanceof ILazyInitProxy);
    assertTrue(((ILazyInitProxy)proxy).getObjectLocator() == interfaceObjectLocator);

    // test method invocation
    assertEquals(proxy.getMessage(), "interface");

    // test serialization
    IInterface proxy2 = (IInterface)WicketObjects.cloneObject(proxy);
    assertTrue(proxy != proxy2);
    assertEquals(proxy2.getMessage(), "interface");

    // test equals/hashcode method interception
    final IObjectMethodTester tester = new ObjectMethodTester();
    assertTrue(tester.isValid());

View Full Code Here

TOP

Related Classes of org.apache.wicket.proxy.util.IInterface

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.