Examples of ScopeTestService


Examples of org.springframework.osgi.iandt.scope.common.ScopeTestService

    assertNotNull(getServiceA());
    assertNotNull(getServiceB());
  }

  public void testServiceAScopeForCurrentBundle() throws Exception {
    ScopeTestService serviceAcopy1 = getServiceA();
    ScopeTestService serviceAcopy2 = getServiceA();

    assertEquals("different bean instances given for the same bundle", serviceAcopy1, serviceAcopy2);
  }
View Full Code Here

Examples of org.springframework.osgi.iandt.scope.common.ScopeTestService

    assertEquals("different bean instances given for the same bundle", serviceAcopy1, serviceAcopy2);
  }

  public void testServiceAScopeForBundleA() throws Exception {
    ScopeTestService serviceAInBundleA = (ScopeTestService) org.springframework.osgi.iandt.scope.a.BeanReference.BEAN;

    System.out.println(serviceAInBundleA.getServiceIdentity());
    System.out.println(getServiceA().getServiceIdentity());

    assertFalse("same bean instance used for different bundles", serviceAInBundleA.getServiceIdentity().equals(
      getServiceA().getServiceIdentity()));
  }
View Full Code Here

Examples of org.springframework.osgi.iandt.scope.common.ScopeTestService

      getServiceA().getServiceIdentity()));
  }

  public void testServiceAScopeForBundleB() throws Exception {
    String symName = "org.springframework.osgi.iandt.scope.b";
    ScopeTestService serviceAInBundleB = (ScopeTestService) getAppCtx(symName).getBean("serviceFromA");

    assertFalse("same bean instance used for different bundles", serviceAInBundleB.getServiceIdentity().equals(
      getServiceA().getServiceIdentity()));
  }
View Full Code Here

Examples of org.springframework.osgi.iandt.scope.common.ScopeTestService

    assertFalse("same bean instance used for different bundles", serviceAInBundleB.getServiceIdentity().equals(
      getServiceA().getServiceIdentity()));
  }

  public void testServiceBInBundleBAndTestBundle() throws Exception {
    ScopeTestService serviceAInBundleB = (ScopeTestService) org.springframework.osgi.iandt.scope.b.BeanReference.BEAN;

    assertFalse("same bean instance used for different bundles", serviceAInBundleB.getServiceIdentity().equals(
      getServiceB().getServiceIdentity()));
  }
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.