You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by scottj <sc...@outlook.com> on 2013/03/20 09:50:48 UTC

CamelSpringJUnit4ClassRunner vs CamelSpringTestSupport

hello,
I would like to use the CamelSpringJUnit4ClassRunner annotations on my
tests. I've read the instructions on
http://camel.apache.org/spring-testing.html, which says "Using
CamelSpringJUnit4ClassRunner runner with the @RunWith annotation [..]
provides the full feature set of Spring Test with support for the feature
set provided in the CamelTestSupport classes"

I am would like to access the CamelTestSupport-methods in my tests (e.g.
CamelTestSupport.createExchangeWithBody()), but how do I accomplish that
using the CamelSpringJUnit4ClassRunner annotation? I do not have access to
the CamelTestSupport-methods then



--
View this message in context: http://camel.465427.n5.nabble.com/CamelSpringJUnit4ClassRunner-vs-CamelSpringTestSupport-tp5729479.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: CamelSpringJUnit4ClassRunner vs CamelSpringTestSupport

Posted by Willem jiang <wi...@gmail.com>.
I think the document means some pre or post camel context test support setting up.
Just like the you cannot call the assert* method if you are using SpringJUnitClassRunner, you can consider to use the static imports to use the method in CamelSpringTestSupport.


--  
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, March 27, 2013 at 8:35 PM, Christian Müller wrote:

> This is not possible.
> We should update the documentation. It's miss leading...
>  
> Best,
> Christian
>  
> On Wed, Mar 20, 2013 at 9:50 AM, scottj <scott.james.90@outlook.com (mailto:scott.james.90@outlook.com)> wrote:
>  
> > hello,
> > I would like to use the CamelSpringJUnit4ClassRunner annotations on my
> > tests. I've read the instructions on
> > http://camel.apache.org/spring-testing.html, which says "Using
> > CamelSpringJUnit4ClassRunner runner with the @RunWith annotation [..]
> > provides the full feature set of Spring Test with support for the feature
> > set provided in the CamelTestSupport classes"
> >  
> > I am would like to access the CamelTestSupport-methods in my tests (e.g.
> > CamelTestSupport.createExchangeWithBody()), but how do I accomplish that
> > using the CamelSpringJUnit4ClassRunner annotation? I do not have access to
> > the CamelTestSupport-methods then
> >  
> >  
> >  
> > --
> > View this message in context:
> > http://camel.465427.n5.nabble.com/CamelSpringJUnit4ClassRunner-vs-CamelSpringTestSupport-tp5729479.html
> > Sent from the Camel - Users mailing list archive at Nabble.com (http://Nabble.com).
>  




Re: CamelSpringJUnit4ClassRunner vs CamelSpringTestSupport

Posted by Christian Müller <ch...@gmail.com>.
This is not possible.
We should update the documentation. It's miss leading...

Best,
Christian

On Wed, Mar 20, 2013 at 9:50 AM, scottj <sc...@outlook.com> wrote:

> hello,
> I would like to use the CamelSpringJUnit4ClassRunner annotations on my
> tests. I've read the instructions on
> http://camel.apache.org/spring-testing.html, which says "Using
> CamelSpringJUnit4ClassRunner runner with the @RunWith annotation [..]
> provides the full feature set of Spring Test with support for the feature
> set provided in the CamelTestSupport classes"
>
> I am would like to access the CamelTestSupport-methods in my tests (e.g.
> CamelTestSupport.createExchangeWithBody()), but how do I accomplish that
> using the CamelSpringJUnit4ClassRunner annotation? I do not have access to
> the CamelTestSupport-methods then
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/CamelSpringJUnit4ClassRunner-vs-CamelSpringTestSupport-tp5729479.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>