Package com.consol.citrus.jms.endpoint

Examples of com.consol.citrus.jms.endpoint.JmsSyncEndpoint


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

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

        // 1st message receiver
        JmsSyncEndpoint jmsSyncEndpoint = endpoints.get("jmsSyncEndpoint1");
        Assert.assertNotNull(jmsSyncEndpoint.getEndpointConfiguration().getConnectionFactory());
        Assert.assertEquals(jmsSyncEndpoint.getEndpointConfiguration().getConnectionFactory(), beanDefinitionContext.getBean("connectionFactory"));
        Assert.assertEquals(jmsSyncEndpoint.getEndpointConfiguration().getDestinationName(), "JMS.Queue.Test");
        Assert.assertNull(jmsSyncEndpoint.getEndpointConfiguration().getDestination());
        Assert.assertEquals(jmsSyncEndpoint.getEndpointConfiguration().getTimeout(), 5000L);
        Assert.assertEquals(jmsSyncEndpoint.getEndpointConfiguration().getCorrelator().getClass(), DefaultMessageCorrelator.class);

        // 2nd message receiver
        jmsSyncEndpoint = endpoints.get("jmsSyncEndpoint2");
        Assert.assertNotNull(jmsSyncEndpoint.getEndpointConfiguration().getConnectionFactory());
        Assert.assertEquals(jmsSyncEndpoint.getEndpointConfiguration().getConnectionFactory(), beanDefinitionContext.getBean("jmsConnectionFactory"));
        Assert.assertNull(jmsSyncEndpoint.getEndpointConfiguration().getDestinationName());
        Assert.assertNotNull(jmsSyncEndpoint.getEndpointConfiguration().getDestination());
        Assert.assertEquals(jmsSyncEndpoint.getEndpointConfiguration().getTimeout(), 10000L);
        Assert.assertEquals(jmsSyncEndpoint.getEndpointConfiguration().getCorrelator(), beanDefinitionContext.getBean("replyMessageCorrelator", MessageCorrelator.class));

        // 3rd message receiver
        jmsSyncEndpoint = endpoints.get("jmsSyncEndpoint3");
        Assert.assertNull(jmsSyncEndpoint.getEndpointConfiguration().getConnectionFactory());
        Assert.assertNull(jmsSyncEndpoint.getEndpointConfiguration().getDestinationName());
        Assert.assertNull(jmsSyncEndpoint.getEndpointConfiguration().getDestination());
        Assert.assertEquals(jmsSyncEndpoint.getEndpointConfiguration().getCorrelator(), beanDefinitionContext.getBean("replyMessageCorrelator", MessageCorrelator.class));
        Assert.assertEquals(jmsSyncEndpoint.getEndpointConfiguration().isPubSubDomain(), true);

        // 4th message receiver
        jmsSyncEndpoint = endpoints.get("jmsSyncEndpoint4");
        Assert.assertNotNull(jmsSyncEndpoint.getActor());
        Assert.assertEquals(jmsSyncEndpoint.getActor(), beanDefinitionContext.getBean("testActor", TestActor.class));
    }
View Full Code Here


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

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

        // 1st message sender
        JmsSyncEndpoint jmsSyncEndpoint = endpoints.get("jmsSyncEndpoint1");
        Assert.assertNotNull(jmsSyncEndpoint.getEndpointConfiguration().getConnectionFactory());
        Assert.assertEquals(jmsSyncEndpoint.getEndpointConfiguration().getConnectionFactory(), beanDefinitionContext.getBean("connectionFactory"));
        Assert.assertEquals(jmsSyncEndpoint.getEndpointConfiguration().getDestinationName(), "JMS.Queue.Test");
        Assert.assertNull(jmsSyncEndpoint.getEndpointConfiguration().getDestination());
        Assert.assertEquals(jmsSyncEndpoint.getEndpointConfiguration().getTimeout(), 5000L);
        Assert.assertEquals(jmsSyncEndpoint.getEndpointConfiguration().getPollingInterval(), 500L);
        Assert.assertEquals(jmsSyncEndpoint.getEndpointConfiguration().getReplyDestinationName(), "JMS.Reply.Queue");
        Assert.assertNull(jmsSyncEndpoint.getEndpointConfiguration().getReplyDestination());
        Assert.assertEquals(jmsSyncEndpoint.getEndpointConfiguration().getCorrelator().getClass(), DefaultMessageCorrelator.class);

        // 2nd message sender
        jmsSyncEndpoint = endpoints.get("jmsSyncEndpoint2");
        Assert.assertNotNull(jmsSyncEndpoint.getEndpointConfiguration().getConnectionFactory());
        Assert.assertEquals(jmsSyncEndpoint.getEndpointConfiguration().getConnectionFactory(), beanDefinitionContext.getBean("jmsConnectionFactory"));
        Assert.assertNull(jmsSyncEndpoint.getEndpointConfiguration().getDestinationName());
        Assert.assertNotNull(jmsSyncEndpoint.getEndpointConfiguration().getDestination());
        Assert.assertEquals(jmsSyncEndpoint.getEndpointConfiguration().getTimeout(), 10000L);
        Assert.assertNull(jmsSyncEndpoint.getEndpointConfiguration().getReplyDestinationName());
        Assert.assertNotNull(jmsSyncEndpoint.getEndpointConfiguration().getReplyDestination());
        Assert.assertEquals(jmsSyncEndpoint.getEndpointConfiguration().getCorrelator(), beanDefinitionContext.getBean("replyMessageCorrelator", MessageCorrelator.class));

        // 3rd message sender
        jmsSyncEndpoint = endpoints.get("jmsSyncEndpoint3");
        Assert.assertNull(jmsSyncEndpoint.getEndpointConfiguration().getConnectionFactory());
        Assert.assertNull(jmsSyncEndpoint.getEndpointConfiguration().getDestinationName());
        Assert.assertNull(jmsSyncEndpoint.getEndpointConfiguration().getDestination());
        Assert.assertEquals(jmsSyncEndpoint.getEndpointConfiguration().isPubSubDomain(), true);
        Assert.assertEquals(jmsSyncEndpoint.getEndpointConfiguration().getCorrelator(), beanDefinitionContext.getBean("replyMessageCorrelator", MessageCorrelator.class));

        // 4th message sender
        jmsSyncEndpoint = endpoints.get("jmsSyncEndpoint4");
        Assert.assertNotNull(jmsSyncEndpoint.getEndpointConfiguration().getPollingInterval());
        Assert.assertEquals(jmsSyncEndpoint.getEndpointConfiguration().getPollingInterval(), 250L);
        Assert.assertNotNull(jmsSyncEndpoint.getActor());
        Assert.assertEquals(jmsSyncEndpoint.getActor(), beanDefinitionContext.getBean("testActor", TestActor.class));
    }
View Full Code Here

TOP

Related Classes of com.consol.citrus.jms.endpoint.JmsSyncEndpoint

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.