Examples of SwappingServiceReferenceProxy


Examples of org.springframework.osgi.service.importer.support.internal.aop.SwappingServiceReferenceProxy


  protected void setUp() throws Exception {
    Properties props = new Properties();
    props.setProperty("composer", "Rachmaninoff");
    reference = new SwappingServiceReferenceProxy();
    serviceReference = new MockServiceReference();
  }
View Full Code Here

Examples of org.springframework.osgi.service.importer.support.internal.aop.SwappingServiceReferenceProxy

    assertNull(reference.swapDelegates(serviceReference));
    assertSame(serviceReference, reference.getTargetServiceReference());
  }

  public void testEqualsObject() {
    SwappingServiceReferenceProxy anotherRef = new SwappingServiceReferenceProxy();
    assertEquals(anotherRef, reference);
    assertEquals(reference, anotherRef);
    anotherRef.swapDelegates(serviceReference);
    assertFalse(anotherRef.equals(reference));
    assertFalse(reference.equals(anotherRef));
    assertEquals(reference, reference);
  }
View Full Code Here

Examples of org.springframework.osgi.service.importer.support.internal.aop.SwappingServiceReferenceProxy

    assertEquals(serviceReference.isAssignableTo(bundle, className), reference.isAssignableTo(bundle, className));
  }

  public void testEqualsObjectWithNotNullDelegate() {
    reference.swapDelegates(serviceReference);
    SwappingServiceReferenceProxy anotherRef = new SwappingServiceReferenceProxy();
    assertFalse(anotherRef.equals(reference));
    assertFalse(reference.equals(anotherRef));
    assertEquals(reference, reference);
    anotherRef.swapDelegates(serviceReference);
    assertEquals(anotherRef, reference);
    assertEquals(reference, anotherRef);
    assertEquals(reference, reference);
  }
View Full Code Here

Examples of org.springframework.osgi.service.importer.support.internal.aop.SwappingServiceReferenceProxy

  public void testCompareToItself() throws Exception {
    assertEquals(0, reference.compareTo(reference));
  }

  public void testDefaultCompareTo() throws Exception {
    assertEquals(0, reference.compareTo(new SwappingServiceReferenceProxy()));
  }
View Full Code Here

Examples of org.springframework.osgi.service.importer.support.internal.aop.SwappingServiceReferenceProxy

  public void testDefaultCompareTo() throws Exception {
    assertEquals(0, reference.compareTo(new SwappingServiceReferenceProxy()));
  }

  public void testCompareToDifferentService() throws Exception {
    SwappingServiceReferenceProxy proxy = new SwappingServiceReferenceProxy();
    proxy.swapDelegates(new MockServiceReference());
    try {
      reference.compareTo(proxy);
      fail("expected CCE");
    }
    catch (Exception ex) {
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.