[
https://issues.apache.org/jira/browse/CAMEL-4000?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13039339#comment-13039339
]
Hadrian Zbarcea commented on CAMEL-4000:
----------------------------------------
@Romain,
I am not sure how useful this is give the mock endpoint and test kit. I will
have to think about it to *really* have an opinion about it. The reason I am
confused is because from my experience people build routes with the goal of
testing and ultimately deploying them (unchanged) in production. That doesn't
seem to be the case with your proposal. Some utility I see is to use them as
sort of mock emulators of endpoints that throw exceptions of faults for some
conditions (which could still be done today using a separate route as an
emulator of such endpoint). Do I miss something?
If I could get to 'see the light', I think a mini-dsl would be more useful. It
would be way more expressive and would use real expressions than just a limited
synax based on uri parameters. For instance:
{code}
[... somewhere in the RouteBuilder.configure() ...]
assert("foo").equals(expression).throw("message");
assert("bar").not(expression).fault(Clazz.class);
from(endpoint).to("assert:foo");
{code}
> 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