All i want is to call a Bean class, with a header and body , and check the
body if its correct when it returns.
Her is the bean i try to call:
public Document enrich(@Headers Map<?,?> requestHeaders, Document doc)
throws TransformerException {
// There is some more code here...
}
This is my test class... Byt get error that endpoint is missing... Is there
a simple example somewhere to call a bean ?
public class FilterTest extends CamelTestSupport {
String header =
"<root><name>abc</name><mainRegistrationNumber>20</mainRegistrationNumber><technicalAddress></technicalAddress></root>";
@Test public void testSendMatchingMessage() throws Exception {
String expectedBody = "<matched/>";
template.sendBodyAndHeader(expectedBody, "header", "header");
}
@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/Test-a-single-Bean-with-CamelTestSupport-tp5752563.html
Sent from the Camel - Users mailing list archive at Nabble.com.