Search in sources :

Example 11 with HandlerDescription

use of org.apache.felix.ipojo.architecture.HandlerDescription in project felix by apache.

the class IgnoreCaseHandlerSelectionTest method testCreationOfIgnoreCase2.

/**
 * Check that the instance is correctly created with "eMptY".
 */
@Test
public void testCreationOfIgnoreCase2() {
    ServiceReference refv1 = ipojoHelper.getServiceReferenceByName(Architecture.class.getName(), "IgnoreCase-2");
    Assert.assertNotNull(refv1);
    Architecture arch = (Architecture) osgiHelper.getRawServiceObject(refv1);
    Assert.assertEquals(ComponentInstance.VALID, arch.getInstanceDescription().getState());
    HandlerDescription desc = arch.getInstanceDescription().getHandlerDescription(// Check with different case.
    "org.apache.felix.ipojo.tests.core.handler:empty");
    Assert.assertNotNull(desc);
    Assert.assertTrue(desc.isValid());
}
Also used : Architecture(org.apache.felix.ipojo.architecture.Architecture) HandlerDescription(org.apache.felix.ipojo.architecture.HandlerDescription) ServiceReference(org.osgi.framework.ServiceReference) Test(org.junit.Test)

Aggregations

HandlerDescription (org.apache.felix.ipojo.architecture.HandlerDescription)11 Test (org.junit.Test)11 Architecture (org.apache.felix.ipojo.architecture.Architecture)8 ServiceReference (org.osgi.framework.ServiceReference)6 Properties (java.util.Properties)4 Factory (org.apache.felix.ipojo.Factory)4 InstanceDescription (org.apache.felix.ipojo.architecture.InstanceDescription)4 ProvidedServiceDescription (org.apache.felix.ipojo.handlers.providedservice.ProvidedServiceDescription)4 ProvidedServiceHandlerDescription (org.apache.felix.ipojo.handlers.providedservice.ProvidedServiceHandlerDescription)4 FooService (org.apache.felix.ipojo.runtime.core.services.FooService)4 ComponentInstance (org.apache.felix.ipojo.ComponentInstance)2 PrimitiveComponentType (org.apache.felix.ipojo.api.PrimitiveComponentType)2 DependencyDescription (org.apache.felix.ipojo.handlers.dependency.DependencyDescription)2 DependencyHandlerDescription (org.apache.felix.ipojo.handlers.dependency.DependencyHandlerDescription)2 BarService (org.apache.felix.ipojo.runtime.core.services.BarService)1 CheckServiceHandlerDescription (org.apache.felix.ipojo.runtime.externalhandlers.services.CheckServiceHandlerDescription)1 Ignore (org.junit.Ignore)1