Package org.jacorb.notification.container

Examples of org.jacorb.notification.container.LocalParameterComponentAdapter


   
    public void testCreateWithoutDeps() throws Exception
    {
        ConstructorInjectionComponentAdapter ca = new ConstructorInjectionComponentAdapter(Service.class, DefaultService.class);
       
        picoContainer_.registerComponent(new LocalParameterComponentAdapter(ca, new ComponentAdapter[0]));
       
        assertNotNull(picoContainer_.getComponentInstanceOfType(Service.class));
    }
View Full Code Here


   
    public void testCreateFailsWhenDepsNotResolvable() throws Exception
    {
        ConstructorInjectionComponentAdapter ca = new ConstructorInjectionComponentAdapter(Service.class, DecoratedService.class);
       
        picoContainer_.registerComponent(new LocalParameterComponentAdapter(ca, new ComponentAdapter[0]));
       
        try
        {
            picoContainer_.getComponentInstanceOfType(Service.class);
            fail();
View Full Code Here

    public void testCreateWithDeps() throws Exception
    {
        ConstructorInjectionComponentAdapter ca = new ConstructorInjectionComponentAdapter(Service.class, DecoratedService.class);
        ComponentAdapter[] localCAs = new ComponentAdapter[] {new ConstructorInjectionComponentAdapter(DefaultService.class, DefaultService.class)};
       
        picoContainer_.registerComponent(new LocalParameterComponentAdapter(ca, localCAs));
       
        assertNotNull(picoContainer_.getComponentInstanceOfType(Service.class));
    }
View Full Code Here

    public void testLocalCAsAreNotAccessible() throws Exception
    {
        ConstructorInjectionComponentAdapter ca = new ConstructorInjectionComponentAdapter(Service.class, DecoratedService.class);
        ComponentAdapter[] localCAs = new ComponentAdapter[] {new ConstructorInjectionComponentAdapter(DefaultService.class, DefaultService.class)};
       
        picoContainer_.registerComponent(new LocalParameterComponentAdapter(ca, localCAs));
       
        assertNull(picoContainer_.getComponentInstanceOfType(DefaultService.class));
        assertNull(picoContainer_.getComponentAdapterOfType(DefaultService.class));
    }
View Full Code Here

    public void testInContainer() throws Exception
    {
        ConstructorInjectionComponentAdapter ca = new ConstructorInjectionComponentAdapter(Service.class, DecoratedService.class);
        ComponentAdapter[] localCAs = new ComponentAdapter[] {new ConstructorInjectionComponentAdapter(DefaultService.class, DefaultService.class)};
       
        picoContainer_.registerComponent(new LocalParameterComponentAdapter(ca, localCAs));
        picoContainer_.registerComponentImplementation(DependsOnService.class);
       
        assertNotNull(picoContainer_.getComponentInstance(DependsOnService.class));
    }
View Full Code Here

    @Test
    public void testCreateWithoutDeps() throws Exception
    {
        ConstructorInjectionComponentAdapter ca = new ConstructorInjectionComponentAdapter(Service.class, DefaultService.class);
       
        picoContainer_.registerComponent(new LocalParameterComponentAdapter(ca, new ComponentAdapter[0]));
       
        assertNotNull(picoContainer_.getComponentInstanceOfType(Service.class));
    }
View Full Code Here

    @Test
    public void testCreateFailsWhenDepsNotResolvable() throws Exception
    {
        ConstructorInjectionComponentAdapter ca = new ConstructorInjectionComponentAdapter(Service.class, DecoratedService.class);
       
        picoContainer_.registerComponent(new LocalParameterComponentAdapter(ca, new ComponentAdapter[0]));
       
        try
        {
            picoContainer_.getComponentInstanceOfType(Service.class);
            fail();
View Full Code Here

    public void testCreateWithDeps() throws Exception
    {
        ConstructorInjectionComponentAdapter ca = new ConstructorInjectionComponentAdapter(Service.class, DecoratedService.class);
        ComponentAdapter[] localCAs = new ComponentAdapter[] {new ConstructorInjectionComponentAdapter(DefaultService.class, DefaultService.class)};
       
        picoContainer_.registerComponent(new LocalParameterComponentAdapter(ca, localCAs));
       
        assertNotNull(picoContainer_.getComponentInstanceOfType(Service.class));
    }
View Full Code Here

    public void testLocalCAsAreNotAccessible() throws Exception
    {
        ConstructorInjectionComponentAdapter ca = new ConstructorInjectionComponentAdapter(Service.class, DecoratedService.class);
        ComponentAdapter[] localCAs = new ComponentAdapter[] {new ConstructorInjectionComponentAdapter(DefaultService.class, DefaultService.class)};
       
        picoContainer_.registerComponent(new LocalParameterComponentAdapter(ca, localCAs));
       
        assertNull(picoContainer_.getComponentInstanceOfType(DefaultService.class));
        assertNull(picoContainer_.getComponentAdapterOfType(DefaultService.class));
    }
View Full Code Here

    public void testInContainer() throws Exception
    {
        ConstructorInjectionComponentAdapter ca = new ConstructorInjectionComponentAdapter(Service.class, DecoratedService.class);
        ComponentAdapter[] localCAs = new ComponentAdapter[] {new ConstructorInjectionComponentAdapter(DefaultService.class, DefaultService.class)};
       
        picoContainer_.registerComponent(new LocalParameterComponentAdapter(ca, localCAs));
        picoContainer_.registerComponentImplementation(DependsOnService.class);
       
        assertNotNull(picoContainer_.getComponentInstance(DependsOnService.class));
    }
View Full Code Here

TOP

Related Classes of org.jacorb.notification.container.LocalParameterComponentAdapter

Copyright © 2018 www.massapicom. 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.