Thanks Claus, so how come:-
@Override
public String isMockEndpointsAndSkip() {
return "*";
}
gives me a failure but
@Override
public String isMockEndpointsAndSkip() {
return "direct:success";
}
works in my test?
I'm testing that the endpoint receives an expected message count. I can't
see where the bug in my code is otherwise.
public class CloseOpenOrdersRouteTest extends CamelTestSupport {
private CloseOpenOrdersRoute route = new CloseOpenOrdersRoute();
@Override
public String isMockEndpointsAndSkip() {
return "direct:.*";
}
@Test
public void closeOrderSuccessfully() throws Exception {
MockEndpoint to = getMockEndpoint("mock:" +
SuccessRoute.FROM_URI);
template().sendBody(CloseOpenOrdersRoute.FROM_URI, "doesn't
matter for
this test");
to.expectedMessageCount(1);
}
@After
public void after() throws InterruptedException {
assertMockEndpointsSatisfied();
}
@Override
protected RouteBuilder createRouteBuilder() throws Exception {
return route;
}
}
The class under test is:-
public class CloseOpenOrdersRoute extends RouteBuilder {
public static final String CLOSE_OPEN_ORDERS_ROUTE_ID =
"closeOpenOrdersRouteId";
public static final String FROM_URI = "direct:closeOpenOrders";
@Override
public void configure() throws Exception {
from(FROM_URI).id(CLOSE_OPEN_ORDERS_ROUTE_ID)
.log("request to close open orders received")
.to(SuccessRoute.FROM_URI);
}
}
--
View this message in context:
http://camel.465427.n5.nabble.com/isMockEndpointsAndSkip-documentation-unclear-tp5762798p5762813.html
Sent from the Camel - Users mailing list archive at Nabble.com.