You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Jan Matèrne (JIRA)" <ji...@apache.org> on 2013/11/23 22:58:35 UTC
[jira] [Commented] (CAMEL-6993) Use varargs in PredicateBuilder
[ https://issues.apache.org/jira/browse/CAMEL-6993?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13830779#comment-13830779 ]
Jan Matèrne commented on CAMEL-6993:
------------------------------------
I have written test and implementation and have created a pull request from github.
It's my first PR so please have a look.
> Use varargs in PredicateBuilder
> -------------------------------
>
> Key: CAMEL-6993
> URL: https://issues.apache.org/jira/browse/CAMEL-6993
> Project: Camel
> Issue Type: New Feature
> Components: camel-core
> Affects Versions: 2.12.1
> Reporter: Jan Matèrne
> Priority: Minor
>
> When combining multiple expectations in Tests on MockEndpoints you may use the PredicateBuilder.and() method.
> These methods exists with two signatures:
> - using two Predicates [1]
> - using a List of Predicates [2]
> Combining three Predicates results in constructs like
> - and(one, and(two, three))
> - and(Arrays.asList(one, two, three))
> It would be easier to provide a vararg method like in [3].
> That said the or-method is only available with a signature containing two predicates [4].
> [1] org.apache.camel.builder.PredicateBuilder.and(Predicate, Predicate)
> [2] org.apache.camel.builder.PredicateBuilder.and(List<Predicate>)
> [3] org.apache.camel.builder.PredicateBuilder.in(Predicate...)
> [4] org.apache.camel.builder.PredicateBuilder.or(Predicate, Predicate)
--
This message was sent by Atlassian JIRA
(v6.1#6144)