You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Romain Manni-Bucau (JIRA)" <ji...@apache.org> on 2011/05/25 23:53:47 UTC

[jira] [Issue Comment Edited] (CAMEL-4000) camel-assert

    [ https://issues.apache.org/jira/browse/CAMEL-4000?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13039346#comment-13039346 ] 

Romain Manni-Bucau edited comment on CAMEL-4000 at 5/25/11 9:53 PM:
--------------------------------------------------------------------

The goal was to check a value from a route in production environment, not tests. The exception will be managed from an onException clause as an error in the route (bad MD5 if the route starts with a file endpoint for example).

Using simple language on simple routes (file -> checkMD5 -> to somewhere) was too heavy (language evaluation mecanism in particular).

The assert dsl is not a bad idea.

edit: i just discovered validate() in the java DSL...maybe my component is useless.

      was (Author: romain.manni-bucau):
    The goal was to check a value from a route in production environment, not tests. The exception will be managed from an onException clause as an error in the route (bad MD5 if the route starts with a file endpoint for example).

Using simple language on simple routes (file -> checkMD5 -> to somewhere) was too heavy (language evaluation mecanism in particular).

The assert dsl is not a bad idea.
  
> camel-assert
> ------------
>
>                 Key: CAMEL-4000
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4000
>             Project: Camel
>          Issue Type: New Feature
>          Components: camel-core
>            Reporter: Romain Manni-Bucau
>            Priority: Minor
>
> a component helping testing things (like Assert in junit) in the route could be useful.
> example:
> from("file://...")
>   .bean(ReadMd5FromFileAndPutItInHeaders.class)
>   .bean(Hash.class, "md5")
>   .to("assert:equals?CamelActualHeaderKey=myReferenceHeader")
>   .to("...");
> i had a try here: http://code.google.com/p/rmannibucau/source/browse/#hg%2Fcamel%2Fcamel-assert
> edit: nabble link: http://camel.465427.n5.nabble.com/assert-amp-hashes-td4419370.html

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira