Hi Yeah that could be a good idea to make it easier to replace the from uri on route(s).
Likewise it would also be nice if we could have a mocked registry so you can add beans to this registry in unit tests, and this registry takes precedence over the default registry. But that is another improvement to look at later. On Sun, Jul 21, 2013 at 10:23 PM, Bilgin Ibryam <bibr...@gmail.com> wrote: > Then I think I method like the following in CamelTestSupport > > public void replaceRouteFromWith(String routeId, String fromEndpoint) { > fromEndpoints.put(routeId, fromEndpoint); > } > > and some additions to doSetUp() > > for (final Map.Entry<String, String> entry : > fromEndpoints.entrySet()) { > context.getRouteDefinition(entry.getKey()).adviceWith(context, > new AdviceWithRouteBuilder() { > @Override > public void configure() throws Exception { > replaceFromWith(entry.getValue()); > } > }); > } > > would be useful for replacing from endpoints in tests. > > I will add that soon if there are no objections. > > Bilgin > > On 11 July 2013 18:16, Claus Ibsen <claus.ib...@gmail.com> wrote: >> No there is not. >> >> On Mon, Jul 1, 2013 at 6:55 PM, Bilgin Ibryam <bibr...@gmail.com> wrote: >>> Hi, >>> >>> with CamelTestSupport I can use isMockEndpointsAndSkip method to mock >>> existing endpoints, but for mocking the consumer endpoint I still have to >>> use AdviceWithRouteBuilder. >>> >>> Is there a method in CamelTestSupport that I can override and mock the >>> consumer endpoints? >>> >>> Thanks >>> Bilgin >> >> >> >> -- >> Claus Ibsen >> ----------------- >> Red Hat, Inc. >> Email: cib...@redhat.com >> Twitter: davsclaus >> Blog: http://davsclaus.com >> Author of Camel in Action: http://www.manning.com/ibsen -- Claus Ibsen ----------------- Red Hat, Inc. Email: cib...@redhat.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen