Simple quote was required -->

    @Test
    public void testChoiceSimple() throws InterruptedException {
        producer.sendBody("direct:input", classA);

        mockMatch.expectedMessageCount(1);
        Exchange exch = mockMatch.getExchanges().get(0);
        Object obj = exch.getIn().getBody();
        assertEquals("my.company.ClassA",obj.getClass().getName());

        mockMatch.assertIsSatisfied();

    }

    protected RouteBuilder createRouteBuilder() throws Exception {
        return new RouteBuilder() {

            public void configure() throws Exception {
                from("direct:input")
                  .choice()
                     .when().simple("${body} is 'my.company.ClassA'")
                        .to("mock:match")
                     .otherwise()
                        .to("mock:do-not-match")
                  .endChoice();            }
        };
    }


On Mon, Apr 28, 2014 at 9:39 AM, damien <damien.c...@mq.edu.au> wrote:

> That's the problem, it works now! Thanks a lot
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/org-apache-camel-language-simple-types-SimpleIllegalSyntaxException-Binary-operator-is-does-not-supp1-tp5750642p5750645.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Charles Moulliard
Apache Committer / Architect @RedHat
Twitter : @cmoulliard | Blog :  http://cmoulliard.github.io

Reply via email to