Package org.switchyard

Examples of org.switchyard.MockDomain


       
        // Load an app config which references a mock component, but provide no activator
        try {
            swConfigStream = Classes.getResourceAsStream("/switchyard-config-activator-01.xml", getClass());
            Deployment deployment = new Deployment(swConfigStream);
            MockDomain serviceDomain = new MockDomain();
            deployment.init(serviceDomain, ActivatorLoader.createActivators(serviceDomain));
            deployment.start();
        } catch (SwitchYardException sye) {
            exception = sye;
            System.err.println(sye.toString());
View Full Code Here


    public void testUnknownInterfaceClassName() throws Exception {
        InputStream swConfigStream = Classes.getResourceAsStream("/switchyard-config-unknown-interface.xml", getClass());
        Deployment deployment = new Deployment(swConfigStream);
        swConfigStream.close();

        MockDomain serviceDomain = new MockDomain();
        deployment.init(serviceDomain, ActivatorLoader.createActivators(serviceDomain));
        try {
            deployment.start();
            Assert.fail("Expected SwitchYardException");
        } catch (SwitchYardException e) {
View Full Code Here

    public void componentServiceMultiplePromotions() throws Exception {
        InputStream swConfigStream = Classes.getResourceAsStream("/switchyard-config-multiple-promotions.xml", getClass());
        Deployment deployment = new Deployment(swConfigStream);
        swConfigStream.close();

        MockDomain serviceDomain = new MockDomain();
        deployment.init(serviceDomain, ActivatorLoader.createActivators(serviceDomain));
        deployment.start();
       
        // verify that two promotions with different names have been registered
        List<Service> test1svcs = deployment.getDomain().getServices(
View Full Code Here

    public void testManagedLocalTxPolicyDependency() throws Exception {
        InputStream swConfigStream = Classes.getResourceAsStream("/switchyard-config-policy-tx-managedLocal.xml", getClass());
        Deployment deployment = new Deployment(swConfigStream);
        swConfigStream.close();
       
        MockDomain serviceDomain = new MockDomain();
        deployment.init(serviceDomain, ActivatorLoader.createActivators(serviceDomain));
        deployment.start();
       
        Service implService = deployment.getDomain().getServices(
                new QName("urn:test:config-mock-binding:1.0", "TestService")).get(0);
View Full Code Here

    private void deployWithoutFail(String name) throws IOException {
        InputStream swConfigStream = Classes.getResourceAsStream(name, getClass());
        Deployment deployment = new Deployment(swConfigStream);
        swConfigStream.close();

        MockDomain serviceDomain = new MockDomain();
        deployment.init(serviceDomain, ActivatorLoader.createActivators(serviceDomain));
        deployment.start();
        deployment.stop();
    }
View Full Code Here

    private ServiceDomain _domain;
    private DummyObserver _observer;
   
    @Before
    public void setUp() throws Exception {
        _domain = new MockDomain();
        _observer = new DummyObserver();
    }
View Full Code Here

TOP

Related Classes of org.switchyard.MockDomain

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.