Package org.springframework.osgi.mock

Examples of org.springframework.osgi.mock.MockBundle


  private BundleContext bundleContext;
  private Bundle bundle;


  protected void setUp() throws Exception {
    bundle = new MockBundle() {

      public Enumeration findEntries(String path, String filePattern, boolean recurse) {
        return new ArrayEnumerator(new URL[] { getClass().getResource(
          "/org/springframework/osgi/extender/internal/support/extender-custom-config.xml") });
      }
View Full Code Here


    assertNotNull(array);
    assertEquals(0, array.length);
  }

  public void testIsAssignableTo() {
    assertFalse(reference.isAssignableTo(new MockBundle(), "Object"));
  }
View Full Code Here

    reference.swapDelegates(serviceReference);
    assertTrue(Arrays.equals(serviceReference.getUsingBundles(), reference.getUsingBundles()));
  }

  public void testIsAssignableToWithNotNullDelegate() {
    MockBundle bundle = new MockBundle();
    String className = "Object";
    reference.swapDelegates(serviceReference);
    assertEquals(serviceReference.isAssignableTo(bundle, className), reference.isAssignableTo(bundle, className));
  }
View Full Code Here

TOP

Related Classes of org.springframework.osgi.mock.MockBundle

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.