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

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


        Target target = new TargetImpl();
        SystemOutboundWire outboundWire = EasyMock.createMock(SystemOutboundWire.class);
        EasyMock.expect(outboundWire.getTargetService()).andReturn(target);
        EasyMock.replay(outboundWire);
        SystemInboundWire wire = new SystemInboundWireImpl("Target", Target.class);
        SystemService serviceContext = new SystemServiceImpl("service", null);
        serviceContext.setInboundWire(wire);
        serviceContext.setOutboundWire(outboundWire);
        wire.setTargetWire(outboundWire);
        assertSame(target, serviceContext.getServiceInstance());
        EasyMock.verify(outboundWire);
    }
View Full Code Here


        String name = boundServiceDefinition.getName();
        InboundWire inboundWire =
            new SystemInboundWireImpl(name, interfaze, target);
        SystemOutboundWire outboundWire =
            new SystemOutboundWireImpl(name, targetName, interfaze);
        SystemService service = new SystemServiceImpl(boundServiceDefinition.getName(), parent);
        service.setInboundWire(inboundWire);
        service.setOutboundWire(outboundWire);
        return service;
    }
View Full Code Here

        List<Class<?>> interfaces = new ArrayList<Class<?>>();
        interfaces.add(Source.class);
        interfaces.add(Source2.class);

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


        SystemAtomicComponent component2 = EasyMock.createMock(SystemAtomicComponent.class);
View Full Code Here

TOP

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

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.