OK, I think we have to introduce camel-api module if we want to reduce the duplication of the TestSupport in the feature.
-- Willem Jiang Red Hat, Inc. FuseSource is now part of Red Hat Web: http://www.fusesource.com | http://www.redhat.com Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) (English) http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese) Twitter: willemjiang Weibo: 姜宁willem On Thursday, December 6, 2012 at 3:42 PM, Claus Ibsen wrote: > On Thu, Dec 6, 2012 at 2:02 AM, Willem jiang <[email protected] > (mailto:[email protected])> wrote: > > Hi, > > First you should use the CamelTestSupport instead of ContextTestSupport in > > you test case. > > > > Because CamelTestSupport is in the camel-core-test.jar. If you use it you > > will introduce a very big test jar, and you just want to use small part of > > it.Normally, we suggest use to use the CamelTestSupport from camel-test > > module. > > > > As we don't have camel-api module to hold the APIs, camel-test module has > > the dependency of camel-core. The camel-core unit test cannot have the > > dependency of camel-test which will introduce the dependency cycle. So > > camel-core still use ContextTestSupport in the old way. > > > > Maybe we can consider to put the TestSupport into to the camel-core.jar in > > the next big version of camel. > > -1 > > People should *always* use the camel-test for unit testing. > As we document here > http://camel.apache.org/testing > > What we have inside the src/test/java in camel-core (eg > camel-core-test JAR) is private and for internal testing of Camel > itself). > > > > > -- > > Willem Jiang > > > > Red Hat, Inc. > > FuseSource is now part of Red Hat > > Web: http://www.fusesource.com | http://www.redhat.com > > Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) > > (English) > > http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese) > > Twitter: willemjiang > > Weibo: 姜宁willem > > > > > > > > > > > > On Wednesday, December 5, 2012 at 11:35 PM, lleclerc wrote: > > > > > Hi, > > > > > > Can someone give an answer about the difference between the 2 ? > > > Or a link to the documented page. > > > > > > I have been having problems with my testing and I started looking into > > > camel-core source code to learn with the tests done there, and all I see > > > is > > > ContextTestSupport. > > > > > > Why should I be using CamelTestSupport ? > > > > > > Thanks, > > > > > > > > > > > > -- > > > View this message in context: > > > http://camel.465427.n5.nabble.com/ContextTestSupport-vs-CamelTestSupport-tp5723662.html > > > Sent from the Camel - Users mailing list archive at Nabble.com > > > (http://Nabble.com). > > > > > > > > -- > Claus Ibsen > ----------------- > Red Hat, Inc. > FuseSource is now part of Red Hat > Email: [email protected] (mailto:[email protected]) > Web: http://fusesource.com > Twitter: davsclaus > Blog: http://davsclaus.com > Author of Camel in Action: http://www.manning.com/ibsen
