Package org.apache.aries.mocks

Examples of org.apache.aries.mocks.BundleMock$PrivateDataFileHandler


  }

  @Test
  public void checkProxyDynamism() throws NamingException
  {
    BundleMock mock = new BundleMock("scooby.doo", new Properties());
   
    Thread.currentThread().setContextClassLoader(mock.getClassLoader());

    InitialContext ctx = new InitialContext();
   
    String className = Runnable.class.getName();
   
View Full Code Here


  }
 
  @Test
  public void checkServiceListLookup() throws NamingException
  {
    BundleMock mock = new BundleMock("scooby.doo", new Properties());
   
    Thread.currentThread().setContextClassLoader(mock.getClassLoader());

    InitialContext ctx = new InitialContext();
   
    String className = Runnable.class.getName();
   
View Full Code Here

  }
 
  @Test
  public void checkServiceListList() throws NamingException
  {
    BundleMock mock = new BundleMock("scooby.doo", new Properties());
   
    Thread.currentThread().setContextClassLoader(mock.getClassLoader());

    InitialContext ctx = new InitialContext();
   
    String className = Runnable.class.getName();
   
View Full Code Here

  }

  @Test
  public void checkServiceListListBindings() throws NamingException
  {
    BundleMock mock = new BundleMock("scooby.doo", new Properties());
   
    Thread.currentThread().setContextClassLoader(mock.getClassLoader());

    InitialContext ctx = new InitialContext();
   
    String className = Runnable.class.getName();
   
View Full Code Here

  }

  @Test(expected=ServiceException.class)
  public void checkProxyWhenServiceGoes() throws ServiceException, NamingException
  {
    BundleMock mock = new BundleMock("scooby.doo", new Properties());
   
    Thread.currentThread().setContextClassLoader(mock.getClassLoader());

    InitialContext ctx = new InitialContext();
   
    Runnable r = (Runnable) ctx.lookup("osgi:service/java.lang.Runnable");
   
View Full Code Here

  }
 
  @Test
  public void checkServiceOrderObserved() throws NamingException
  {
    BundleMock mock = new BundleMock("scooby.doo", new Properties());
   
    Thread.currentThread().setContextClassLoader(mock.getClassLoader());

    InitialContext ctx = new InitialContext();
   
    String className = Runnable.class.getName();
   
View Full Code Here

   
   
    @Test
    public void testMultipleElements() throws Exception
    {
      Bundle b = Skeleton.newMock(new BundleMock("org.apache.aries.tx", new Properties()), Bundle.class);
      BundleContext ctx = b.getBundleContext();
      NamespaceHandlerRegistry nhri = new NamespaceHandlerRegistryImpl(ctx);
     
      TransactionManager tm = Skeleton.newMock(TransactionManager.class);
     
View Full Code Here

  private NamespaceHandlerRegistry nhri;
  private TxComponentMetaDataHelperImpl txenhancer;
 
    @Before
    public void setUp() {
        b = Skeleton.newMock(new BundleMock("org.apache.aries.tx", new Properties()), Bundle.class);
        BundleContext ctx = b.getBundleContext();
        nhri = new NamespaceHandlerRegistryImpl(ctx);
       
        TransactionManager tm = Skeleton.newMock(TransactionManager.class);
       
View Full Code Here

    private Bundle framework;
   
    @Before
    public void setup() throws Exception
    {
        framework = Skeleton.newMock(new BundleMock("framework", new Hashtable<Object, Object>()), Bundle.class);

        BundleContext ctx = Skeleton.newMock(BundleContext.class);
        Skeleton.getSkeleton(ctx).setReturnValue(new MethodCall(BundleContext.class, "getBundle", long.class), framework);
       
        client = Skeleton.newMock(Bundle.class);
View Full Code Here

  {
    client1 = Skeleton.newMock(Bundle.class);
    client2 = Skeleton.newMock(Bundle.class);
    emf1 = Skeleton.newMock(EntityManagerFactory.class);
    emf2 = Skeleton.newMock(EntityManagerFactory.class);
    context = Skeleton.newMock(new BundleMock("system.bundle", new Hashtable<Object, Object>()), Bundle.class).getBundleContext();
    mgr = new PersistenceContextManager(context, new JTAPersistenceContextRegistry(context));
    mgr.open();
  }
View Full Code Here

TOP

Related Classes of org.apache.aries.mocks.BundleMock$PrivateDataFileHandler

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.