Examples of expectedMinimumMessageCount()


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

    }

    @Test
    public void testQuartzPersistentStore() throws Exception {
        MockEndpoint mock = getMockEndpoint("mock:result");
        mock.expectedMinimumMessageCount(2);

        assertMockEndpointsSatisfied();

        // restart route
        context().stopRoute("myRoute");
View Full Code Here

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

        assertMockEndpointsSatisfied();

        // start route, and we got messages again
        mock.reset();
        mock.expectedMinimumMessageCount(2);

        context().startRoute("myRoute");

        assertMockEndpointsSatisfied();
    }
View Full Code Here

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

   
    public void startTest() throws Exception {
        CamelContext context = startRouteWithPolicy("startPolicy");
       
        MockEndpoint mock = context.getEndpoint("mock:success", MockEndpoint.class);
        mock.expectedMinimumMessageCount(1);
       
        context.stopRoute("testRoute", 0, TimeUnit.MILLISECONDS);
       
        Thread.sleep(4000);
        assertTrue(context.getRouteStatus("testRoute") == ServiceStatus.Started);
View Full Code Here

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

   
    public void resumeTest() throws Exception {
        CamelContext context = startRouteWithPolicy("resumePolicy");
       
        MockEndpoint mock = context.getEndpoint("mock:success", MockEndpoint.class);
        mock.expectedMinimumMessageCount(1);

        ServiceHelper.suspendService(context.getRoute("testRoute").getConsumer());
       
        Thread.sleep(4000);
        context.createProducerTemplate().sendBody("direct:start", "Ready or not, Here, I come");
View Full Code Here

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

        CamelContext camel = app.getBean("camelContext", CamelContext.class);
        assertNotNull(camel);

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

        mock.assertIsSatisfied();

        app.stop();
       
View Full Code Here

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

        CamelContext camel2 = app2.getBean("camelContext", CamelContext.class);
        assertNotNull(camel2);

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

        mock2.assertIsSatisfied();

        app2.stop();
    }
View Full Code Here

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

    private MockEndpoint result;

    @Test
    public void testPreserveHeaders() throws Exception {
        MockEndpoint mock = getMockEndpoint("mock:result");
        mock.expectedMinimumMessageCount(1);
        mock.expectedBodiesReceived("some payload");
        mock.expectedHeaderReceived("MyHeader", "HeaderValue");
        template.sendBodyAndHeader("direct:start", "some payload", "MyHeader", "HeaderValue");

        assertMockEndpointsSatisfied();
View Full Code Here

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

    private MockEndpoint result;

    @Test
    public void testIronMQ() throws Exception {
        MockEndpoint mock = getMockEndpoint("mock:result");
        mock.expectedMinimumMessageCount(1);
        template.sendBody("direct:start", "some payload");

        assertMockEndpointsSatisfied();
        String id = mock.getExchanges().get(0).getIn().getHeader("MESSAGE_ID", String.class);
        Assert.assertNotNull(id);
View Full Code Here

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

    }

    @Test
    public void testTwoCamelContextRestart() throws Exception {
        MockEndpoint mock1 = camel1.getEndpoint("mock:one", MockEndpoint.class);
        mock1.expectedMinimumMessageCount(2);

        MockEndpoint mock2 = camel2.getEndpoint("mock:two", MockEndpoint.class);
        mock2.expectedMinimumMessageCount(6);
        mock1.assertIsSatisfied();
View Full Code Here

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

    public void testTwoCamelContextRestart() throws Exception {
        MockEndpoint mock1 = camel1.getEndpoint("mock:one", MockEndpoint.class);
        mock1.expectedMinimumMessageCount(2);

        MockEndpoint mock2 = camel2.getEndpoint("mock:two", MockEndpoint.class);
        mock2.expectedMinimumMessageCount(6);
        mock1.assertIsSatisfied();

        camel1.stop();

        mock2.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.