Examples of Activator


Examples of org.apache.aries.jndi.startup.Activator

   */
  @Before
  public void setup() throws SecurityException, NoSuchFieldException, IllegalArgumentException, IllegalAccessException
  {
    bc =  Skeleton.newMock(new BundleContextMock(), BundleContext.class);
    activator = new Activator();
    activator.start(bc);
  }
View Full Code Here

Examples of org.apache.aries.jndi.startup.Activator

   */
  @Before
  public void setup() throws SecurityException, NoSuchFieldException, IllegalArgumentException, IllegalAccessException
  {
    bc =  Skeleton.newMock(new BundleContextMock(), BundleContext.class);
    activator = new Activator();
    activator.start(bc);
       
    env = new Hashtable<Object, Object>();
    env.put(JNDIConstants.BUNDLE_CONTEXT, bc);
  }
View Full Code Here

Examples of org.apache.aries.jndi.startup.Activator

   */
  @Before
  public void setup() throws SecurityException, NoSuchFieldException, IllegalArgumentException, IllegalAccessException
  {
    bc =  Skeleton.newMock(new BundleContextMock(), BundleContext.class);
    new Activator().start(bc);
       
    env = new Hashtable();
    env.put(JNDIConstants.BUNDLE_CONTEXT, bc);
  }
View Full Code Here

Examples of org.apache.aries.jndi.startup.Activator

   * Make sure we clear the caches out before the next test.
   */
  @After
  public void teardown()
  {
    new Activator().stop(bc);
    BundleContextMock.clear();
  }
View Full Code Here

Examples of org.apache.aries.jndi.startup.Activator

   */
  @Before
  public void setup() throws SecurityException, NoSuchFieldException, IllegalArgumentException, IllegalAccessException
  {
    bc =  Skeleton.newMock(new BundleContextMock(), BundleContext.class);
    activator = new Activator();
    activator.start(bc);
       
    env = new Hashtable<Object, Object>();
    env.put(JNDIConstants.BUNDLE_CONTEXT, bc);
  }
View Full Code Here

Examples of org.apache.aries.jndi.startup.Activator

   */
  @Before
  public void setup() throws SecurityException, NoSuchFieldException, IllegalArgumentException, IllegalAccessException
  {
    bc =  Skeleton.newMock(new BundleContextMock(), BundleContext.class);
    new Activator().start(bc);
   
    Field f = ContextHelper.class.getDeclaredField("context");
    f.setAccessible(true);
    f.set(null, bc);
    f = OSGiObjectFactoryBuilder.class.getDeclaredField("context");
View Full Code Here

Examples of org.apache.aries.jndi.startup.Activator

   * Make sure we clear the caches out before the next test.
   */
  @After
  public void teardown()
  {
    new Activator().stop(bc);
    BundleContextMock.clear();
  }
View Full Code Here

Examples of org.apache.cxf.dosgi.discovery.local.internal.Activator

                return FrameworkUtil.createFilter((String) EasyMock.getCurrentArguments()[0]);
            }
        }).anyTimes();
        EasyMock.replay(bc);
       
        Activator a = new Activator();
        a.start(bc);
        assertNotNull(a.localDiscovery);
       
        a.localDiscovery = EasyMock.createMock(LocalDiscovery.class);
        a.localDiscovery.shutDown();
        EasyMock.expectLastCall();
        EasyMock.replay(a.localDiscovery);
        a.stop(bc);
       
        EasyMock.verify(a.localDiscovery);
    }
View Full Code Here

Examples of org.apache.cxf.dosgi.dsw.Activator

        dsw.stop();
    }

    // separated for test case
    protected Activator createActivator() {
        return new Activator();
    }
View Full Code Here

Examples of org.apache.cxf.dosgi.dsw.Activator

public class DSWActivatorTest extends TestCase {

    public void testStartStop() throws Exception{

        BundleContext bc = EasyMock.createNiceMock(BundleContext.class);
        final Activator a = EasyMock.createNiceMock(Activator.class);
       
        a.setBundleContext(bc);
        EasyMock.expectLastCall().atLeastOnce();
       
        a.start();
        EasyMock.expectLastCall().once();
               
        EasyMock.replay(bc);
        EasyMock.replay(a);
       
        DSWActivator da = new DSWActivator(){
            protected org.apache.cxf.dosgi.dsw.Activator createActivator() {
                return a;
            };
        };
       
        da.start(bc);
       
        EasyMock.verify(a);
        EasyMock.reset(a);
       
        a.stop();
        EasyMock.expectLastCall().once();

        EasyMock.replay(a);
       
        da.stop(bc);
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.