Package org.apache.camel.component.jira.mocks

Examples of org.apache.camel.component.jira.mocks.MockSearchRestClient


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

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

        mockResultEndpoint.expectedBodiesReceived(issue1);
       
        mockResultEndpoint.assertIsSatisfied();
    }
View Full Code Here


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

        MockJiraRestClient client = (MockJiraRestClient) factory.getClient();
        MockSearchRestClient restClient = (MockSearchRestClient) client.getSearchClient();
        BasicIssue issue1 = restClient.addIssue();
        BasicIssue issue2 = restClient.addIssue();
        BasicIssue issue3 = restClient.addIssue();

        mockResultEndpoint.expectedBodiesReceived(issue3, issue2, issue1);

        mockResultEndpoint.assertIsSatisfied();
    }
View Full Code Here

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

        MockJiraRestClient jiraRestClient = (MockJiraRestClient) factory.getClient();
        MockSearchRestClient searchRestClient = (MockSearchRestClient) jiraRestClient.getSearchClient();
        BasicIssue issue1 = searchRestClient.addIssue();
        String commentText = "Comment added at " + new Date();
        Comment comment1 = searchRestClient.addCommentToIssue(issue1, commentText);

        mockResultEndpoint.expectedBodiesReceived(comment1);
       

        mockResultEndpoint.assertIsSatisfied();
View Full Code Here

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

        MockJiraRestClient jiraRestClient = (MockJiraRestClient) factory.getClient();
        MockSearchRestClient searchRestClient = (MockSearchRestClient) jiraRestClient.getSearchClient();
        BasicIssue issue1 = searchRestClient.addIssue();
        Comment comment1 = searchRestClient.addCommentToIssue(issue1, "Comment added at " + new Date());
        BasicIssue issue2 = searchRestClient.addIssue();
        Comment comment2 = searchRestClient.addCommentToIssue(issue2, "Comment added at " + new Date());

        mockResultEndpoint.expectedBodiesReceivedInAnyOrder(comment1, comment2);

        mockResultEndpoint.assertIsSatisfied();
    }
View Full Code Here

TOP

Related Classes of org.apache.camel.component.jira.mocks.MockSearchRestClient

Copyright © 2018 www.massapicom. 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.