Mock Extension

Description

An extension for Babel Camel declaring some helpers for testing.

Requirement

The babel-camel-mock module needs to in the classpath.

Usage

Import the io.xtech.babel.camel.mock._ package and extends the RouteBuilder with the Mock trait.

mock component

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")
}