You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Carl Pulley <c....@acme-labs.org.uk> on 2013/09/07 12:40:16 UTC

Camel Testing and ScalaTestSupport

I've noticed that the package camel-scala contains the abstract class ScalaTestSupport under its test directory. As such, I'm wondering if it's possible to use this class within my own Apache Camel tests?

I'm using Scala 2.10 and Apache Camel 2.11 and code is maintained/managed using SBT version 0.13. I've added in a dependency on camel-scala within my build SBT file.

Now, within my project src/test/scala directory, I've added in a test file along the lines of:

  import org.apache.camel.scala.dsl.ScalaTestSupport

  class ExampleTests extends ScalaTestSupport {
    val builder = new RouteBuilder { ... }

    // various simple tests
  }

Unfortunately, when I attempt to compile these tests I get the following compiling error:

  [info] Compiling 1 Scala source to ../example/target/scala-2.10/test-classes...
  [error] ../example/src/test/scala/submission.scala:14: object ScalaTestSupport is not a member of package org.apache.camel.scala.dsl
  [error] import org.apache.camel.scala.dsl.ScalaTestSupport
  [error]        ^
  ...

I'm probably missing something rather obvious here, so any help resolving the issue is greatly appreciated.

Many thanks,

  Carl.

Re: Camel Testing and ScalaTestSupport

Posted by Carl Pulley <c....@acme-labs.org.uk>.
Thinking more about this, I've just realised what the obvious thing I'm missing here is: my project uses source code from the package, which is tested with its tests - duh!

Blindingly obvious to myself now why I'm getting the compile error.

Sorry about that,

  Carl.