I tried this and debug thrue the entiere test and get green ligth, but i
newer go into AddIpBean,
what to do, to start the route.
public class FilterTest extends CamelTestSupport {
String header =
"<root><name>abc</name><mainRegistrationNumber>20</mainRegistrationNumber><technicalAddress></technicalAddress></root>";
protected MockEndpoint resultEndpoint;
protected ProducerTemplate template;
@Test
public void testSendMatchingMessage() throws Exception {
resultEndpoint = context.getEndpoint("mock:result",
MockEndpoint.class);
template = context.createProducerTemplate();
String expectedBody = "<matched/>";
resultEndpoint.expectedBodiesReceived(expectedBody);
template.setDefaultEndpoint(resultEndpoint);
template.sendBodyAndHeader(expectedBody, header, header);
resultEndpoint.assertIsSatisfied();
}
@Override
protected RouteBuilder createRouteBuilder() {
return new RouteBuilder() {
public void configure() {
from("direct:start").bean(AddIpBean.class).to("mock:result");
}
};
}
}
--
View this message in context:
http://camel.465427.n5.nabble.com/Green-test-but-my-RouteBuilder-dosent-run-tp5752604.html
Sent from the Camel - Users mailing list archive at Nabble.com.