Package com.consol.citrus.channel

Examples of com.consol.citrus.channel.ChannelSyncEndpoint


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

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

        // 1st message receiver
        ChannelSyncEndpoint channelSyncEndpoint = endpoints.get("syncChannelEndpoint1");
        Assert.assertEquals(channelSyncEndpoint.getEndpointConfiguration().getChannelName(), "channelName");
        Assert.assertNull(channelSyncEndpoint.getEndpointConfiguration().getChannel());
        Assert.assertEquals(channelSyncEndpoint.getEndpointConfiguration().getTimeout(), 5000L);
        Assert.assertEquals(channelSyncEndpoint.getEndpointConfiguration().getPollingInterval(), 500L);
        Assert.assertNotNull(channelSyncEndpoint.getEndpointConfiguration().getChannelResolver());
        Assert.assertEquals(channelSyncEndpoint.getEndpointConfiguration().getCorrelator().getClass(), DefaultMessageCorrelator.class);

        // 2nd message receiver
        channelSyncEndpoint = endpoints.get("syncChannelEndpoint2");
        Assert.assertNull(channelSyncEndpoint.getEndpointConfiguration().getChannelName());
        Assert.assertNotNull(channelSyncEndpoint.getEndpointConfiguration().getChannel());
        Assert.assertEquals(channelSyncEndpoint.getEndpointConfiguration().getTimeout(), 10000L);
        Assert.assertNull(channelSyncEndpoint.getEndpointConfiguration().getChannelResolver());
        Assert.assertEquals(channelSyncEndpoint.getEndpointConfiguration().getCorrelator(), beanDefinitionContext.getBean("replyMessageCorrelator", MessageCorrelator.class));

        // 3rd message receiver
        channelSyncEndpoint = endpoints.get("syncChannelEndpoint3");
        Assert.assertNull(channelSyncEndpoint.getEndpointConfiguration().getChannelName());
        Assert.assertNull(channelSyncEndpoint.getEndpointConfiguration().getChannel());
        Assert.assertNull(channelSyncEndpoint.getEndpointConfiguration().getChannelResolver());
        Assert.assertEquals(channelSyncEndpoint.getEndpointConfiguration().getCorrelator().getClass(), DefaultMessageCorrelator.class);
        Assert.assertNotNull(channelSyncEndpoint.getEndpointConfiguration().getMessagingTemplate());
        Assert.assertEquals(channelSyncEndpoint.getEndpointConfiguration().getMessagingTemplate(), beanDefinitionContext.getBean("messagingTemplate", MessagingTemplate.class));
        Assert.assertEquals(channelSyncEndpoint.getEndpointConfiguration().getPollingInterval(), 250L);
        Assert.assertNotNull(channelSyncEndpoint.getActor());
        Assert.assertEquals(channelSyncEndpoint.getActor(), beanDefinitionContext.getBean("testActor", TestActor.class));
    }
View Full Code Here

TOP

Related Classes of com.consol.citrus.channel.ChannelSyncEndpoint

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.