Package org.switchyard.config.model.composite.v1

Examples of org.switchyard.config.model.composite.v1.V1CompositeReferenceModel


        _provider = new MockHandler();
    }
   
    @Test
    public void localInvocationSameName() throws Exception {
        V1SCABindingModel config = new V1SCABindingModel(SwitchYardNamespace.DEFAULT.uri()) {
            @Override
            public String getName() {
                return "testBinding";
            }
            public CompositeReferenceModel getReference() {
View Full Code Here


        Assert.assertEquals(msg.getContent(), _provider.getMessages().poll().getMessage().getContent());
    }
   
    @Test
    public void localInvocationTarget() throws Exception {
        V1SCABindingModel config = new V1SCABindingModel(SwitchYardNamespace.DEFAULT.uri()) {
            @Override
            public String getName() {
                return "testBinding";
            }
            public CompositeReferenceModel getReference() {
                return new V1CompositeReferenceModel();
            };
        };
        config.setTarget("ServiceB");
        SCAInvoker invoker = new SCAInvoker(config);
        invoker.start();

        // Serivce A is for app 1, Service B is for app 2
        final QName SERVICE_A = new QName("urn:test", "ServiceA");
View Full Code Here

        Assert.assertEquals(msg.getContent(), _provider.getMessages().poll().getMessage().getContent());
    }
   
    @Test
    public void crossDomain() throws Exception {
        V1SCABindingModel config = new V1SCABindingModel(SwitchYardNamespace.DEFAULT.uri()) {
            @Override
            public String getName() {
                return "testBinding";
            }
            public CompositeReferenceModel getReference() {
                return new V1CompositeReferenceModel();
            };
        };
        config.setTargetNamespace("urn:testb");
        SCAInvoker invoker = new SCAInvoker(config);
        invoker.start();

        // service names with different namespace
        final QName SERVICE_A = new QName("urn:testa", "Service");
View Full Code Here

   
    @Test
    public void localInvocationWithInvalidServiceReference() throws Exception {
        boolean fail = false;
       
        V1SCABindingModel config = new V1SCABindingModel(SwitchYardNamespace.DEFAULT.uri()) {
            @Override
            public String getName() {
                return "testBinding";
            }
            public CompositeReferenceModel getReference() {
                return new V1CompositeReferenceModel();
            };
        };
        config.setTarget("Blah");
        SCAInvoker invoker = new SCAInvoker(config);
        invoker.start();

        // Create one valid but unregistered reference
        final QName SERVICE_A = new QName("urn:test", "ServiceA");
View Full Code Here

        Assert.assertTrue(fail);
    }
   
    @Test
    public void localInvocationTargetNamespace() throws Exception {
        V1SCABindingModel config = new V1SCABindingModel(SwitchYardNamespace.DEFAULT.uri()) {
            @Override
            public String getName() {
                return "testBinding";
            }
            public CompositeReferenceModel getReference() {
                return new V1CompositeReferenceModel();
            };
        };
        config.setTargetNamespace("urn:app2");
        SCAInvoker invoker = new SCAInvoker(config);
        invoker.start();

        // urn:app1 is for app 1, urn:app2 is for app 2
        final QName SERVICE_A = new QName("urn:app1", "ServiceA");
View Full Code Here

        Assert.assertEquals(msg.getContent(), _provider.getMessages().poll().getMessage().getContent());
    }
   
    @Test
    public void createOOTBLoadBalancers() throws Exception {
        V1SCABindingModel config = new V1SCABindingModel(SwitchYardNamespace.DEFAULT.uri()) {
            @Override
            public String getName() {
                return "testBinding";
            }
            public CompositeReferenceModel getReference() {
View Full Code Here

        Assert.assertTrue(random instanceof RandomStrategy);
    }
   
    @Test
    public void contextPropertiesCopied() throws Exception {
        V1SCABindingModel config = new V1SCABindingModel(SwitchYardNamespace.DEFAULT.uri()) {
            @Override
            public String getName() {
                return "testBinding";
            }
            public CompositeReferenceModel getReference() {
View Full Code Here

        Assert.assertEquals("abc", receivedEx.getMessage().getContext().getPropertyValue("message-prop"));
    }
   
    @Test
    public void createCustomLoadBalancers() throws Exception {
        V1SCABindingModel config = new V1SCABindingModel(SwitchYardNamespace.DEFAULT.uri()) {
            @Override
            public String getName() {
                return "testBinding";
            }
            public CompositeReferenceModel getReference() {
View Full Code Here

    }
   
    @Test
    public void verifyRemoteMessageCreation() throws Exception {
        // Create a binding config with clustering enabled
        V1SCABindingModel config = new V1SCABindingModel(SwitchYardNamespace.DEFAULT.uri()) {
            @Override
            public String getName() {
                return "verifyRemoteMessageCreation";
            }
            @Override
View Full Code Here

   
    @Test
    public void testBindingActivationWithNullTargetAndNamespace() throws Exception {
        activator.setEndpointPublisher(new NOPEndpointPublisher());
       
        SCABindingModel scab = new V1SCABindingModel(SwitchYardNamespace.DEFAULT.uri());
        scab.setClustered(true)
            .setLoadBalance("RoundRobin")
            .setTarget(null)
            .setTargetNamespace(null);
       
        try {
View Full Code Here

TOP

Related Classes of org.switchyard.config.model.composite.v1.V1CompositeReferenceModel

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.