There are one problem to define the assertions in test cases since sometimes
we are not sure of an input sentence. For example:
 1)"to("mock:a","mock:b") and "to("mock:a").to("mock:b") have the same route
definition
 2) Sometimes we can't use a ".end()" for the choice sentence. But when
renderring, the ".end()" is a required part.
Do you have some ideas to deal with it?

JIRA j...@apache.org wrote:
> 
> 
>     [
> https://issues.apache.org/activemq/browse/CAMEL-1392?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=52686#action_52686
> ] 
> 
> Jonathan Anstey commented on CAMEL-1392:
> ----------------------------------------
> 
> Quickly trying this new code drop out before leaving for the day :) In the
> GroovyRendererTest I noticed pretty much all routes defined in the
> supported list get rendered like
> "from("direct:start",).to("mock:result")". Example output:
> 
> {code}
> dsl: from("direct:start").unmarshal().serialization().to("mock:result")
> after rendered: 
> import org.apache.camel.language.groovy.GroovyRouteBuilder;
> class GroovyRoute extends GroovyRouteBuilder {
> void configure() {
> from("direct:start",).to("mock:result")
> }
> }
> {code}
> 
> Not sure if this is a bug in the renderer or the test case. Care to fix
> that up?
> 
> Also unit tests typically contain assertions on the output of a piece of
> code to make sure its operating correctly. In your case the test should be
> asserting that the output of the renderer is correct. Currently we have to
> verify this by looking at the output.
> 
>> groovy renderer
>> ---------------
>>
>>                 Key: CAMEL-1392
>>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1392
>>             Project: Apache Camel
>>          Issue Type: Sub-task
>>            Reporter: James Strachan
>>            Assignee: Xueqiang Mi
>>         Attachments: camel-web-20090629.patch, camel-web-20090703.patch
>>
>>
> 
> 
> -- 
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/-jira--Created%3A-%28CAMEL-1392%29-groovy-renderer-tp22220288p24353726.html
Sent from the Camel Development mailing list archive at Nabble.com.

Reply via email to