Package org.apache.tuscany.spi.component

Examples of org.apache.tuscany.spi.component.CompositeComponent.prepare()


        EasyMock.expect(inbound.getContainer()).andReturn(target);
        EasyMock.replay(inbound);

        parent.register(target);
        parent.prepare();
        EasyMock.verify(source);
        EasyMock.verify(target);
        EasyMock.verify(inbound);
        EasyMock.verify(outbound);
    }
View Full Code Here


        EasyMock.expect(target.isSystem()).andReturn(false).atLeastOnce();
        EasyMock.replay(target);

        parent.register(target);
        try {
            parent.prepare();
            fail();
        } catch (BuilderConfigException e) {
            //expected
        }
        EasyMock.verify(source);
View Full Code Here

        AtomicComponent sourceComponent = builder.build(parent, sourceComponentDefinition, deploymentContext);
        AtomicComponent targetComponent = builder.build(parent, targetComponentDefinition, deploymentContext);

        parent.register(sourceComponent);
        parent.register(targetComponent);
        parent.prepare();
        parent.start();
        scope.onEvent(new CompositeStart(this, parent));
        Source source = (Source) parent.getSystemChild("source").getServiceInstance();
        assertNotNull(source);
        Target target = (Target) parent.getSystemChild("target").getServiceInstance();
View Full Code Here

        composite.onEvent(event);
    }

    public void testPrepare() {
        CompositeComponent composite = new CompositeComponentImpl("parent", null, null, null);
        composite.prepare();
    }

    private Reference getReference(String name) {
        Reference reference = EasyMock.createNiceMock(Reference.class);
        EasyMock.expect(reference.isSystem()).andReturn(false).atLeastOnce();
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.