Search in sources :

Example 1 with CxClient

use of com.checkmarx.sdk.service.scanner.CxClient in project cx-flow by checkmarx-ltd.

the class FilterScriptSteps method cxFlowGeneratesIssues.

@When("CxFlow generates issues from findings")
public void cxFlowGeneratesIssues() throws CheckmarxException, IOException {
    RestTemplate restTemplateMock = getRestTemplateMock();
    CxAuthService authClientMock = getAuthClientMock();
    CxClient cxClientSpy = getCxClientSpy(restTemplateMock, authClientMock);
    generateIssues(cxClientSpy);
}
Also used : CxClient(com.checkmarx.sdk.service.scanner.CxClient) RestTemplate(org.springframework.web.client.RestTemplate) When(io.cucumber.java.en.When)

Example 2 with CxClient

use of com.checkmarx.sdk.service.scanner.CxClient in project cx-flow by checkmarx-ltd.

the class FilterScriptSteps method getCxClientSpy.

private CxClient getCxClientSpy(RestTemplate restTemplateMock, CxAuthService authClientMock) throws CheckmarxException {
    CxClient cxClient = new CxService(authClientMock, cxProperties, cxLegacyService, restTemplateMock, null, filterInputFactory, filterValidator);
    CxClient cxClientSpy = spy(cxClient);
    doReturn(new CxScanSummary()).when(cxClientSpy).getScanSummaryByScanId(any());
    return cxClientSpy;
}
Also used : CxClient(com.checkmarx.sdk.service.scanner.CxClient) CxScanSummary(com.checkmarx.sdk.dto.cx.CxScanSummary)

Aggregations

CxClient (com.checkmarx.sdk.service.scanner.CxClient)2 CxScanSummary (com.checkmarx.sdk.dto.cx.CxScanSummary)1 When (io.cucumber.java.en.When)1 RestTemplate (org.springframework.web.client.RestTemplate)1