Examples of BundleContextMock


Examples of mock.org.osgi.framework.BundleContextMock

        // Prepare the mock of OSGI environment
        ComponentContextMock componentCtx
                = new ComponentContextMock("componentCtx", expectations);

        BundleContextMock bundleCtx = new BundleContextMock("bundleCtx", expectations);
        componentCtx.expects.getBundleContext()
                    .returns(bundleCtx).any();
        bundleCtx.expects.getProperty(BootConstants.CONTEXT_AREA)
                 .returns(contextArea).any();
View Full Code Here

Examples of mock.org.osgi.framework.BundleContextMock

        // =====================================================================
        //   Create Mocks
        // =====================================================================

        final BundleContextMock bundleContextMock =
                new BundleContextMock("bundleContextMock", expectations);

        // =====================================================================
        //   Set Expectations
        // =====================================================================
View Full Code Here

Examples of mock.org.osgi.framework.BundleContextMock

        // =====================================================================
        //   Create Mocks
        // =====================================================================

        final BundleContextMock bundleContextMock =
                new BundleContextMock("bundleContextMock", expectations);

        // =====================================================================
        //   Set Expectations
        // =====================================================================
View Full Code Here

Examples of mock.org.osgi.framework.BundleContextMock

                new DelayedReferenceContainer();
        referenceContainer.setReference(adminServiceReferenceMock);

        // Create a bundle context that can be used across thread. This can
        // also be used to add expectations for the current thread.
        contextMock = new BundleContextMock("contextMock",
                perThreadExpectations);

        listenerReferenceMock =
                new ServiceReferenceMock("listenerReferenceMock",
                        dispatcherExpectations);
View Full Code Here

Examples of mock.org.osgi.framework.BundleContextMock

        // =====================================================================
        //   Create Mocks
        // =====================================================================

        contextMock = new BundleContextMock("contextMock", expectations);
        managerMock = new ConfigurationManagerMock("managerMock",
                expectations);
        pluginManagerMock = new PluginManagerMock(
                "pluginManagerMock", expectations);
View Full Code Here

Examples of mock.org.osgi.framework.BundleContextMock

        storeMock = new ConfigurationStoreMock("storeMock",
                expectations);

        storeMock.expects.load().returns(null).any();

        contextMock = new BundleContextMock("contextMock", expectations);

        pluginManagerMock = new PluginManagerMock(
                "pluginManagerMock", expectations);

        logServiceMock = new LogServiceMock("logServiceMock", expectations);
View Full Code Here

Examples of mock.org.osgi.framework.BundleContextMock

    /**
     * Tests that all the mock objects can be initialised correctly.
     */
    public void testInitialisation() {
        new BundleMock("bundleMock", expectations);
        new BundleContextMock("bundleContextMock", expectations);
        new ServiceReferenceMock("serviceReferenceMock", expectations);
        new ServiceRegistrationMock("serviceRegistrationMock", expectations);
        new FilterMock("filterMock", expectations);
    }
View Full Code Here

Examples of mock.org.osgi.framework.BundleContextMock

     *
     * @return the ManagedServiceFactory to test.
     */
    public ManagedServiceFactory createManagedServiceFactory() throws NoSuchMethodException {

        final BundleContextMock contextMock =
            new BundleContextMock("contextMock", expectations);
        final MockFactory mockFactory = MockFactory.getDefaultInstance();
        final Method registerServiceMethod = BundleContext.class.getMethod(
            "registerService",
            new Class[]{String.class, Object.class, Dictionary.class});
        final MethodIdentifier identifier =
View Full Code Here

Examples of org.apache.aries.mocks.BundleContextMock

public class LoggerTest {
    private BundleContext ctx;

    @Before
    public void setup() {
        ctx = Skeleton.newMock(new BundleContextMock(), BundleContext.class);
    }
View Full Code Here

Examples of org.apache.aries.mocks.BundleContextMock

  private SingleServiceTracker<String> sut;
  private SingleServiceTracker.SingleServiceListener listener;
 
  @Before
  public void setup() {
    ctx = Skeleton.newMock(new BundleContextMock(), BundleContext.class);
  }
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.