[jboss-svn-commits] JBL Code SVN: r30497 - in labs/jbossrules/trunk/drools-pipeline/drools-camel/src: test/java/org/drools/camel/component and 1 other directory.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Sun Dec 6 23:31:32 EST 2009
Author: hzbarcea
Date: 2009-12-06 23:31:31 -0500 (Sun, 06 Dec 2009)
New Revision: 30497
Modified:
labs/jbossrules/trunk/drools-pipeline/drools-camel/src/main/java/org/drools/camel/component/DroolsProducer.java
labs/jbossrules/trunk/drools-pipeline/drools-camel/src/test/java/org/drools/camel/component/CamelEndpointTest.java
Log:
JBRULES-2347 Drools Pipeline integration with Camel
- a few minor guidelines for modifying the tests
Modified: labs/jbossrules/trunk/drools-pipeline/drools-camel/src/main/java/org/drools/camel/component/DroolsProducer.java
===================================================================
--- labs/jbossrules/trunk/drools-pipeline/drools-camel/src/main/java/org/drools/camel/component/DroolsProducer.java 2009-12-07 04:17:33 UTC (rev 30496)
+++ labs/jbossrules/trunk/drools-pipeline/drools-camel/src/main/java/org/drools/camel/component/DroolsProducer.java 2009-12-07 04:31:31 UTC (rev 30497)
@@ -42,6 +42,9 @@
}
public void process(Exchange exchange) throws Exception {
+ // The method is available via getEndpoint().getMethod();
+ // how should we use it here?
+ // for now the default method 'execute' is used...
ResultHandlerImpl handler = new ResultHandlerImpl();
exchange.setProperty(DroolsEndpoint.DROOLS_CONTEXT_PROPERTY,
Modified: labs/jbossrules/trunk/drools-pipeline/drools-camel/src/test/java/org/drools/camel/component/CamelEndpointTest.java
===================================================================
--- labs/jbossrules/trunk/drools-pipeline/drools-camel/src/test/java/org/drools/camel/component/CamelEndpointTest.java 2009-12-07 04:17:33 UTC (rev 30496)
+++ labs/jbossrules/trunk/drools-pipeline/drools-camel/src/test/java/org/drools/camel/component/CamelEndpointTest.java 2009-12-07 04:31:31 UTC (rev 30497)
@@ -48,6 +48,10 @@
Object response = template.requestBody("direct:in", inXml);
// Urgh, ugly stuff, but it's getting late...
+ // Ideally we need an abstract test that defines the xml assert,
+ // the bootstrapping, the default input message and the response
+ // so the only thing left is to define the route builder with
+ // various kinds of urls, testing different scenarios
System.out.println(response);
}
@@ -62,6 +66,9 @@
@Override
protected Context createJndiContext() throws Exception {
+ // Overriding this method is necessary in the absence of a spring application context
+ // to bootstrap the whole thing. Create another Spring based unit test with all the beans
+ // defined as below and remove this comment from here.
Context context = super.createJndiContext();
String rule = "";
More information about the jboss-svn-commits
mailing list