Examples of IOther


Examples of org.springframework.beans.IOther

    // Just test anything: it will fail if context wasn't found
    assertEquals(0, proxy.getAge());
  }
 
  public void testEquals() {
    IOther a = new AllInstancesAreEqual();
    IOther b = new AllInstancesAreEqual();
    NopInterceptor i1 = new NopInterceptor();
    NopInterceptor i2 = new NopInterceptor();
    ProxyFactory pfa = new ProxyFactory(a);
    pfa.addAdvice(i1);
    ProxyFactory pfb = new ProxyFactory(b);
    pfb.addAdvice(i2);
    IOther proxyA = (IOther) createProxy(pfa);
    IOther proxyB = (IOther) createProxy(pfb);

    assertEquals(pfa.getAdvisors().length, pfb.getAdvisors().length);
    assertTrue(a.equals(b));
    assertTrue(i1.equals(i2));
    assertTrue(proxyA.equals(proxyB));
    assertEquals(proxyA.hashCode(), proxyB.hashCode());
    assertFalse(proxyA.equals(a));

    // Equality checks were handled by the proxy
    assertEquals(0, i1.getCount());
View Full Code Here

Examples of org.springframework.tests.sample.beans.IOther

    assertEquals(0, proxy.getAge());
  }

  @Test
  public void testEquals() {
    IOther a = new AllInstancesAreEqual();
    IOther b = new AllInstancesAreEqual();
    NopInterceptor i1 = new NopInterceptor();
    NopInterceptor i2 = new NopInterceptor();
    ProxyFactory pfa = new ProxyFactory(a);
    pfa.addAdvice(i1);
    ProxyFactory pfb = new ProxyFactory(b);
    pfb.addAdvice(i2);
    IOther proxyA = (IOther) createProxy(pfa);
    IOther proxyB = (IOther) createProxy(pfb);

    assertEquals(pfa.getAdvisors().length, pfb.getAdvisors().length);
    assertTrue(a.equals(b));
    assertTrue(i1.equals(i2));
    assertTrue(proxyA.equals(proxyB));
    assertEquals(proxyA.hashCode(), proxyB.hashCode());
    assertFalse(proxyA.equals(a));

    // Equality checks were handled by the proxy
    assertEquals(0, i1.getCount());
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.