* re-implement javadsl testkit * fix mima problem * rebase master * move ImplicitSender/DefaultTimeout to scaladsl * undo the change of moving scala api * fix return type and add doc * resolve conflicts and add more comments
23 lines
672 B
Java
23 lines
672 B
Java
package jdocs.camel;
|
|
|
|
import akka.actor.ActorRef;
|
|
import akka.actor.ActorSystem;
|
|
import akka.actor.Props;
|
|
import akka.camel.Camel;
|
|
import akka.camel.CamelExtension;
|
|
import akka.testkit.javadsl.TestKit;
|
|
|
|
public class CustomRouteTestBase {
|
|
public void customRoute() throws Exception{
|
|
//#CustomRoute
|
|
ActorSystem system = ActorSystem.create("some-system");
|
|
try {
|
|
Camel camel = CamelExtension.get(system);
|
|
ActorRef responder = system.actorOf(Props.create(Responder.class), "TestResponder");
|
|
camel.context().addRoutes(new CustomRouteBuilder(responder));
|
|
//#CustomRoute
|
|
} finally {
|
|
TestKit.shutdownActorSystem(system);
|
|
}
|
|
}
|
|
}
|