touk / camel-spock Goto Github PK
View Code? Open in Web Editor NEWSmall library allowing you to test your Camel routes with Spock
Small library allowing you to test your Camel routes with Spock
The simplest way would be a way to have it expose the CamelContext
in a variable so that in a setup block something like this:
camelContext.getRouteDefinition("Database Poller").adviceWith(camelContext, new AdviceWithRouteBuilder() {
@Override
void configure() throws Exception {
replaceFromWith("direct:simulatePoll")
weaveById("pollDatabaseQuery").before().setBody(constant('SELECT Foo, CREATED FROMtest_user_updates WHERE QUEUED=0'))
weaveById("enqueueCodes").replace().to("mock:enqueue")
}
})
There might be a nicer way to expose the adviceWith that didn't require the whole getRouteDefinition - that'd be fine too - but getting access to modifying the route would make it easy to modify certain routes for testing
I tried doing a quick update to groovy 2.3.8 and camel 2.14.1 but wasn't able to - I hit a few weird issues.
going to groovy 2.3.8 I needed to make the CamelExtension be:
IAnnotationDrivenExtension<Annotation>
instead of IAnnotationDrivenExtension
After doing those changes, 3 of the test methods fail - but I'm not super clear how it is supposed to work anyway, so this might be best done by you guys.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.