use of org.apache.camel.model.SplitDefinition in project camel by apache.
the class SplitterWithCustomThreadPoolExecutorTest method getSplitter.
protected SplitDefinition getSplitter() {
SplitDefinition result = null;
List<RouteDefinition> routeDefinitions = context.getRouteDefinitions();
for (RouteDefinition routeType : routeDefinitions) {
result = firstSplitterType(routeType.getOutputs());
if (result != null) {
break;
}
}
return result;
}
use of org.apache.camel.model.SplitDefinition in project camel by apache.
the class AdviceWithTypeTest method testUnknownType.
public void testUnknownType() throws Exception {
try {
context.getRouteDefinitions().get(0).adviceWith(context, new AdviceWithRouteBuilder() {
@Override
public void configure() throws Exception {
weaveByType(SplitDefinition.class).replace().to("mock:xxx");
}
});
fail("Should hve thrown exception");
} catch (IllegalArgumentException e) {
assertTrue(e.getMessage(), e.getMessage().startsWith("There are no outputs which matches: SplitDefinition in the route"));
}
}
Aggregations