Search in sources :

Example 1 with ADOIssueTracker

use of com.checkmarx.flow.custom.ADOIssueTracker in project cx-flow by checkmarx-ltd.

the class IastCliSteps method checkHowManyCreateIssue.

@SneakyThrows
@Then("check how many create issue {} {}")
public void checkHowManyCreateIssue(String createIssue, String bugTracker) {
    int createdIssues = Integer.parseInt(removeQuotes(createIssue));
    IssueTracker issueTracker = null;
    switch(bugTracker) {
        case "jira":
            verify(jiraService, times(createdIssues)).createIssue(any(), any());
            return;
        case "github":
            issueTracker = gitHubIssueTracker;
            break;
        case "gitlab":
            issueTracker = gitLabIssueTracker;
            break;
        case "ado":
            issueTracker = adoIssueTracker;
            break;
    }
    if (issueTracker != null) {
        verify(issueTracker, times(createdIssues)).createIssue(any(), any());
    }
}
Also used : IssueTracker(com.checkmarx.flow.custom.IssueTracker) GitHubIssueTracker(com.checkmarx.flow.custom.GitHubIssueTracker) ADOIssueTracker(com.checkmarx.flow.custom.ADOIssueTracker) GitLabIssueTracker(com.checkmarx.flow.custom.GitLabIssueTracker) SneakyThrows(lombok.SneakyThrows) Then(io.cucumber.java.en.Then)

Aggregations

ADOIssueTracker (com.checkmarx.flow.custom.ADOIssueTracker)1 GitHubIssueTracker (com.checkmarx.flow.custom.GitHubIssueTracker)1 GitLabIssueTracker (com.checkmarx.flow.custom.GitLabIssueTracker)1 IssueTracker (com.checkmarx.flow.custom.IssueTracker)1 Then (io.cucumber.java.en.Then)1 SneakyThrows (lombok.SneakyThrows)1