Search in sources :

Example 21 with ComponentDefinitionRegistry

use of org.apache.aries.blueprint.ComponentDefinitionRegistry in project aries by apache.

the class AnnotationEnablingNameSpaceHandlerTest method testAnnotationEnabled.

@Test
public void testAnnotationEnabled() throws Exception {
    ComponentDefinitionRegistry cdr = parseCDR("enable-annotations.xml");
    checkCompTop(cdr);
    BeanMetadata pmd = (BeanMetadata) cdr.getComponentDefinition(TxNamespaceHandler.ANNOTATION_PARSER_BEAN_NAME);
    assertNotNull(pmd);
    assertEquals(3, pmd.getArguments().size());
    assertEquals(cdr, ((PassThroughMetadata) pmd.getArguments().get(0).getValue()).getObject());
//      assertEquals(tm, ((PassThroughMetadata) pmd.getArguments().get(2).getValue()).getObject());
}
Also used : ComponentDefinitionRegistry(org.apache.aries.blueprint.ComponentDefinitionRegistry) BeanMetadata(org.osgi.service.blueprint.reflect.BeanMetadata) Test(org.junit.Test)

Aggregations

ComponentDefinitionRegistry (org.apache.aries.blueprint.ComponentDefinitionRegistry)21 Test (org.junit.Test)5 ComponentMetadata (org.osgi.service.blueprint.reflect.ComponentMetadata)5 URL (java.net.URL)4 PassThroughMetadata (org.apache.aries.blueprint.PassThroughMetadata)3 MutableBeanMetadata (org.apache.aries.blueprint.mutable.MutableBeanMetadata)3 MutablePassThroughMetadata (org.apache.aries.blueprint.mutable.MutablePassThroughMetadata)3 MutableReferenceMetadata (org.apache.aries.blueprint.mutable.MutableReferenceMetadata)3 ParserService (org.apache.aries.blueprint.services.ParserService)3 Bundle (org.osgi.framework.Bundle)3 ComponentDefinitionException (org.osgi.service.blueprint.container.ComponentDefinitionException)3 URI (java.net.URI)2 ComponentDefinitionRegistryImpl (org.apache.aries.blueprint.parser.ComponentDefinitionRegistryImpl)2 NamespaceHandlerSet (org.apache.aries.blueprint.parser.NamespaceHandlerSet)2 BeanMetadata (org.osgi.service.blueprint.reflect.BeanMetadata)2 TransactionManager (javax.transaction.TransactionManager)1 ExportedService (org.apache.aries.application.modelling.ExportedService)1 ImportedService (org.apache.aries.application.modelling.ImportedService)1 ParsedServiceElements (org.apache.aries.application.modelling.ParsedServiceElements)1 Interceptor (org.apache.aries.blueprint.Interceptor)1