You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by hans couder <ha...@gmail.com> on 2009/06/09 17:02:05 UTC

ContextTestSupport version for camel-scala

Hi,


I'm using for my camel project the Scala DSL and would like to create some
routes for testing in scala.
Is there a scala version of CamelTestSupport or the camel-test module?


Thx and regards,

Hans Couder

Re: ContextTestSupport version for camel-scala

Posted by Gert Vanthienen <ge...@gmail.com>.
Hans,

We don't package a camel-scala test jar, but you can use Scala to
build your unit tests in combination with the camel-core test jar.
Just create a Camel unit test that extends the normal Camel
ContextTestSupport class and add the Scala DSL's RouteBuilderSupport
trait.

We use this technique in our own unit tests.  An example can be found
at http://svn.apache.org/viewvc/camel/trunk/components/camel-scala/src/test/scala/org/apache/camel/scala/dsl/SOnCompletionWhenTest.scala?revision=781747.
 The OnCompletionWhenTest is a plain CamelTestSupport based unit test
class and the trait is mixed in so we can use a Scala RouteBuilder.

Regards,

Gert Vanthienen
------------------------
Open Source SOA: http://fusesource.com
Blog: http://gertvanthienen.blogspot.com/



2009/6/10 Claus Ibsen <cl...@gmail.com>:
> On Tue, Jun 9, 2009 at 5:02 PM, hans couder<ha...@gmail.com> wrote:
>> Hi,
>>
>>
>> I'm using for my camel project the Scala DSL and would like to create some
>> routes for testing in scala.
>> Is there a scala version of CamelTestSupport or the camel-test module?
> Not that I know of. As they are pure Java you should be able to use it
> seamless from Scala.
>
> What are you looking for by a Scala version?
>
>
>>
>>
>> Thx and regards,
>>
>> Hans Couder
>>
>
>
>
> --
> Claus Ibsen
> Apache Camel Committer
>
> Open Source Integration: http://fusesource.com
> Blog: http://davsclaus.blogspot.com/
> Twitter: http://twitter.com/davsclaus
>

Re: ContextTestSupport version for camel-scala

Posted by Claus Ibsen <cl...@gmail.com>.
On Tue, Jun 9, 2009 at 5:02 PM, hans couder<ha...@gmail.com> wrote:
> Hi,
>
>
> I'm using for my camel project the Scala DSL and would like to create some
> routes for testing in scala.
> Is there a scala version of CamelTestSupport or the camel-test module?
Not that I know of. As they are pure Java you should be able to use it
seamless from Scala.

What are you looking for by a Scala version?


>
>
> Thx and regards,
>
> Hans Couder
>



-- 
Claus Ibsen
Apache Camel Committer

Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus