Package org.apache.felix.dm.test.components

Examples of org.apache.felix.dm.test.components.Ensure.waitForStep()


     */
    @Test
    public void TestResourceAdapterServiceWithPublisher() {
        Ensure e = new Ensure();
        ServiceRegistration sr = register(e, ResourceAdapterServiceTestWithPublisher.ENSURE);
        e.waitForStep(5, 10000);
        sr.unregister();
    }

    /**
     * Test a FactoryConfigurationAdapterService which provides its interface using a @ServiceLifecycle.
View Full Code Here


     */
    @Test
    public void testFactoryAdapterServiceWithPublisher() {
        Ensure e = new Ensure();
        ServiceRegistration sr = register(e, FactoryConfigurationAdapterServiceTestWithPublisher.ENSURE);
        e.waitForStep(5, 10000);
        sr.unregister();
    }
}
View Full Code Here

    @Test
    public void testSimpleAnnotations() throws Throwable {
        Ensure e = new Ensure();
        ServiceRegistration er = register(e, Producer.ENSURE);
        e.waitForStep(3, 10000); // Producer registered
        ServiceRegistration er2 = register(e, Consumer.ENSURE);

        er2.unregister(); // stop consumer
        er.unregister(); // stop provider
View Full Code Here

        er2.unregister(); // stop consumer
        er.unregister(); // stop provider

        // And check if components have been deactivated orderly.
        e.waitForStep(10, 10000);
        e.ensure();
        stopTestBundle();
    }
}
View Full Code Here

    public void testResourceAnnotation() {
        Ensure e = new Ensure();
        ServiceRegistration sr = register(e, ResourceAnnotation.ENSURE_RESOURCE);
        ServiceRegistration sr2 = register(e, ResourceAnnotation.ENSURE_PROVIDER);
        stopTestBundle();
        e.waitForStep(1, 10000);
        sr.unregister();
        sr2.unregister();
    }

    /**
 
View Full Code Here

    public void testResourceAnnotationAutoConfig() {
        Ensure e = new Ensure();
        ServiceRegistration sr = register(e, ResourceAnnotation.ENSURE_FIELD);
        ServiceRegistration sr2 = register(e, ResourceAnnotation.ENSURE_PROVIDER);
        stopTestBundle();
        e.waitForStep(1, 10000);
        sr.unregister();
        sr2.unregister();
    }

    /**
 
View Full Code Here

    public void testResourceAdapterAnnotation() throws Throwable {
        Ensure e = new Ensure();
        ServiceRegistration sr = register(e, ResourceAnnotation.ENSURE_ADAPTER);
        ServiceRegistration sr2 = register(e, ResourceAnnotation.ENSURE_PROVIDER);
        stopTestBundle();
        e.waitForStep(2, 10000);
        e.ensure();
        sr.unregister();
        sr2.unregister();
    }
}
View Full Code Here

    @Test
    public void testMultipleAnnotations() {
        Ensure e = new Ensure();
        ServiceRegistration sr = register(e, MultipleAnnotations.ENSURE);
        e.waitForStep(7, 10000);
        stopTestBundle();
        // And check if the test.annotation bundle has been deactivated orderly
        e.waitForStep(11, 10000);
        sr.unregister();
    }
View Full Code Here

        Ensure e = new Ensure();
        ServiceRegistration sr = register(e, MultipleAnnotations.ENSURE);
        e.waitForStep(7, 10000);
        stopTestBundle();
        // And check if the test.annotation bundle has been deactivated orderly
        e.waitForStep(11, 10000);
        sr.unregister();
    }
}
View Full Code Here

     */
    @Test
    public void testBundleDependencyAnnotation() {
        Ensure e = new Ensure();
        ServiceRegistration sr = register(e, BundleDependencyAnnotation.ENSURE_CONSUMER);
        e.waitForStep(1, 10000);
        stopTestBundle();
        e.waitForStep(2, 10000);
        sr.unregister();
    }

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.