Package org.apache.tuscany.core.context.impl

Examples of org.apache.tuscany.core.context.impl.CompositeContextImpl.start()


        CompositeContext parent = new CompositeContextImpl("test.parent", null, new DefaultScopeStrategy(),
                new EventContextImpl(), new MockConfigContext(builders));
        parent.registerModelObject(MockFactory.createSystemCompositeComponent("test.child"));
        try {
            parent.registerModelObject(MockFactory.createSystemCompositeComponent("test.child"));
            parent.start();
            fail("Expected " + DuplicateNameException.class.getName());
        } catch (DuplicateNameException e) {
            // expected
        }
    }
View Full Code Here


     */
    public void testRegisterSameNameAfterStart() throws Exception {
        CompositeContext parent = new CompositeContextImpl("test.parent", null, new DefaultScopeStrategy(),
                new EventContextImpl(), new MockConfigContext(builders));
        parent.registerModelObject(MockFactory.createSystemCompositeComponent("test.child"));
        parent.start();
        CompositeContext child = (CompositeContext) parent.getContext("test.child");
        Assert.assertNotNull(child);
        try {
            parent.registerModelObject(MockFactory.createSystemCompositeComponent("test.child"));
            fail("Expected " + DuplicateNameException.class.getName());
View Full Code Here

        List<ContextFactoryBuilder> systemBuilders = MockFactory.createSystemBuilders();
        CompositeContext parent = new CompositeContextImpl("test.parent", null, new DefaultScopeStrategy(),
                new EventContextImpl(), new MockConfigContext(systemBuilders));
        Component component = MockFactory.createCompositeComponent("test.child");
        parent.registerModelObject(component);
        parent.start();
        CompositeContext child = (CompositeContext) parent.getContext("test.child");
        Assert.assertNotNull(child);
        return parent;
    }
View Full Code Here

     */
    public void testCompositeScopePropagation() throws Exception {
        EventContext ctx = new EventContextImpl();
        CompositeContext moduleComponentCtx = new CompositeContextImpl();
        moduleComponentCtx.setName("testMC");
        moduleComponentCtx.start();
        CompositeScopeContext scopeContainer = new CompositeScopeContext(ctx);
        scopeContainer.registerFactory(MockFactory.createCompositeConfiguration("CompositeComponent"));
        scopeContainer.start();
        CompositeContext child = (CompositeContext) scopeContainer.getContext("CompositeComponent");
        List<Extensible> models = createAssembly();
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.