camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Frankiboy <mail.to.fra...@gmail.com>
Subject Re: Green test, but my RouteBuilder dosent run...
Date Fri, 20 Jun 2014 07:53:53 GMT
This works :-)

Im actuel come into my bean 

package dk.bankconnect.hub.unittest;

import java.util.List;

import org.apache.camel.Exchange;
import org.apache.camel.ProducerTemplate;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.component.mock.MockEndpoint;
import org.apache.camel.test.CamelTestSupport;
import org.junit.Test;

import dk.bankconnect.hub.processor.AddIpBean;

public class FilterTest extends CamelTestSupport {

    String header =
"<root><name>abc</name><mainRegistrationNumber>20</mainRegistrationNumber><technicalAddress></technicalAddress></root>";

   

    @Test
    public void testSendMatchingMessage() throws Exception {
//        MockEndpoint mock = getMockEndpoint("mock:result"); 
//        mock.expectedBodiesReceived("expected result"); 
        template.sendBodyAndHeader("direct:start",
header,"headerName","headerValue");
 
        assertMockEndpointsSatisfied(); 
     
    }

    @Override
    protected RouteBuilder createRouteBuilder() {
        return new RouteBuilder() {
            public void configure() {
               
from("direct:start").bean(AddIpBean.class).to("mock:result");
            }
        };
    }

}

Frank 



--
View this message in context: http://camel.465427.n5.nabble.com/Green-test-but-my-RouteBuilder-dosent-run-tp5752583p5752618.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message