Package com.consol.citrus.camel.endpoint

Examples of com.consol.citrus.camel.endpoint.CamelSyncEndpoint


        Map<String, CamelSyncEndpoint> endpoints = beanDefinitionContext.getBeansOfType(CamelSyncEndpoint.class);

        Assert.assertEquals(endpoints.size(), 3);

        // 1st message receiver
        CamelSyncEndpoint camelEndpoint = endpoints.get("camelSyncEndpoint1");
        Assert.assertEquals(camelEndpoint.getEndpointConfiguration().getCamelContext(), beanDefinitionContext.getBean("camelContext"));
        Assert.assertEquals(camelEndpoint.getEndpointConfiguration().getCorrelator().getClass(), DefaultMessageCorrelator.class);
        Assert.assertEquals(camelEndpoint.getEndpointConfiguration().getEndpointUri(), "direct:news-feed1");
        Assert.assertEquals(camelEndpoint.getEndpointConfiguration().getPollingInterval(), 500L);
        Assert.assertEquals(camelEndpoint.getEndpointConfiguration().getTimeout(), 5000L);

        // 2nd message receiver
        camelEndpoint = endpoints.get("camelSyncEndpoint2");
        Assert.assertEquals(camelEndpoint.getEndpointConfiguration().getCamelContext(), beanDefinitionContext.getBean("specialCamelContext"));
        Assert.assertEquals(camelEndpoint.getEndpointConfiguration().getCorrelator(), beanDefinitionContext.getBean("replyMessageCorrelator"));
        Assert.assertEquals(camelEndpoint.getEndpointConfiguration().getEndpointUri(), "direct:news-feed2");
        Assert.assertEquals(camelEndpoint.getEndpointConfiguration().getPollingInterval(), 500L);
        Assert.assertEquals(camelEndpoint.getEndpointConfiguration().getTimeout(), 10000L);

        // 3rd message receiver
        camelEndpoint = endpoints.get("camelSyncEndpoint3");
        Assert.assertEquals(camelEndpoint.getEndpointConfiguration().getMessageConverter(), beanDefinitionContext.getBean("messageConverter"));
        Assert.assertEquals(camelEndpoint.getEndpointConfiguration().getEndpointUri(), "direct:news-feed3");
        Assert.assertEquals(camelEndpoint.getEndpointConfiguration().getPollingInterval(), 200L);
        Assert.assertEquals(camelEndpoint.getActor(), beanDefinitionContext.getBean("testActor", TestActor.class));
    }
View Full Code Here

TOP

Related Classes of com.consol.citrus.camel.endpoint.CamelSyncEndpoint

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.