Mock is the first extension of the Babel Camel DSL. For more information on the extension, please have a look to Babel Extension creation guide.
An extension for Babel Camel declaring some helpers for testing.
The babel-camel-mock
module needs to in the classpath.
Import the io.xtech.babel.camel.mock._
package and extends the RouteBuilder
with the Mock
trait.
For testing a mock endpoint can be declared with the mock endpoint.
import io.xtech.babel.camel.mock._
//The Mock extension is added simply by
// extending the RouteBuilder with
val routeDef = new RouteBuilder with Mock {
//the mock keyword is the same as typing
// to("mock:output")
from("direct:input").mock("output")
}