Package org.apache.camel.builder

Examples of org.apache.camel.builder.NotifyBuilder.matches()


        template.sendBodyAndHeader("seda:start", "Hello World", "recipientListHeader", "fail,direct:foo");

        assertMockEndpointsSatisfied();

        // wait until its done before we stop and check that retry was invoked
        boolean matches = event.matches(10, TimeUnit.SECONDS);
        assertTrue(matches);

        context.stop();

        assertEquals(3, invoked.get());
View Full Code Here


        template.sendBodyAndHeader("seda:start", "Hello World", "recipientListHeader", "direct:foo,fail");

        assertMockEndpointsSatisfied();

        // wait until its done before we stop and check that retry was invoked
        boolean matches = event.matches(10, TimeUnit.SECONDS);
        assertTrue(matches);

        context.stop();

        assertEquals(3, invoked.get());
View Full Code Here

        template.sendBodyAndHeader("seda:start", "Hello World", "recipientListHeader", "fail,not-fail");

        assertMockEndpointsSatisfied();

        // wait until its done before we stop and check that retry was invoked
        boolean matches = event.matches(10, TimeUnit.SECONDS);
        assertTrue(matches);

        context.stop();

        assertEquals(3, invoked.get());
View Full Code Here

        template.sendBodyAndHeader("seda:start", "Hello World", "recipientListHeader", "not-fail,fail");
        assertMockEndpointsSatisfied();

        // wait until its done before we stop and check that retry was invoked
        boolean matches = event.matches(10, TimeUnit.SECONDS);
        assertTrue(matches);

        context.stop();

        assertEquals(3, invoked.get());
View Full Code Here

            + "  </address>"
            + "  <accounttype>debit</accounttype>"
            + "</order>"
        );
    // Verify the expression of the notify builder matches within a wait interval of 10 seconds
    assertTrue(jmsXmlQueueNotify.matches(10, TimeUnit.SECONDS));
    // This is it, now wait for the activiti producer to be invoked
    while(!invoked) {
      Thread.sleep(500);
    }
    // And even though we already know, we'll use mockito to verify the producer was really really called ;)
View Full Code Here

            .from("activemq:in")
            .whenDone(1)
            .create();

        sendMessageBody(messageText);
        assertTrue(notify.matches(10, TimeUnit.SECONDS));
    }

    @Test
    public void testSingleMessageDoneByRouteId() throws InterruptedException {
        final String messageText = "testMessage";
View Full Code Here

            .fromRoute("modifyPayloadBetweenQueues")
            .whenDone(1)
            .create();

        sendMessageBody(messageText);
        assertTrue(notify.matches(10, TimeUnit.SECONDS));
    }

    @Test
    public void testSingleMessageDoneSentToOut() throws InterruptedException {
        final String messageText = "testMessage";
View Full Code Here

            .whenBodiesDone("Modified: testMessage")
            .wereSentTo("activemq:out")
            .create();

        sendMessageBody(messageText);
        assertTrue(notify.matches(10, TimeUnit.SECONDS));
    }

    @Test
    public void testSingleMessageDoneSentToOutAndMatched() throws InterruptedException {
        final String messageText = "testMessage";
View Full Code Here

            .whenDone(1).wereSentTo("activemq:out")
            .whenDoneSatisfied(mock)
            .create();

        sendMessageBody(messageText);
        assertTrue(notify.matches(10, TimeUnit.SECONDS));
    }

    @Test
    public void testMessageFiltering() throws InterruptedException {
        NotifyBuilder notify = new NotifyBuilder(camelContext)
View Full Code Here

            .create();

        sendMessageBody("testMessage");
        sendMessageBody("realMessage");

        assertTrue(notify.matches(10, TimeUnit.SECONDS));
    }

    private void sendMessageBody(final String messageText) {
        jmsTemplate.send("in", new MessageCreator() {
            @Override
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.