Package org.apache.tuscany.core.implementation.system.component

Examples of org.apache.tuscany.core.implementation.system.component.SystemReference


    public void testSystemReferenceAutowire() throws Exception {
        CompositeComponent parent = new CompositeComponentImpl("parent", null, null, null);
        parent.start();

        Source refSource = new SourceImpl();
        SystemReference reference = EasyMock.createMock(SystemReference.class);
        EasyMock.expect(reference.getName()).andReturn("service").atLeastOnce();
        EasyMock.expect(reference.getServiceInstance()).andReturn(refSource);
        EasyMock.expect(reference.isSystem()).andReturn(true).atLeastOnce();
        reference.getInterface();
        EasyMock.expectLastCall().andReturn(Source.class);
        EasyMock.replay(reference);
        parent.register(reference);

        Source source = parent.resolveSystemInstance(Source.class);
View Full Code Here

TOP

Related Classes of org.apache.tuscany.core.implementation.system.component.SystemReference

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.