Search in sources :

Example 6 with IssueOperation

use of com.synopsys.integration.alert.common.channel.issuetracker.enumeration.IssueOperation in project hub-alert by blackducksoftware.

the class IssueTrackerIssueResponseCreatorTest method runTest.

private void runTest(@Nullable ProjectIssueModel source, IssueTrackerCallbackInfoCreator callbackInfoCreator) {
    IssueOperation testOperation = IssueOperation.OPEN;
    IssueTrackerIssueResponseCreator responseCreator = new IssueTrackerIssueResponseCreator(callbackInfoCreator);
    IssueTrackerIssueResponseModel<String> issueResponse = responseCreator.createIssueResponse(source, EXISTING_ISSUE_DETAILS, testOperation);
    assertEquals(EXISTING_ISSUE_DETAILS.getIssueId(), issueResponse.getIssueId());
    assertEquals(EXISTING_ISSUE_DETAILS.getIssueKey(), issueResponse.getIssueKey());
    assertEquals(EXISTING_ISSUE_DETAILS.getIssueSummary(), issueResponse.getIssueTitle());
    assertEquals(testOperation, issueResponse.getIssueOperation());
}
Also used : IssueOperation(com.synopsys.integration.alert.common.channel.issuetracker.enumeration.IssueOperation)

Aggregations

IssueOperation (com.synopsys.integration.alert.common.channel.issuetracker.enumeration.IssueOperation)6 IssueTransitionModel (com.synopsys.integration.alert.api.channel.issue.model.IssueTransitionModel)4 Test (org.junit.jupiter.api.Test)3 IssueTrackerCallbackInfoCreator (com.synopsys.integration.alert.api.channel.issue.callback.IssueTrackerCallbackInfoCreator)2 IssueTrackerIssueResponseModel (com.synopsys.integration.alert.api.channel.issue.model.IssueTrackerIssueResponseModel)2 ExistingIssueDetails (com.synopsys.integration.alert.api.channel.issue.search.ExistingIssueDetails)2 MockIssueTrackerMessageFormatter (com.synopsys.integration.alert.api.channel.issue.convert.mock.MockIssueTrackerMessageFormatter)1 IssueCommentModel (com.synopsys.integration.alert.api.channel.issue.model.IssueCommentModel)1 IssuePolicyDetails (com.synopsys.integration.alert.api.channel.issue.model.IssuePolicyDetails)1 ProjectIssueModel (com.synopsys.integration.alert.api.channel.issue.model.ProjectIssueModel)1 ActionableIssueSearchResult (com.synopsys.integration.alert.api.channel.issue.search.ActionableIssueSearchResult)1 AlertException (com.synopsys.integration.alert.api.common.model.exception.AlertException)1 IssueMissingTransitionException (com.synopsys.integration.alert.common.channel.issuetracker.exception.IssueMissingTransitionException)1 ChunkedStringBuilder (com.synopsys.integration.alert.common.channel.message.ChunkedStringBuilder)1 ItemOperation (com.synopsys.integration.alert.common.enumeration.ItemOperation)1 LinkableItem (com.synopsys.integration.alert.common.message.model.LinkableItem)1 ProjectMessage (com.synopsys.integration.alert.processor.api.extract.model.project.ProjectMessage)1 LinkedList (java.util.LinkedList)1