Package org.apache.camel.impl

Examples of org.apache.camel.impl.InterceptSendToMockEndpointStrategy


     * @param pattern the pattern.
     * @throws Exception can be thrown if error occurred
     * @see org.apache.camel.util.EndpointHelper#matchEndpoint(String, String)
     */
    public void mockEndpoints(String pattern) throws Exception {
        getContext().addRegisterEndpointCallback(new InterceptSendToMockEndpointStrategy(pattern));
    }
View Full Code Here


        threadConsumer.set(consumer);

        // enable auto mocking if enabled
        String pattern = isMockEndpoints();
        if (pattern != null) {
            context.addRegisterEndpointCallback(new InterceptSendToMockEndpointStrategy(pattern));
        }

        postProcessTest();

        if (isUseRouteBuilder()) {
View Full Code Here

    }

    @Override
    protected RouteBuilder createRouteBuilder() throws Exception {
        // mock all endpoints
        context.addRegisterEndpointCallback(new InterceptSendToMockEndpointStrategy("*"));

        return new RouteBuilder() {
            @Override
            public void configure() throws Exception {
                from("direct:start")
View Full Code Here

               
                @Override
                public void execute(String contextName, SpringCamelContext camelContext)
                    throws Exception {
                    LOG.info("Enabling auto mocking of endpoints matching pattern [{}] on CamelContext with name [{}].", mockEndpoints, contextName);
                    camelContext.addRegisterEndpointCallback(new InterceptSendToMockEndpointStrategy(mockEndpoints));
                }
            });
        }
    }
View Full Code Here

               
                @Override
                public void execute(String contextName, SpringCamelContext camelContext)
                    throws Exception {
                    LOG.info("Enabling auto mocking and skipping of endpoints matching pattern [{}] on CamelContext with name [{}].", mockEndpoints, contextName);
                    camelContext.addRegisterEndpointCallback(new InterceptSendToMockEndpointStrategy(mockEndpoints, true));
                }
            });
        }
    }
View Full Code Here

        consumer.start();

        // enable auto mocking if enabled
        String pattern = isMockEndpoints();
        if (pattern != null) {
            context.addRegisterEndpointCallback(new InterceptSendToMockEndpointStrategy(pattern));
        }

        // configure properties component (mandatory for testing)
        context.getComponent("properties", PropertiesComponent.class);
View Full Code Here

        threadConsumer.set(consumer);

        // enable auto mocking if enabled
        String pattern = isMockEndpoints();
        if (pattern != null) {
            context.addRegisterEndpointCallback(new InterceptSendToMockEndpointStrategy(pattern));
        }
        pattern = isMockEndpointsAndSkip();
        if (pattern != null) {
            context.addRegisterEndpointCallback(new InterceptSendToMockEndpointStrategy(pattern, true));
        }

        // configure properties component (mandatory for testing)
        PropertiesComponent pc = context.getComponent("properties", PropertiesComponent.class);
        Properties extra = useOverridePropertiesWithPropertiesComponent();
View Full Code Here

        threadConsumer.set(consumer);

        // enable auto mocking if enabled
        String pattern = isMockEndpoints();
        if (pattern != null) {
            context.addRegisterEndpointCallback(new InterceptSendToMockEndpointStrategy(pattern));
        }

        postProcessTest();

        if (isUseRouteBuilder()) {
View Full Code Here

        threadConsumer.set(consumer);

        // enable auto mocking if enabled
        String pattern = isMockEndpoints();
        if (pattern != null) {
            context.addRegisterEndpointCallback(new InterceptSendToMockEndpointStrategy(pattern));
        }
        pattern = isMockEndpointsAndSkip();
        if (pattern != null) {
            context.addRegisterEndpointCallback(new InterceptSendToMockEndpointStrategy(pattern, true));
        }

        // configure properties component (mandatory for testing)
        context.getComponent("properties", PropertiesComponent.class);
View Full Code Here

     * Mock all endpoints in the route.
     *
     * @throws Exception can be thrown if error occurred
     */
    public void mockEndpoints() throws Exception {
        getContext().addRegisterEndpointCallback(new InterceptSendToMockEndpointStrategy(null));
    }
View Full Code Here

TOP

Related Classes of org.apache.camel.impl.InterceptSendToMockEndpointStrategy

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.