camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Giorgio Vespucci <giorgio.vespu...@gmail.com>
Subject Migrating from CamelTestSupport to AbstractCamelTestNGSpringContextTests
Date Tue, 30 Sep 2014 12:32:03 GMT
Hi everybody
I've been using Camel since 3-4 months on Spring 4.0.7.RELEASE
I have several Camel 2.14.0 TestNG tests based on extending
CamelTestSupport, in which I use some MockEndpoints.
I configured my routes by overriding the createRouteBuilder() method.

Now I would need also to inject some Spring beans in one of them, by
@Autowired annotation.
By reading what is said at http://camel.apache.org/spring-testing.html, I
understood that I've to extend AbstractCamelTestNGSpringContextTests now,
which supports @Autowired, @DirtiesContext, and@ContextConfiguration.

While I understood that all MockEndpoints are no more accessible
by getMockEndpoint() method, but by using @EndpointInject annotation, it is
not clear to me is how I can express my routes, because createRouteBuilder()
is not more available.

I saw that is possible to define producers and consumers by using
annotations, but I cannot manage to understand how routes can be designed.
Many thanks to the community.
-- 
Giorgio Vespucci
giorgio [dot] vespucci [at] gmail [dot] com
Skype, Twitter, Slideshare: gvespucci
http://xpermanwalking.blogspot.com

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message