Package org.apache.camel.component.mock

Examples of org.apache.camel.component.mock.MockEndpoint.assertIsSatisfied()


        // wait a bit to make sure the route has already been properly started through the given route policy
        Thread.sleep(5000);

        app.getBean("template", ProducerTemplate.class).sendBody("direct:start", "clustering");

        mock.assertIsSatisfied();

        // now let's simulate a crash of the first app (the quartz instance 'app-one')
        log.warn("The first app is going to crash NOW!");
        app.close();
View Full Code Here


        mock2.expectedMessageCount(1);
        mock2.expectedBodiesReceived("clustering PONGS!");

        app2.getBean("template", ProducerTemplate.class).sendBody("direct:start", "clustering");

        mock2.assertIsSatisfied();

        // close the second app as we're done now
        app2.close();

        // and as the last step shutdown the database...
View Full Code Here

        assertNotNull(camel);

        MockEndpoint mock = camel.getEndpoint("mock:result", MockEndpoint.class);
        mock.expectedMinimumMessageCount(2);

        mock.assertIsSatisfied();

        app.stop();
       
        log.info("Restarting ...");
        log.info("Restarting ...");
View Full Code Here

        assertNotNull(camel2);

        MockEndpoint mock2 = camel2.getEndpoint("mock:result", MockEndpoint.class);
        mock2.expectedMinimumMessageCount(2);

        mock2.assertIsSatisfied();

        app2.stop();

        // we're done so let's properly close the application contexts, but close
        // the second app before the first one so that the quartz scheduler running
View Full Code Here

        mock.expectedMessagesMatches(new ClusteringPredicate(true));

        // let the route run a bit...
        Thread.sleep(5000);

        mock.assertIsSatisfied();

        // now let's simulate a crash of the first app (the quartz instance 'app-one')
        log.warn("The first app is going to crash NOW!");
        app.close();
View Full Code Here

        MockEndpoint mock2 = camel2.getEndpoint("mock:result", MockEndpoint.class);
        mock2.expectedMinimumMessageCount(3);
        mock2.expectedMessagesMatches(new ClusteringPredicate(false));

        mock2.assertIsSatisfied();

        // close the second app as we're done now
        app2.close();

        // and as the last step shutdown the database...
View Full Code Here

        mock.expectedMessagesMatches(new ClusteringPredicate(true));

        // let the route run a bit...
        Thread.sleep(5000);

        mock.assertIsSatisfied();

        // now let's simulate a crash of the first app (the quartz instance 'app-one')
        log.warn("The first app is going to crash NOW!");
        app.close();
View Full Code Here

        MockEndpoint mock2 = camel2.getEndpoint("mock:result", MockEndpoint.class);
        mock2.expectedMinimumMessageCount(3);
        mock2.expectedMessagesMatches(new ClusteringPredicate(false));

        mock2.assertIsSatisfied();

        // close the second app as we're done now
        app2.close();

        // and as the last step shutdown the database...
View Full Code Here

            new Order("d", 259.95), new Order("e", 1.25)};
        for (Order order : orders) {
            producerTemplate.sendBody("seda:orders", order);
        }

        mockEndpoint.assertIsSatisfied();
    }
}
View Full Code Here

                LOG.info(body);
                producerTemplate.sendBody(mockEndpoint, body);
            }
        });

        mockEndpoint.assertIsSatisfied();
    }
}
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.