Skip to content

Instantly share code, notes, and snippets.

@colwilson
Created November 17, 2012 12:37
Show Gist options
  • Save colwilson/4095633 to your computer and use it in GitHub Desktop.
Save colwilson/4095633 to your computer and use it in GitHub Desktop.
public class SomeTest extends CamelTestSupport {
@Override
protected RouteBuilder createRouteBuilder() throws Exception {
return new RouteBuilder() {
@Override
public void configure() throws Exception {
from("direct:findAll")
.to("mongodb:myConnectionBean?database=flights&collection=tickets&operation=findAll")
.to("mock:resultFindAll");
}
};
}
@Override
protected JndiRegistry createRegistry() throws Exception {
JndiRegistry reg = new JndiRegistry(createJndiContext());
Mongo connectionBean = new Mongo("localhost", 27017);
reg.bind("myConnectionBean", connectionBean);
return reg;
}
@Test
public void testSomething() throws InterruptedException {
// test something here
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment