Examples of assertIsSatisfied()


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

        expectedBody.setName("Wine");
        expectedBody.setPrice(5.0);

        template.sendBody("direct:start", expectedBody);

        resultEndpoint.assertIsSatisfied();

        List<Exchange> list = resultEndpoint.getReceivedExchanges();
        Exchange exchange = list.get(0);
        Object actualBody = exchange.getIn().getBody();
View Full Code Here

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

    }

    protected void assertExpectedCount(int expectedCount) throws InterruptedException {
        MockEndpoint endpoint = getCamelContext().getEndpoint("mock:results", MockEndpoint.class);
        endpoint.expectedMessageCount(expectedCount);
        endpoint.assertIsSatisfied();
    }

}
View Full Code Here

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

    public void test() throws Exception {
        MockEndpoint mock = getMockEndpoint("mock:result");
        sendBody("direct:start", "<test>Hello World!</test>");
        assertTrue("Should have been handled", handled);
        mock.expectedMessageCount(0);
        mock.assertIsSatisfied();
    }

    protected RouteBuilder createRouteBuilder() {
        return new RouteBuilder() {
            public void configure() {
View Full Code Here

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

        firstMessageExpectations.header("JMSCorrelationID").isEqualTo(correlationID);
        firstMessageExpectations.header("JMSType").isEqualTo(messageType);

        template.sendBodyAndHeader("activemq:test.a", expectedBody, "cheese", 123);

        resultEndpoint.assertIsSatisfied();

        List<Exchange> list = resultEndpoint.getReceivedExchanges();
        Exchange exchange = list.get(0);
        Object replyTo = exchange.getIn().getHeader("JMSReplyTo");
        LOG.info("Reply to is: " + replyTo);
View Full Code Here

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

    public void emptyAtStartupTest() throws Exception {
        MockEndpoint mockResultEndpoint = getMockEndpoint("mock:result");
       
        mockResultEndpoint.expectedMessageCount(0);

        mockResultEndpoint.assertIsSatisfied();
    }


    @Test
    public void singleIssueTest() throws Exception {
View Full Code Here

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

        MockSearchRestClient restClient = (MockSearchRestClient) client.getSearchClient();
        BasicIssue issue1 = restClient.addIssue();

        mockResultEndpoint.expectedBodiesReceived(issue1);
       
        mockResultEndpoint.assertIsSatisfied();
    }


    @Test
    public void multipleIssuesTest() throws Exception {
View Full Code Here

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

        BasicIssue issue2 = restClient.addIssue();
        BasicIssue issue3 = restClient.addIssue();

        mockResultEndpoint.expectedBodiesReceived(issue3, issue2, issue1);

        mockResultEndpoint.assertIsSatisfied();
    }


    /**
     * Log new issues.  Not really needed for this test, but useful for debugging.
View Full Code Here

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

    public void emptyAtStartupTest() throws Exception {
        MockEndpoint mockResultEndpoint = getMockEndpoint("mock:result");

        mockResultEndpoint.expectedMessageCount(0);
       
        mockResultEndpoint.assertIsSatisfied();
    }


    @Test
    public void singleIssueTest() throws Exception {
View Full Code Here

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

        Comment comment1 = searchRestClient.addCommentToIssue(issue1, commentText);

        mockResultEndpoint.expectedBodiesReceived(comment1);
       

        mockResultEndpoint.assertIsSatisfied();
    }


    @Test
    public void multiIssueTest() throws Exception {
View Full Code Here

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

        BasicIssue issue2 = searchRestClient.addIssue();
        Comment comment2 = searchRestClient.addCommentToIssue(issue2, "Comment added at " + new Date());

        mockResultEndpoint.expectedBodiesReceivedInAnyOrder(comment1, comment2);

        mockResultEndpoint.assertIsSatisfied();
    }

    /**
     * Log new comments.  Not really needed for this test, but useful for debugging.
     */
 
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.