Search in sources :

Example 1 with Activator

use of org.apache.aries.jndi.startup.Activator in project aries by apache.

the class InitialContextTest method setup.

/**
   * This method does the setup .
   * @throws NoSuchFieldException 
   * @throws SecurityException 
   * @throws IllegalAccessException 
   * @throws IllegalArgumentException 
   */
@Before
public void setup() throws SecurityException, NoSuchFieldException, IllegalArgumentException, IllegalAccessException {
    bc = Skeleton.newMock(new BundleContextMock(), BundleContext.class);
    activator = new Activator();
    activator.start(bc);
}
Also used : BundleContextMock(org.apache.aries.mocks.BundleContextMock) Activator(org.apache.aries.jndi.startup.Activator) BundleContext(org.osgi.framework.BundleContext) Before(org.junit.Before)

Example 2 with Activator

use of org.apache.aries.jndi.startup.Activator in project aries by apache.

the class ObjectFactoryTest method setup.

/**
   * This method does the setup .
   * @throws NoSuchFieldException 
   * @throws SecurityException 
   * @throws IllegalAccessException 
   * @throws IllegalArgumentException 
   */
@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);
}
Also used : BundleContextMock(org.apache.aries.mocks.BundleContextMock) Activator(org.apache.aries.jndi.startup.Activator) BundleContext(org.osgi.framework.BundleContext) Before(org.junit.Before)

Aggregations

Activator (org.apache.aries.jndi.startup.Activator)2 BundleContextMock (org.apache.aries.mocks.BundleContextMock)2 Before (org.junit.Before)2 BundleContext (org.osgi.framework.BundleContext)2