Examples of AspectablePicoContainerFactory


Examples of org.nanocontainer.aop.AspectablePicoContainerFactory

    }

    public void testCreateWithParentContainer() {
        MutablePicoContainer parent = new DefaultPicoContainer();
        parent.registerComponentInstance("key", "value");
        AspectablePicoContainerFactory containerFactory = new DynaopAspectablePicoContainerFactory();
        PicoContainer child = containerFactory.createContainer(parent);
        assertEquals("value", child.getComponentInstance("key"));
    }
View Full Code Here

Examples of org.nanocontainer.aop.AspectablePicoContainerFactory

        PicoContainer child = containerFactory.createContainer(parent);
        assertEquals("value", child.getComponentInstance("key"));
    }
   
    public void testMakeChildContainer(){
        AspectablePicoContainerFactory aspectableContainerFactory = new DynaopAspectablePicoContainerFactory();
        AspectablePicoContainer parent = aspectableContainerFactory.createContainer();
        parent.registerComponentImplementation("t1", SimpleTouchable.class);
        AspectablePicoContainer child = aspectableContainerFactory.makeChildContainer(parent);
        Object t1 = child.getParent().getComponentInstance("t1");       
        assertNotNull(t1);
        assertTrue(t1 instanceof SimpleTouchable);       
    }
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.