use of org.apache.felix.dm.itest.util.Ensure in project felix by apache.
the class PublisherAnnotationTest method testAdapterServiceWithPublisher.
/**
* Test an AdapterService which provides its interface using a @ServiceLifecycle.
*/
public void testAdapterServiceWithPublisher() {
Ensure e = new Ensure();
ServiceRegistration sr = register(e, AdapterServiceTestWithPublisher.ENSURE);
e.waitForStep(6, 10000);
sr.unregister();
}
use of org.apache.felix.dm.itest.util.Ensure in project felix by apache.
the class PublisherAnnotationTest method testFactoryAdapterServiceWithPublisher.
/**
* Test a FactoryConfigurationAdapterService which provides its interface using a @ServiceLifecycle.
*/
public void testFactoryAdapterServiceWithPublisher() {
Ensure e = new Ensure();
ServiceRegistration sr = register(e, FactoryConfigurationAdapterServiceTestWithPublisher.ENSURE);
e.waitForStep(5, 10000);
sr.unregister();
}
use of org.apache.felix.dm.itest.util.Ensure in project felix by apache.
the class ResourceAnnotationTest method testResourceAdapterAnnotation.
/**
* Tests a ResourceAdapter
* @param context
*/
public void testResourceAdapterAnnotation() throws Throwable {
Ensure e = new Ensure();
ServiceRegistration sr = register(e, ResourceAnnotation.ENSURE_ADAPTER);
ServiceRegistration sr2 = register(e, ResourceAnnotation.ENSURE_PROVIDER);
sr.unregister();
sr2.unregister();
e.waitForStep(2, 10000);
e.ensure();
}
use of org.apache.felix.dm.itest.util.Ensure in project felix by apache.
the class ResourceAnnotationTest method testResourceAnnotation.
/**
* Tests a simple ResourceConsumer
* @param context
*/
public void testResourceAnnotation() {
Ensure e = new Ensure();
ServiceRegistration sr = register(e, ResourceAnnotation.ENSURE_RESOURCE);
ServiceRegistration sr2 = register(e, ResourceAnnotation.ENSURE_PROVIDER);
sr.unregister();
sr2.unregister();
e.waitForStep(1, 10000);
}
use of org.apache.felix.dm.itest.util.Ensure in project felix by apache.
the class ResourceAnnotationTest method testResourceAnnotationAutoConfig.
/**
* Tests a simple ResourceConsumer using a class field for resource injection
*/
public void testResourceAnnotationAutoConfig() {
Ensure e = new Ensure();
ServiceRegistration sr = register(e, ResourceAnnotation.ENSURE_FIELD);
ServiceRegistration sr2 = register(e, ResourceAnnotation.ENSURE_PROVIDER);
sr.unregister();
sr2.unregister();
e.waitForStep(1, 10000);
}
Aggregations