first pass at moving modules over, sbt project compiles properly

This commit is contained in:
sclasen 2011-05-23 11:37:56 -04:00
parent 1f5a04c678
commit 5e8f844545
126 changed files with 9447 additions and 2 deletions

View file

@ -0,0 +1,41 @@
package akka.camel;
import akka.japi.SideEffect;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
import static akka.actor.Actors.*;
import static akka.camel.CamelContextManager.*;
import static akka.camel.CamelServiceManager.*;
import static org.junit.Assert.*;
/**
* @author Martin Krasser
*/
public class ConsumerJavaTestBase {
@BeforeClass
public static void setUpBeforeClass() {
startCamelService();
}
@AfterClass
public static void tearDownAfterClass() {
stopCamelService();
registry().local().shutdownAll();
}
@Test
public void shouldHandleExceptionThrownByActorAndGenerateCustomResponse() {
getMandatoryService().awaitEndpointActivation(1, new SideEffect() {
public void apply() {
actorOf(SampleErrorHandlingConsumer.class).start();
}
});
String result = getMandatoryTemplate().requestBody("direct:error-handler-test-java", "hello", String.class);
assertEquals("error: hello", result);
}
}