use of com.checkmarx.flow.config.RepoProperties in project cx-flow by checkmarx-ltd.
the class ScaThresholdsSteps method pull_request_should_fail.
@Then("pull request should {word}")
public void pull_request_should_fail(String expected) {
RepoProperties repoProperties = new RepoProperties();
repoProperties.setErrorMerge(true);
ScanResults scanResults = new ScanResults();
scanResults.setScaResults(scaResults);
PullRequestReport pullRequestReport = new PullRequestReport();
boolean actual = thresholdValidatorImpl.isMergeAllowed(scanResults, repoProperties, pullRequestReport);
log.info("is merged allowed = {} (expecting: {})", actual, expected);
assertEquals(expected.equals("pass"), actual, "is merged allowed = " + actual + ", but was expecting: " + expected);
}
Aggregations